diff --git a/indra/newview/hippogridmanager.cpp b/indra/newview/hippogridmanager.cpp index c2223fbe5..68afc55a0 100644 --- a/indra/newview/hippogridmanager.cpp +++ b/indra/newview/hippogridmanager.cpp @@ -33,6 +33,7 @@ HippoGridInfo HippoGridInfo::FALLBACK_GRIDINFO(""); // ******************************************************************** // ******************************************************************** +const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$ // ******************************************************************** // Initialize @@ -62,6 +63,7 @@ HippoGridInfo::HippoGridInfo(const std::string& gridName) : mCurrencySymbol("OS$"), mCurrencyText("OS Dollars"), mRealCurrencySymbol("US$"), + mClassifiedFee(MINIMUM_PRICE_FOR_LISTING), mDirectoryFee(30), mUPCSupported(false) { @@ -237,7 +239,7 @@ void HippoGridInfo::setRenderCompat(bool compat) void HippoGridInfo::setCurrencySymbol(const std::string& sym) { - mCurrencySymbol = sym.substr(0, 3); + mCurrencySymbol = sym; } void HippoGridInfo::setCurrencyText(const std::string& text) @@ -250,11 +252,6 @@ void HippoGridInfo::setRealCurrencySymbol(const std::string& sym) mRealCurrencySymbol = sym.substr(0, 3); } -void HippoGridInfo::setDirectoryFee(int fee) -{ - mDirectoryFee = fee; -} - // ******************************************************************** diff --git a/indra/newview/hippogridmanager.h b/indra/newview/hippogridmanager.h index 5bc4b08ef..c28e6b6ce 100644 --- a/indra/newview/hippogridmanager.h +++ b/indra/newview/hippogridmanager.h @@ -62,6 +62,7 @@ public: const std::string& getRealCurrencySymbol() const { return mRealCurrencySymbol; } std::string getUploadFee() const; std::string getGroupCreationFee() const; + const int& getClassifiedFee() const { return mClassifiedFee; } std::string getDirectoryFee() const; void setPlatform (const std::string& platform); @@ -87,7 +88,8 @@ public: void setCurrencySymbol(const std::string& sym); void setCurrencyText(const std::string& text); void setRealCurrencySymbol(const std::string& sym); - void setDirectoryFee(int fee); + void setClassifiedFee(int fee) { mClassifiedFee = fee; } + void setDirectoryFee(int fee) { mDirectoryFee = fee; } bool supportsInvLinks(); void setSupportsInvLinks(bool b); bool getAutoUpdate(); @@ -126,6 +128,7 @@ private: std::string mCurrencySymbol; std::string mCurrencyText; std::string mRealCurrencySymbol; + int mClassifiedFee; int mDirectoryFee; std::string mGridMessage; diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index bab7550c5..0b2bdfde3 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -75,7 +75,6 @@ #include "rlvhandler.h" // [/RLVa:KB] -const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$ const S32 MATURE_UNDEFINED = -1; const S32 MATURE_CONTENT = 1; const S32 PG_CONTENT = 2; @@ -774,10 +773,11 @@ void LLPanelClassifiedInfo::callbackGotPriceForListing(const std::string& text) { S32 price_for_listing = strtol(text.c_str(), NULL, 10); const HippoGridInfo& grid(*gHippoGridManager->getConnectedGrid()); - if (grid.isSecondLife() && price_for_listing < MINIMUM_PRICE_FOR_LISTING) + const int& min_fee(grid.getClassifiedFee()); + if (price_for_listing < min_fee) { LLSD args; - args["MIN_PRICE"] = llformat("%d", MINIMUM_PRICE_FOR_LISTING); + args["MIN_PRICE"] = llformat("%d", min_fee); LLNotificationsUtil::add("MinClassifiedPrice", args); return; } @@ -972,7 +972,7 @@ BOOL LLFloaterPriceForListing::postBuild() if (edit) { edit->setPrevalidate(LLLineEditor::prevalidateNonNegativeS32); - std::string min_price = llformat("%d", MINIMUM_PRICE_FOR_LISTING); + std::string min_price = llformat("%d", gHippoGridManager->getConnectedGrid()->getClassifiedFee()); edit->setText(min_price); edit->selectAll(); edit->setFocus(TRUE); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 665fe75a8..d3c0b275e 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -4214,6 +4214,8 @@ bool process_login_success_response(std::string& password, U32& first_sim_size_x gSavedSettings.setString("AvatarPickerURL", tmp); gMenuBarView->getChildView("Avatar Picker")->setVisible(!tmp.empty()); gSavedSettings.setString("DestinationGuideURL", response["destination_guide_url"].asString()); + tmp = response["classified_fee"].asString(); + gHippoGridManager->getConnectedGrid()->setClassifiedFee(tmp.empty() ? 0 : atoi(tmp.c_str())); } tmp = response["currency"].asString(); if (!tmp.empty())