FIRE-9814: Don't hardcode a minimum listing fee for classifieds on non-sl platforms.
parent
c9eb543593
commit
a6bba1f286
|
|
@ -564,6 +564,14 @@ void LLGridManager::gridInfoResponderCB(GridEntry* grid_entry)
|
|||
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_DIRECTORY_FEE] << LL_ENDL;
|
||||
continue;
|
||||
}
|
||||
/// <FS:CR> NOTE: As far as I can tell, this setting doesn't exist on any platform at present,
|
||||
/// adding it for the future while fixing FIRE-9814
|
||||
check = "ClassifiedFee";
|
||||
if (node->hasName(check))
|
||||
{
|
||||
grid_entry->grid[GRID_CLASSIFIED_FEE] = node->getTextContents();
|
||||
LL_DEBUGS("GridManager") << "[\""<<check<<"\"]: " << grid_entry->grid[GRID_CLASSIFIED_FEE] << LL_ENDL;
|
||||
}
|
||||
check = "CurrencySymbol";
|
||||
if (node->hasName(check))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ extern const char* DEFAULT_LOGIN_PAGE;
|
|||
#define GRID_PROFILE_URI_VALUE "profileuri"
|
||||
#define GRID_SENDGRIDINFO "SendGridInfoToViewerOnLogin"
|
||||
#define GRID_DIRECTORY_FEE "DirectoryFee"
|
||||
#define GRID_CLASSIFIED_FEE "ClassifiedFee"
|
||||
#define GRID_CURRENCY_SYMBOL "CurrencySymbol"
|
||||
#define GRID_REAL_CURRENCY_SYMBOL "RealCurrencySymbol"
|
||||
#define GRID_MAXGROUPS "MaxGroups"
|
||||
|
|
|
|||
|
|
@ -57,6 +57,10 @@
|
|||
#include "llstatusbar.h"
|
||||
#include "llviewertexture.h"
|
||||
|
||||
#ifdef OPENSIM
|
||||
#include "llviewernetwork.h"
|
||||
#endif // OPENSIM
|
||||
|
||||
const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$
|
||||
|
||||
//static
|
||||
|
|
@ -844,10 +848,29 @@ void FSPanelClassifiedEdit::resetControls()
|
|||
getChild<LLComboBox>("category")->setCurrentByIndex(0);
|
||||
getChild<LLComboBox>("content_type")->setCurrentByIndex(0);
|
||||
getChild<LLUICtrl>("auto_renew")->setValue(false);
|
||||
getChild<LLUICtrl>("price_for_listing")->setValue(MINIMUM_PRICE_FOR_LISTING);
|
||||
// <FS:CR> FIRE-9814 - Don't hardcode a classified listing fee
|
||||
//getChild<LLUICtrl>("price_for_listing")->setValue(MINIMUM_PRICE_FOR_LISTING);
|
||||
getChild<LLUICtrl>("price_for_listing")->setValue(getClassifiedFee());
|
||||
// </FS:CR>
|
||||
getChildView("price_for_listing")->setEnabled(TRUE);
|
||||
}
|
||||
|
||||
// <FS:CR> FIRE-9814 - Don't hardcode a classified listing fee
|
||||
S32 FSPanelClassifiedEdit::getClassifiedFee()
|
||||
{
|
||||
S32 fee = MINIMUM_PRICE_FOR_LISTING;
|
||||
#ifdef OPENSIM
|
||||
if (LLGridManager::getInstance()->isInOpenSim())
|
||||
{
|
||||
LLSD grid_info;
|
||||
LLGridManager::getInstance()->getGridData(grid_info);
|
||||
fee = grid_info[GRID_CLASSIFIED_FEE].asInteger();
|
||||
}
|
||||
#endif // OPENSIM
|
||||
return fee;
|
||||
}
|
||||
// </FS:CR>
|
||||
|
||||
bool FSPanelClassifiedEdit::canClose()
|
||||
{
|
||||
return mCanClose;
|
||||
|
|
|
|||
|
|
@ -285,6 +285,7 @@ protected:
|
|||
void onTextureSelected();
|
||||
|
||||
private:
|
||||
S32 getClassifiedFee(); // <FS:CR> FIRE-9814 - Don't hardcode a classified listing fee
|
||||
bool mIsNew;
|
||||
bool mIsNewWithErrors;
|
||||
bool mCanClose;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,10 @@
|
|||
#include "llstatusbar.h"
|
||||
#include "llviewertexture.h"
|
||||
|
||||
#ifdef OPENSIM
|
||||
#include "llviewernetwork.h"
|
||||
#endif // OPENSIM
|
||||
|
||||
const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$
|
||||
|
||||
//static
|
||||
|
|
@ -844,10 +848,29 @@ void LLPanelClassifiedEdit::resetControls()
|
|||
getChild<LLComboBox>("category")->setCurrentByIndex(0);
|
||||
getChild<LLComboBox>("content_type")->setCurrentByIndex(0);
|
||||
getChild<LLUICtrl>("auto_renew")->setValue(false);
|
||||
getChild<LLUICtrl>("price_for_listing")->setValue(MINIMUM_PRICE_FOR_LISTING);
|
||||
// <FS:CR> FIRE-9814 - Don't hardcode a classified listing fee
|
||||
//getChild<LLUICtrl>("price_for_listing")->setValue(MINIMUM_PRICE_FOR_LISTING);
|
||||
getChild<LLUICtrl>("price_for_listing")->setValue(getClassifiedFee());
|
||||
// </FS:CR>
|
||||
getChildView("price_for_listing")->setEnabled(TRUE);
|
||||
}
|
||||
|
||||
// <FS:CR> FIRE-9814 - Don't hardcode a classified listing fee
|
||||
S32 LLPanelClassifiedEdit::getClassifiedFee()
|
||||
{
|
||||
S32 fee = MINIMUM_PRICE_FOR_LISTING;
|
||||
#ifdef OPENSIM
|
||||
if (LLGridManager::getInstance()->isInOpenSim())
|
||||
{
|
||||
LLSD grid_info;
|
||||
LLGridManager::getInstance()->getGridData(grid_info);
|
||||
fee = grid_info[GRID_CLASSIFIED_FEE].asInteger();
|
||||
}
|
||||
#endif // OPENSIM
|
||||
return fee;
|
||||
}
|
||||
// </FS:CR>
|
||||
|
||||
bool LLPanelClassifiedEdit::canClose()
|
||||
{
|
||||
return mCanClose;
|
||||
|
|
|
|||
|
|
@ -284,6 +284,7 @@ protected:
|
|||
void onTextureSelected();
|
||||
|
||||
private:
|
||||
S32 getClassifiedFee(); // <FS:CR> FIRE-9814 - Don't hardcode a classified listing fee
|
||||
bool mIsNew;
|
||||
bool mIsNewWithErrors;
|
||||
bool mCanClose;
|
||||
|
|
|
|||
Loading…
Reference in New Issue