diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3bf87ec2b6..786b0e6bd2 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -129,7 +129,7 @@ Type Boolean Value - 1 + 0 GridListDownloadURL diff --git a/indra/newview/app_settings/settings_firestorm.xml b/indra/newview/app_settings/settings_firestorm.xml index 957ae553e8..d8861b5bf2 100644 --- a/indra/newview/app_settings/settings_firestorm.xml +++ b/indra/newview/app_settings/settings_firestorm.xml @@ -274,5 +274,15 @@ Value 1 + + ForceShowGrid + + Comment + Always show grid dropdown on login screen + Type + Boolean + Value + 1 + diff --git a/indra/newview/fscontactsfloater.cpp b/indra/newview/fscontactsfloater.cpp index 1596db6e1a..d6848015d5 100644 --- a/indra/newview/fscontactsfloater.cpp +++ b/indra/newview/fscontactsfloater.cpp @@ -53,6 +53,7 @@ #include "llviewercontrol.h" #include "llvoiceclient.h" #include "lggcontactsetsfloater.h" +#include "llviewernetwork.h" //Maximum number of people you can select to do an operation on at once. #define MAX_FRIEND_SELECT 20 @@ -142,6 +143,8 @@ BOOL FSFloaterContacts::postBuild() mFriendsTab->childSetAction("offer_teleport_btn", boost::bind(&FSFloaterContacts::onTeleportButtonClicked, this)); mFriendsTab->childSetAction("pay_btn", boost::bind(&FSFloaterContacts::onPayButtonClicked, this)); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + mFriendsTab->getChild("pay_btn")->setToolTipArg(std::string("[CUR]"), type_currency); mFriendsTab->childSetAction("remove_btn", boost::bind(&FSFloaterContacts::onDeleteFriendButtonClicked, this)); mFriendsTab->childSetAction("add_btn", boost::bind(&FSFloaterContacts::onAddFriendWizButtonClicked, this)); diff --git a/indra/newview/fslslbridge.cpp b/indra/newview/fslslbridge.cpp index 816a290656..054f1758ec 100644 --- a/indra/newview/fslslbridge.cpp +++ b/indra/newview/fslslbridge.cpp @@ -51,6 +51,7 @@ #include "llnotificationmanager.h" #include "llviewerobject.h" #include "llappearancemgr.h" +#include "llviewernetwork.h" #include #include @@ -294,6 +295,12 @@ void FSLSLBridge :: initBridge() return; } + if(LLGridManager::getInstance()->isInOpenSim()) { + llwarns << "Asked to create bridge, but we are in opensim, so no library items are available. Aborting." << llendl; + mBridgeCreating = false; + return; + } + LLUUID catID = findFSCategory(); LLUUID libCatID = findFSBridgeContainerCategory(); diff --git a/indra/newview/fspanelclassified.cpp b/indra/newview/fspanelclassified.cpp index 7ebe8d1177..db1e1864bb 100644 --- a/indra/newview/fspanelclassified.cpp +++ b/indra/newview/fspanelclassified.cpp @@ -55,6 +55,8 @@ #include "lltrans.h" #include "llscrollcontainer.h" #include "llstatusbar.h" +#include "llviewernetwork.h" +#include "llspinctrl.h" const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$ @@ -163,6 +165,8 @@ BOOL FSPanelClassifiedInfo::postBuild() mSnapshotCtrl = getChild("classified_snapshot"); mSnapshotRect = getDefaultSnapshotRect(); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + getChild("price_for_listing")->setLabel(type_currency); return TRUE; } @@ -279,7 +283,9 @@ void FSPanelClassifiedInfo::processProperties(void* data, EAvatarProcessorType t getString("auto_renew_on") : getString("auto_renew_off"); getChild("auto_renew")->setValue(auto_renew_str); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); price_str.setArg("[PRICE]", llformat("%d", c_info->price_for_listing)); + price_str.setArg("[CUR]", type_currency); getChild("price_for_listing")->setValue(LLSD(price_str)); std::string date_str = date_fmt; diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index fcbffdc09a..923bb715a6 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -51,6 +51,7 @@ #include "llviewerwindow.h" #include "lltexlayer.h" #include "lltrans.h" +#include "llviewernetwork.h" //-TT Client LSL Bridge #include "fslslbridge.h" //-TT @@ -89,8 +90,10 @@ void on_new_single_inventory_upload_complete( // and display something saying that it cost L$ LLStatusBar::sendMoneyBalanceRequest(); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLSD args; args["AMOUNT"] = llformat("%d", upload_price); + args["CUR"] = type_currency; LLNotificationsUtil::add("UploadPayment", args); } @@ -308,9 +311,11 @@ void LLAssetUploadResponder::uploadFailure(const LLSD& content) // deal with L$ errors if (reason == "insufficient funds") { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); S32 price = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", price); + args["CUR"] = type_currency; LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("uploading_costs", args), price ); } else @@ -1138,7 +1143,9 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog( LLSD substitutions; LLSD payload; + std::string type_currency = LLGridManager::getInstance()->getCurrency(); substitutions["PRICE"] = upload_price; + substitutions["CUR"] = type_currency; payload["confirmation_url"] = confirmation_url; diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index b4a1457f47..92f1e55f2c 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -567,6 +567,8 @@ void LLCurrencyUIManager::buy(const std::string& buy_msg) } LLUIString msg = buy_msg; + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + msg.setArg("[CUR]", type_currency); msg.setArg("[LINDENS]", llformat("%d", impl.mUserCurrencyBuy)); msg.setArg("[LOCALAMOUNT]", getLocalEstimate()); LLConfirmationManager::confirm(impl.mSiteConfirm, diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index d920cf0652..11f8bc3097 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -38,6 +38,7 @@ #include "llui.h" #include "llappviewer.h" #include "lltracker.h" +#include "llviewernetwork.h" // static @@ -163,7 +164,10 @@ void LLFirstUse::setDisplayName(bool enable) // static void LLFirstUse::receiveLindens(bool enable) { - firstUseNotification("FirstReceiveLindens", enable, "HintLindenDollar", LLSD(), LLSD().with("target", "linden_balance").with("direction", "bottom")); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + LLSD args; + args["CUR"] = type_currency; + firstUseNotification("FirstReceiveLindens", enable, "HintLindenDollar", args, LLSD().with("target", "linden_balance").with("direction", "bottom")); } diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index 2939d31087..b0003e767a 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -56,6 +56,7 @@ #include "llsdutil.h" #include "llsdutil_math.h" #include "lltrans.h" +#include "llviewernetwork.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs @@ -448,10 +449,12 @@ void LLFloaterAuction::onClickSellToAnyone(void* data) S32 sale_price = parcelp->getArea(); // Selling for L$1 per meter S32 area = parcelp->getArea(); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLSD args; args["LAND_SIZE"] = llformat("%d", area); args["SALE_PRICE"] = llformat("%d", sale_price); args["NAME"] = LLTrans::getString("Anyone"); + args["CUR"] = type_currency; LLNotification::Params params("ConfirmLandSaleChange"); // Re-use existing dialog params.substitutions(args) diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index 087b0007e1..3034ad47fd 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -46,6 +46,7 @@ #include "llviewerobject.h" #include "lluictrlfactory.h" #include "llviewerwindow.h" +#include "llviewernetwork.h" #include "lltrans.h" LLFloaterBuy::LLFloaterBuy(const LLSD& key) @@ -176,7 +177,9 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info) // Add after columns added so appropriate heights are correct. object_list->addElement(row); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); floater->getChild("buy_text")->setTextArg("[AMOUNT]", llformat("%d", sale_info.getSalePrice())); + floater->getChild("buy_text")->setTextArg("[CUR]", type_currency); floater->getChild("buy_name_text")->setTextArg("[NAME]", owner_name); // Must do this after the floater is created, because diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index a7388d21a3..b2901e93bb 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -51,6 +51,7 @@ #include "llviewerregion.h" #include "lluictrlfactory.h" #include "llviewerwindow.h" +#include "llviewernetwork.h" LLFloaterBuyContents::LLFloaterBuyContents(const LLSD& key) : LLFloater(key) @@ -127,6 +128,8 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info) floater->getChild("buy_text")->setTextArg("[AMOUNT]", llformat("%d", sale_info.getSalePrice())); floater->getChild("buy_text")->setTextArg("[NAME]", owner_name); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + floater->getChild("buy_text")->setTextArg("[CUR]", type_currency); // Must do this after the floater is created, because // sometimes the inventory is already there and // the callback is called immediately. diff --git a/indra/newview/llfloaterbuycurrency.cpp b/indra/newview/llfloaterbuycurrency.cpp index e21a8594bc..bc3bf900ca 100644 --- a/indra/newview/llfloaterbuycurrency.cpp +++ b/indra/newview/llfloaterbuycurrency.cpp @@ -41,6 +41,7 @@ #include "llweb.h" #include "llwindow.h" #include "llappviewer.h" +#include "llviewernetwork.h" static const S32 STANDARD_BUY_AMOUNT = 2000; static const S32 MINIMUM_BALANCE_AMOUNT = 0; @@ -130,9 +131,12 @@ BOOL LLFloaterBuyCurrencyUI::postBuild() { mManager.prepare(); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + std::string title = "BUY " + type_currency; getChild("buy_btn")->setCommitCallback( boost::bind(&LLFloaterBuyCurrencyUI::onClickBuy, this)); getChild("cancel_btn")->setCommitCallback( boost::bind(&LLFloaterBuyCurrencyUI::onClickCancel, this)); getChild("error_web")->setCommitCallback( boost::bind(&LLFloaterBuyCurrencyUI::onClickErrorWeb, this)); + setTitle(title); center(); @@ -147,7 +151,10 @@ void LLFloaterBuyCurrencyUI::draw() { if (mManager.bought()) { - LLNotificationsUtil::add("BuyLindenDollarSuccess"); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + LLSD args; + args["CUR"] = type_currency; + LLNotificationsUtil::add("BuyLindenDollarSuccess", args); closeFloater(); return; } @@ -232,20 +239,30 @@ void LLFloaterBuyCurrencyUI::updateUI() } } + std::string type_currency = LLGridManager::getInstance()->getCurrency(); S32 balance = gStatusBar->getBalance(); getChildView("balance_label")->setVisible(TRUE); getChildView("balance_amount")->setVisible(TRUE); getChild("balance_amount")->setTextArg("[AMT]", llformat("%d", balance)); + getChild("balance_amount")->setTextArg("[CUR]", type_currency); S32 buying = mManager.getAmount(); getChildView("buying_label")->setVisible(TRUE); getChildView("buying_amount")->setVisible(TRUE); getChild("buying_amount")->setTextArg("[AMT]", llformat("%d", buying)); + getChild("buying_amount")->setTextArg("[CUR]", type_currency); S32 total = balance + buying; getChildView("total_label")->setVisible(TRUE); getChildView("total_amount")->setVisible(TRUE); getChild("total_amount")->setTextArg("[AMT]", llformat("%d", total)); + getChild("total_amount")->setTextArg("[CUR]", type_currency); + + getChild("info_need_more")->setTextArg("[CUR]", type_currency); + getChild("info_buying")->setTextArg("[CUR]", type_currency); + getChild("currency_label")->setTextArg("[CUR]", type_currency); + getChild("purchase_warning_repurchase")->setTextArg("[CUR]", type_currency); + getChild("purchase_warning_notenough")->setTextArg("[CUR]", type_currency); if (mHasTarget) { diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 8223e89b64..a94d6e1e4b 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -1018,6 +1018,7 @@ void LLFloaterBuyLandUI::onVisibilityChange ( const LLSD& new_visibility ) void LLFloaterBuyLandUI::refreshUI() { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); // section zero: title area { LLTextureCtrl* snapshot = getChild("info_image"); @@ -1046,6 +1047,7 @@ void LLFloaterBuyLandUI::refreshUI() LLStringUtil::format_map_t info_price_args; info_price_args["[PRICE]"] = llformat("%d", mParcelPrice); info_price_args["[PRICE_PER_SQM]"] = llformat("%.1f", cost_per_sqm); + info_price_args["[CUR]"] = type_currency; if (mParcelSoldWithObjects) { info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_with_objects"); @@ -1235,6 +1237,7 @@ void LLFloaterBuyLandUI::refreshUI() LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mParcelPrice); string_args["[SELLER]"] = mParcelSellerName; + string_args["[CUR]"] = type_currency; getChild("purchase_action")->setValue(getString("pay_to_for_land", string_args)); getChildView("purchase_action")->setVisible( mParcelValid); @@ -1244,6 +1247,7 @@ void LLFloaterBuyLandUI::refreshUI() { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mAgentCashBalance); + string_args["[CUR]"] = type_currency; getChild("currency_reason")->setValue(getString("have_enough_lindens", string_args)); } @@ -1252,6 +1256,7 @@ void LLFloaterBuyLandUI::refreshUI() LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mAgentCashBalance); string_args["[AMOUNT2]"] = llformat("%d", mParcelPrice - mAgentCashBalance); + string_args["[CUR]"] = type_currency; getChild("currency_reason")->setValue(getString("not_enough_lindens", string_args)); @@ -1262,6 +1267,7 @@ void LLFloaterBuyLandUI::refreshUI() { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", finalBalance); + string_args["[CUR]"] = type_currency; getChild("currency_balance")->setValue(getString("balance_left", string_args)); @@ -1270,11 +1276,13 @@ void LLFloaterBuyLandUI::refreshUI() { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mParcelPrice - mAgentCashBalance); + string_args["[CUR]"] = type_currency; getChild("currency_balance")->setValue(getString("balance_needed", string_args)); } + getChild("currency_action")->setTextArg("[CUR]", type_currency); getChild("remove_contribution")->setValue(LLSD(groupContributionEnough)); getChildView("remove_contribution")->setEnabled(groupContributionEnough); bool showRemoveContribution = mParcelIsGroupLand @@ -1312,6 +1320,7 @@ void LLFloaterBuyLandUI::startBuyPreConfirm() { std::string action; + std::string type_currency = LLGridManager::getInstance()->getCurrency(); if (mSiteMembershipUpgrade) { action += mSiteMembershipAction; @@ -1335,6 +1344,7 @@ void LLFloaterBuyLandUI::startBuyPreConfirm() LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mCurrency.getAmount()); string_args["[LOCAL_AMOUNT]"] = mCurrency.getLocalEstimate(); + string_args["[CUR]"] = type_currency; action += getString("buy_for_US", string_args); } @@ -1342,6 +1352,7 @@ void LLFloaterBuyLandUI::startBuyPreConfirm() LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mParcelPrice); string_args["[SELLER]"] = mParcelSellerName; + string_args["[CUR]"] = type_currency; action += getString("pay_to_for_land", string_args); diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index a34e0353ec..181eacdbfb 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -69,6 +69,7 @@ #include "llviewercontrol.h" #include "lluictrlfactory.h" #include "lltrans.h" +#include "llviewernetwork.h" #include "lltransfertargetfile.h" #include "lltransfersourcefile.h" @@ -480,6 +481,8 @@ void LLPanelRegionTools::clearAllWidgets() getChild("billable factor")->setValue(BILLABLE_FACTOR_DEFAULT); getChildView("billable factor")->setEnabled(FALSE); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + getChild("land cost text")->setTextArg("[CUR]", type_currency); getChild("land cost")->setValue(PRICE_PER_METER_DEFAULT); getChildView("land cost")->setEnabled(FALSE); diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 0bffe86428..4039bfeebb 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -75,6 +75,7 @@ #include "llviewercontrol.h" #include "roles_constants.h" #include "lltrans.h" +#include "llviewernetwork.h" #include "llgroupactions.h" #include "llsdutil_math.h" @@ -655,9 +656,16 @@ void LLPanelLandGeneral::refresh() mTextClaimDate->setText(claim_date_str); mTextClaimDate->setEnabled(is_leased); - BOOL enable_auction = (gAgent.getGodLevel() >= GOD_LIAISON) + BOOL enable_auction; + if(LLGridManager::getInstance()->isInSLMain() || LLGridManager::getInstance()->isInSLBeta()) { + enable_auction = (gAgent.getGodLevel() >= GOD_LIAISON) && (owner_id == GOVERNOR_LINDEN_ID) && (parcel->getAuctionID() == 0); + } + else { + enable_auction = (gAgent.getGodLevel() >= GOD_LIAISON) + && (parcel->getAuctionID() == 0); + } mBtnStartAuction->setEnabled(enable_auction); } @@ -748,6 +756,9 @@ void LLPanelLandGeneral::refresh() } S32 price = parcel->getSalePrice(); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + + mSaleInfoForSale1->setTextArg("[CUR]", type_currency); mSaleInfoForSale1->setTextArg("[PRICE]", LLResMgr::getInstance()->getMonetaryString(price)); mSaleInfoForSale1->setTextArg("[PRICE_PER_SQM]", llformat("%.1f", cost_per_sqm)); if (can_be_sold) @@ -1009,10 +1020,12 @@ void LLPanelLandGeneral::onClickBuyPass(void* data) cost = llformat("%d", pass_price); time = llformat("%.2f", pass_hours); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLSD args; args["COST"] = cost; args["PARCEL_NAME"] = parcel_name; args["TIME"] = time; + args["CUR"] = type_currency; // creating pointer on selection to avoid deselection of parcel until we are done with buying pass (EXT-6464) sSelectionForBuyPass = LLViewerParcelMgr::getInstance()->getParcelSelection(); @@ -2427,6 +2440,8 @@ BOOL LLPanelLandAccess::postBuild() mListBanned->setContextMenu(LLScrollListCtrl::MENU_AVATAR); } + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + getChild("PriceSpin")->setLabelArg(std::string("[CUR]"), type_currency); return TRUE; } diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index fcb1da4449..8c5f8bb213 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -5842,12 +5842,14 @@ void LLFloaterModelPreview::handleModelPhysicsFeeReceived() { const LLSD& result = mModelPhysicsFee; mUploadModelUrl = result["url"].asString(); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); childSetTextArg("prim_weight", "[EQ]", llformat("%0.3f", result["resource_cost"].asReal())); childSetTextArg("download_weight", "[ST]", llformat("%0.3f", result["model_streaming_cost"].asReal())); childSetTextArg("server_weight", "[SIM]", llformat("%0.3f", result["simulation_cost"].asReal())); childSetTextArg("physics_weight", "[PH]", llformat("%0.3f", result["physics_cost"].asReal())); childSetTextArg("upload_fee", "[FEE]", llformat("%d", result["upload_price"].asInteger())); + childSetTextArg("upload_fee", "[CUR]", type_currency); childSetTextArg("price_breakdown", "[STREAMING]", llformat("%d", result["upload_price_breakdown"]["mesh_streaming"].asInteger())); childSetTextArg("price_breakdown", "[PHYSICS]", llformat("%d", result["upload_price_breakdown"]["mesh_physics"].asInteger())); childSetTextArg("price_breakdown", "[INSTANCES]", llformat("%d", result["upload_price_breakdown"]["mesh_instance"].asInteger())); diff --git a/indra/newview/llfloatermodelwizard.cpp b/indra/newview/llfloatermodelwizard.cpp index b517b78e5a..5622f69d08 100644 --- a/indra/newview/llfloatermodelwizard.cpp +++ b/indra/newview/llfloatermodelwizard.cpp @@ -39,6 +39,7 @@ #include "llsliderctrl.h" #include "lltoolmgr.h" #include "llviewerwindow.h" +#include "llviewernetwork.h" LLFloaterModelWizard* LLFloaterModelWizard::sInstance = NULL; @@ -499,8 +500,11 @@ void LLFloaterModelWizard::onModelPhysicsFeeReceived(const LLSD& result, std::st mUploadModelUrl = upload_url; S32 fee = result["upload_price"].asInteger(); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); childSetTextArg("review_fee", "[FEE]", llformat("%d", fee)); + childSetTextArg("review_fee", "[CUR]", type_currency); childSetTextArg("charged_fee", "[FEE]", llformat("%d", fee)); + childSetTextArg("charged_fee", "[CUR]", type_currency); setState(REVIEW); } diff --git a/indra/newview/llfloaternamedesc.cpp b/indra/newview/llfloaternamedesc.cpp index 27b1c3b9cd..e52540a65a 100644 --- a/indra/newview/llfloaternamedesc.cpp +++ b/indra/newview/llfloaternamedesc.cpp @@ -45,6 +45,7 @@ #include "lluictrlfactory.h" #include "llstring.h" #include "lleconomy.h" +#include "llviewernetwork.h" // linden includes #include "llassetstorage.h" @@ -127,6 +128,8 @@ BOOL LLFloaterNameDesc::postBuild() getChild("ok_btn")->setLabelArg("[AMOUNT]", llformat("%d", LLGlobalEconomy::Singleton::getInstance()->getPriceUpload() )); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + getChild("ok_btn")->setLabelArg(std::string("[CUR]"), type_currency); setDefaultBtn("ok_btn"); return TRUE; diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index ee2d26125a..02abd53e1a 100644 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -50,6 +50,7 @@ #include "llselectmgr.h" #include "lltransactiontypes.h" #include "lluictrlfactory.h" +#include "llviewernetwork.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs @@ -145,6 +146,7 @@ BOOL LLFloaterPay::postBuild() { S32 i = 0; + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLGiveMoneyInfo* info = new LLGiveMoneyInfo(this, PAY_BUTTON_DEFAULT_0); mCallbackData.push_back(info); @@ -152,6 +154,8 @@ BOOL LLFloaterPay::postBuild() getChildView("fastpay 1")->setVisible(FALSE); mQuickPayButton[i] = getChild("fastpay 1"); + mQuickPayButton[i]->setLabelArg("[CUR]", type_currency); + mQuickPayButton[i]->setLabelSelected(mQuickPayButton[i]->getLabelUnselected()); mQuickPayInfo[i] = info; ++i; @@ -162,6 +166,8 @@ BOOL LLFloaterPay::postBuild() getChildView("fastpay 5")->setVisible(FALSE); mQuickPayButton[i] = getChild("fastpay 5"); + mQuickPayButton[i]->setLabelArg("[CUR]", type_currency); + mQuickPayButton[i]->setLabelSelected(mQuickPayButton[i]->getLabelUnselected()); mQuickPayInfo[i] = info; ++i; @@ -172,6 +178,8 @@ BOOL LLFloaterPay::postBuild() getChildView("fastpay 10")->setVisible(FALSE); mQuickPayButton[i] = getChild("fastpay 10"); + mQuickPayButton[i]->setLabelArg("[CUR]", type_currency); + mQuickPayButton[i]->setLabelSelected(mQuickPayButton[i]->getLabelUnselected()); mQuickPayInfo[i] = info; ++i; @@ -182,6 +190,8 @@ BOOL LLFloaterPay::postBuild() getChildView("fastpay 20")->setVisible(FALSE); mQuickPayButton[i] = getChild("fastpay 20"); + mQuickPayButton[i]->setLabelArg("[CUR]", type_currency); + mQuickPayButton[i]->setLabelSelected(mQuickPayButton[i]->getLabelUnselected()); mQuickPayInfo[i] = info; ++i; @@ -270,13 +280,14 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata) S32 max_pay_amount = 0; S32 padding_required = 0; + std::string type_currency = LLGridManager::getInstance()->getCurrency(); for (i=0;igetS32Fast(_PREHASH_ButtonData,_PREHASH_PayButton,pay_button,i); if (pay_button > 0) { - std::string button_str = "L$"; + std::string button_str = type_currency; button_str += LLResMgr::getInstance()->getMonetaryString( pay_button ); self->mQuickPayButton[i]->setLabelSelected(button_str); @@ -297,7 +308,7 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata) } // build a string containing the maximum value and calc nerw button width from it. - std::string balance_str = "L$"; + std::string balance_str = type_currency; balance_str += LLResMgr::getInstance()->getMonetaryString( max_pay_amount ); const LLFontGL* font = LLFontGL::getFontSansSerif(); S32 new_button_width = font->getWidth( std::string(balance_str)); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index e5de0c426c..9a498841d6 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -123,6 +123,8 @@ //-TT #include "NACLantispam.h" #include "lggautocorrectfloater.h" +#include "llviewernetwork.h" +#include "lltexteditor.h" // [SL:KB] - Patch: Misc-Spellcheck | Checked: 2011-09-06 (Catznip-2.8.0a) | Added: Catznip-2.8.0a #include "llhunspell.h" @@ -2023,6 +2025,17 @@ BOOL LLPanelPreference::postBuild() getChildView("OnlineOfflinetoNearbyChatHistory")->setEnabled(getChild("OnlineOfflinetoNearbyChat")->getValue().asBoolean()); } + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + + if (hasChild("notify_money_change_checkbox", TRUE)) + { + getChild("notify_money_change_checkbox")->setLabelArg("[CUR]", type_currency); + } + + if (hasChild("FSPaymentInfoInChat", TRUE)) + { + getChild("FSPaymentInfoInChat")->setLabelArg("[CUR]", type_currency); + } apply(); return true; } @@ -2661,3 +2674,281 @@ void LLPanelPreferenceSkins::refreshSkinThemeList() m_pSkinThemeCombo->selectFirstItem(); } // +static LLRegisterPanelClassWrapper t_pref_grids("panel_preference_grids"); + +LLPanelPreferenceGrids::LLPanelPreferenceGrids() : LLPanelPreference(), m_GridCombo(NULL), mState(NORMAL) +{ +} + +BOOL LLPanelPreferenceGrids::postBuild() +{ + m_GridCombo = getChild("grid_selector"); + if (m_GridCombo) + m_GridCombo->setCommitCallback(boost::bind(&LLPanelPreferenceGrids::onSelectGrid, this)); + + getChild("btn_delete")->setCommitCallback(boost::bind(&LLPanelPreferenceGrids::onClickDelete, this)); + getChild("btn_new")->setCommitCallback(boost::bind(&LLPanelPreferenceGrids::onClickNew, this)); + getChild("btn_copy")->setCommitCallback(boost::bind(&LLPanelPreferenceGrids::onClickCopy, this)); + getChild("btn_default")->setCommitCallback(boost::bind(&LLPanelPreferenceGrids::onClickDefault, this)); + getChild("btn_add")->setCommitCallback(boost::bind(&LLPanelPreferenceGrids::onClickAdd, this)); + getChild("btn_help_render_compat")->setCommitCallback(boost::bind(&LLPanelPreferenceGrids::onClickHelpRenderCompat, this)); + getChild("btn_advanced")->setCommitCallback(boost::bind(&LLPanelPreferenceGrids::onClickAdvanced, this)); + + reset(); + return LLPanelPreference::postBuild(); +} + +void LLPanelPreferenceGrids::apply() +{ + if (saveCurGrid()) { + // adding new grid did not fail + LLGridManager::getInstance()->setGridChoice(mCurGrid); + } + LLPanelLogin::loadLoginPage(); + LLGridManager::getInstance()->saveGridList(); + refresh(); + // update render compatibility + //if (mCurGrid == LLGridManager::getInstance()->getGrid()) { + //gHippoLimits->setLimits(); + //} +} + +void LLPanelPreferenceGrids::cancel() +{ + reset(); +} + +void LLPanelPreferenceGrids::onClickDelete() +{ + if (mState == NORMAL) + LLGridManager::getInstance()->deleteGrid(mCurGrid); + reset(); +} + +void LLPanelPreferenceGrids::onClickNew() +{ + mState = ADD_NEW; + loadCurGrid(); +} + +void LLPanelPreferenceGrids::onClickCopy() +{ + if (mState == NORMAL) { + mState = ADD_COPY; + loadCurGrid(); + } +} + +void LLPanelPreferenceGrids::onClickDefault() +{ + if (mState == NORMAL) { + saveCurGrid(); + LLGridManager::getInstance()->setGridChoice(mCurGrid); + refresh(); + } +} + +void LLPanelPreferenceGrids::onClickAdd() +{ + std::string loginuri = getChild("loginuri",true)->getText(); + + mState = NORMAL; + getChild("btn_add", true)->setVisible(false); + + if(loginuri != "") { + GridEntry* grid_entry = new GridEntry; + grid_entry->grid = LLSD::emptyMap(); + grid_entry->grid[GRID_VALUE] = loginuri; + grid_entry->set_current = false; + grid_entry->mOnDoneCallback = boost::bind(&LLPanelPreferenceGrids::loadCurGrid, this); + LLGridManager::getInstance()->addGrid(grid_entry, LLGridManager::FETCH); + } + else { + loadCurGrid(); + } +} + +void LLPanelPreferenceGrids::onClickHelpRenderCompat() +{ + //LLNotificationsUtil::add("HelpRenderCompat"); +} + +void LLPanelPreferenceGrids::onClickAdvanced() +{ + if(getChildView("loginpage_label")->getVisible()) + { + getChildView("loginpage_label")->setVisible(false); + getChildView("loginpage")->setVisible(false); + getChildView("helperuri_label")->setVisible(false); + getChildView("helperuri")->setVisible(false); + getChildView("website_label")->setVisible(false); + getChildView("website")->setVisible(false); + getChildView("support_label")->setVisible(false); + getChildView("support")->setVisible(false); + getChildView("register_label")->setVisible(false); + getChildView("register")->setVisible(false); + getChildView("password_label")->setVisible(false); + getChildView("password")->setVisible(false); + getChildView("search_label")->setVisible(false); + getChildView("search")->setVisible(false); + //getChildView("render_compat")->setVisible(false); + //getChildView("btn_help_render_compat")->setVisible(false); + } + else + { + getChildView("loginpage_label")->setVisible(true); + getChildView("loginpage")->setVisible(true); + getChildView("helperuri_label")->setVisible(true); + getChildView("helperuri")->setVisible(true); + getChildView("website_label")->setVisible(true); + getChildView("website")->setVisible(true); + getChildView("support_label")->setVisible(true); + getChildView("support")->setVisible(true); + getChildView("register_label")->setVisible(true); + getChildView("register")->setVisible(true); + getChildView("password_label")->setVisible(true); + getChildView("password")->setVisible(true); + getChildView("search_label")->setVisible(true); + getChildView("search")->setVisible(true); + //getChildView("render_compat")->setVisible(true); + //getChildView("btn_help_render_compat")->setVisible(true); + } +} + +void LLPanelPreferenceGrids::onSelectGrid() +{ + std::string newGrid = m_GridCombo->getSelectedItemLabel(); + + if (!saveCurGrid()) { + m_GridCombo->setCurrentByIndex(m_GridCombo->getItemCount() - 1); + return; + } + + mCurGrid = LLGridManager::getInstance()->getGridByLabel(newGrid); + + if(mState != NORMAL) mState = NORMAL; + loadCurGrid(); +} + +void LLPanelPreferenceGrids::loadCurGrid() +{ + LLSD grid_info; + LLGridManager::getInstance()->getGridData(mCurGrid, grid_info); + + if (mState != ADD_NEW) { + getChild("gridname", true)->setText(grid_info[GRID_LABEL_VALUE].asString()); + getChild("loginuri",true)->setText(grid_info[GRID_LOGIN_URI_VALUE][0].asString()); + getChild("loginpage",true)->setText(grid_info[GRID_LOGIN_PAGE_VALUE].asString()); + getChild("helperuri",true)->setText(grid_info[GRID_HELPER_URI_VALUE].asString()); + getChild("website",true)->setText(grid_info["about"].asString()); + getChild("support",true)->setText(grid_info["help"].asString()); + getChild("register",true)->setText(grid_info[GRID_REGISTER_NEW_ACCOUNT].asString()); + getChild("password",true)->setText(grid_info[GRID_FORGOT_PASSWORD].asString()); + getChild("search",true)->setText(grid_info["search"].asString()); + getChild("gridmessage",true)->setText(grid_info["message"].asString()); + getChild("btn_add", true)->setVisible(false); + //getChild("render_compat",true)->set(gridInfo->isRenderCompat()); + } else { + std::string empty = ""; + getChild("gridname",true)->setText(empty); + getChild("loginuri",true)->setText(empty); + getChild("loginpage",true)->setText(empty); + getChild("helperuri",true)->setText(empty); + getChild("website",true)->setText(empty); + getChild("support",true)->setText(empty); + getChild("register",true)->setText(empty); + getChild("password",true)->setText(empty); + getChild("search",true)->setText(empty); + getChild("gridmessage",true)->setText(empty); + //getChild("render_compat",true)->setEnabled(true); + //getChild("render_compat",true)->set(true); + } + + if (mState == ADD_NEW) { + std::string required = ""; + getChild("btn_add", true)->setVisible(true); + getChild("loginuri",true)->setText(required); + } else if (mState == ADD_COPY) { + getChild("gridname",true)->setText(std::string("")); + } else if (mState != NORMAL) { + llwarns << "Illegal state " << mState << '.' << llendl; + } + + refresh(); +} + +bool LLPanelPreferenceGrids::saveCurGrid() +{ + LLGridManager::getInstance()->saveGridList(); + refresh(); + return true; +} + +void LLPanelPreferenceGrids::refresh() +{ + const std::string &defaultGrid = LLGridManager::getInstance()->getGridLabel(); + + S32 selectIndex = -1, i = 0; + m_GridCombo->removeall(); + if (defaultGrid != "") { + m_GridCombo->add(defaultGrid); + selectIndex = i++; + } + + std::map known_grids = LLGridManager::getInstance()->getKnownGrids(!gSavedSettings.getBOOL("ShowBetaGrids")); + for (std::map::iterator grid_choice = known_grids.begin(); + grid_choice != known_grids.end(); + grid_choice++) + { + const std::string &grid = grid_choice->second; + if (!grid.empty() && grid != defaultGrid) + { + m_GridCombo->add(grid); + if (LLGridManager::getInstance()->getGridByLabel(grid) == mCurGrid) selectIndex = i; + i++; + } + } + + if ((mState == ADD_NEW) || (mState == ADD_COPY)) { + m_GridCombo->add(""); + selectIndex = i++; + } + if (selectIndex >= 0) { + m_GridCombo->setCurrentByIndex(selectIndex); + } else { + m_GridCombo->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label + } + + getChild("default_grid", true)->setTextArg("[DEFAULT]", (defaultGrid != "")? defaultGrid: " "); + + getChild("btn_delete", true)->setEnabled((selectIndex >= 0)); + //getChild("btn_copy", true)->setEnabled((mState == NORMAL) && (selectIndex >= 0)); + getChild("btn_default", true)->setEnabled((mState == NORMAL) && (selectIndex > 0)); + getChild("gridname", true)->setEnabled((mState == ADD_NEW) || (mState == ADD_COPY)); + + /* old, todo + if (LLGridManager::getInstance()->isInSLMain() || LLGridManager::getInstance()->isInSLBeta()) { + // disable platform selector, if logged into the grid edited and it is SL + // so object export restrictions cannot be circumvented by changing the platform + bool enablePlatform = (LLStartUp::getStartupState() < STATE_LOGIN_CLEANUP) || + (mCurGrid != LLGridManager::getInstance()->getGrid()); + childSetEnabled("platform", enablePlatform); + childSetEnabled("search", false); + childSetText("search", LLStringExplicit("")); + childSetEnabled("render_compat", false); + childSetValue("render_compat", false); + } else { + childSetEnabled("platform", true); + childSetEnabled("search", true); + childSetText("search", LLGridManager::getInstance()->getSearchUrl()); + childSetEnabled("render_compat", true); + } + */ +} + +void LLPanelPreferenceGrids::reset() +{ + mState = NORMAL; + mCurGrid = LLGridManager::getInstance()->getGrid(); + loadCurGrid(); +} diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 583d4de848..ed6a4a1893 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -328,5 +328,37 @@ private: }; +class LLPanelPreferenceGrids : public LLPanelPreference +{ +public: + LLPanelPreferenceGrids(); + + /*virtual*/ BOOL postBuild(); + /*virtual*/ void apply(); + /*virtual*/ void cancel(); +protected: + void onClickDelete(); + void onClickNew(); + void onClickCopy(); + void onClickDefault(); + void onClickAdd(); + void onClickHelpRenderCompat(); + void onClickAdvanced(); + void onSelectGrid(); + void onSelectPlatform(); + +protected: + LLComboBox* m_GridCombo; + +private: + enum State { NORMAL, ADD_NEW, ADD_COPY }; + State mState; + std::string mCurGrid; + + void loadCurGrid(); + bool saveCurGrid(); + void refresh(); + void reset(); +}; #endif // LL_LLPREFERENCEFLOATER_H diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp index 6b88569428..a0fcd8dc45 100644 --- a/indra/newview/llfloaterproperties.cpp +++ b/indra/newview/llfloaterproperties.cpp @@ -55,6 +55,7 @@ #include "llviewercontrol.h" #include "llviewerwindow.h" #include "llgroupactions.h" +#include "llviewernetwork.h" #include "lluictrlfactory.h" @@ -553,6 +554,8 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item) comboSaleType->setCurrentByIndex(-1); getChild("Edit Cost")->setValue(llformat("%d",0)); } + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + getChild("CurrencySymbol")->setTextArg("[CUR]", type_currency); } void LLFloaterProperties::onClickCreator() diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index a5557d8461..e9daa9be02 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -91,6 +91,7 @@ #include "lltrans.h" #include "llagentui.h" #include "llmeshrepository.h" +#include "llviewernetwork.h" const S32 TERRAIN_TEXTURE_COUNT = 4; const S32 CORNER_COUNT = 4; @@ -1390,6 +1391,10 @@ void LLPanelEstateInfo::onClickAddAllowedGroup() } LLNotification::Params params("ChangeLindenAccess"); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + LLSD args; + args["CUR"] = type_currency; + params.substitutions(args); params.functor.function(boost::bind(&LLPanelEstateInfo::addAllowedGroup, this, _1, _2)); if (isLindenEstate()) { @@ -1627,6 +1632,10 @@ void LLPanelEstateInfo::accessAddCore(U32 operation_flag, const std::string& dia // agent id filled in after avatar picker LLNotification::Params params("ChangeLindenAccess"); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + LLSD args; + args["CUR"] = type_currency; + params.substitutions(args); params.payload(payload) .functor.function(accessAddCore2); @@ -1755,6 +1764,10 @@ void LLPanelEstateInfo::accessRemoveCore(U32 operation_flag, const std::string& } LLNotification::Params params("ChangeLindenAccess"); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + LLSD args; + args["CUR"] = type_currency; + params.substitutions(args); params.payload(payload) .functor.function(accessRemoveCore2); @@ -3414,6 +3427,7 @@ void LLPanelEnvironmentInfo::onBtnApply() // Start spinning the progress indicator. setApplyProgress(true); + refresh(); } void LLPanelEnvironmentInfo::onBtnCancel() diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index b9eb590b77..16995a141b 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -180,6 +180,8 @@ BOOL LLFloaterReporter::postBuild() std::string reporter = LLSLURL("agent", gAgent.getID(), "inspect").getSLURLString(); getChild("reporter_field")->setValue(reporter); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + getChild("Fraud__L$")->setLabelArg("[CUR]", type_currency); center(); return TRUE; diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index ed68d259bc..5c4cf4c319 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -38,6 +38,7 @@ #include "llui.h" #include "llviewercontrol.h" #include "llweb.h" +#include "llviewernetwork.h" // support secondlife:///app/search/{CATEGORY}/{QUERY} SLapps class LLSearchHandler : public LLCommandHandler @@ -101,6 +102,17 @@ LLFloaterSearch::LLFloaterSearch(const Params& key) : mCategoryPaths["wiki"] = "search/wiki"; mCategoryPaths["destinations"] = "destinations"; mCategoryPaths["classifieds"] = "classifieds"; + if(LLGridManager::getInstance()->isInSLMain() || LLGridManager::getInstance()->isInSLBeta()) return; + + //if not in sl + mCategoryPaths["all"] = "Any Category"; + mCategoryPaths["people"] = "People"; + mCategoryPaths["places"] = "Places"; + mCategoryPaths["events"] = "Events"; + mCategoryPaths["groups"] = "Groups"; + mCategoryPaths["wiki"] = "Wiki"; + mCategoryPaths["destinations"] = "Destinations"; + mCategoryPaths["classifieds"] = "Classifieds"; } BOOL LLFloaterSearch::postBuild() @@ -198,8 +210,26 @@ void LLFloaterSearch::search(const SearchQuery &p) subs["GODLIKE"] = gAgent.isGodlike() ? "1" : "0"; // get the search URL and expand all of the substitutions - // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) std::string url = gSavedSettings.getString("SearchURL"); + + //if not in sl + if(!(LLGridManager::getInstance()->isInSLMain() || LLGridManager::getInstance()->isInSLBeta())) { + //new sl type search + //http://search.secondlife.com/viewer/[CATEGORY]/?q=[QUERY]&p=[AUTH_TOKEN]&r=[MATURITY]&lang=[LANGUAGE]&sid=[SESSION_ID] + + //old sl type search + opensim search + //(query) "q=[QUERY]&s=[COLLECTION]&" //[COLLECTION] == [CATEGORY] ? + //(template) "lang=[LANG]&mat=[MATURITY]&t=[TEEN]®ion=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION]" //still not used in opensim and aurora + + LLSD grid_info; + LLGridManager::getInstance()->getGridData(grid_info); + if(grid_info.has(GRID_SEARCH)) { + url = grid_info[GRID_SEARCH].asString(); + if(url.length() > 0 && url[url.length()-1] != '?') url += "?"; + url += "q=[QUERY]&s=[CATEGORY]&"; + } + } + // (also adds things like [LANGUAGE], [VERSION], [OS], etc.) url = LLWeb::expandURLSubstitutions(url, subs); // and load the URL in the web view diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 3434841d09..ab1cf11f41 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -42,6 +42,7 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" #include "lltrans.h" +#include "llviewernetwork.h" class LLAvatarName; @@ -161,9 +162,11 @@ void LLFloaterSellLandUI::SelectionObserver::changed() BOOL LLFloaterSellLandUI::postBuild() { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); childSetCommitCallback("sell_to", onChangeValue, this); childSetCommitCallback("price", onChangeValue, this); getChild("price")->setPrevalidate(LLTextValidate::validateNonNegativeS32); + getChild("price_ld")->setTextArg("[CUR]", type_currency); childSetCommitCallback("sell_objects", onChangeValue, this); childSetAction("sell_to_select_agent", boost::bind( &LLFloaterSellLandUI::doSelectAgent, this)); childSetAction("cancel_btn", doCancel, this); @@ -280,6 +283,8 @@ void LLFloaterSellLandUI::refreshUI() { F32 per_meter_price = 0; per_meter_price = F32(mParcelPrice) / F32(mParcelActualArea); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + getChild("price_per_m")->setTextArg("[CUR]", type_currency); getChild("price_per_m")->setTextArg("[PER_METER]", llformat("%0.2f", per_meter_price)); getChildView("price_per_m")->setVisible(TRUE); @@ -465,14 +470,19 @@ void LLFloaterSellLandUI::doSellLand(void *userdata) && (sale_price == 0) && sell_to_anyone) { - LLNotificationsUtil::add("SalePriceRestriction"); + LLSD args; + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + args["CUR"] = type_currency; + LLNotificationsUtil::add("SalePriceRestriction", args); return; } + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLSD args; args["LAND_SIZE"] = llformat("%d",area); args["SALE_PRICE"] = llformat("%d",sale_price); args["NAME"] = authorizedBuyerName; + args["CUR"] = type_currency; LLNotification::Params params("ConfirmLandSaleChange"); params.substitutions(args) diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 8b296e588c..7c0a4621f7 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -90,6 +90,8 @@ #include "qtoolalign.h" #include "llselectmgr.h" #include "llmeshrepository.h" +#include "llviewernetwork.h" +#include "llspinctrl.h" // Globals LLFloaterTools *gFloaterTools = NULL; @@ -337,6 +339,14 @@ BOOL LLFloaterTools::postBuild() gSavedSettings.setBOOL("FSToolboxExpanded", TRUE); } + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + std::string type_currency_label = "Price: " + type_currency; + + //getChild("Edit Cost")->setLabelArg("[CUR]", type_currency); //setLabelArg is not inplemented properly in spinners + getChild("Edit Cost")->setLabel(type_currency_label); + getChild("Cost Default")->setTextArg("[CUR]", type_currency); + getChild("Cost Total")->setTextArg("[CUR]", type_currency); + getChild("Cost Per Unit")->setTextArg("[CUR]", type_currency); return TRUE; } diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index 0d05baa8e8..cb93deaf3a 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -40,6 +40,7 @@ #include "llnotificationsutil.h" #include "llstatusbar.h" // can_afford_transaction() #include "llimfloater.h" +#include "llviewernetwork.h" //-TT ShowGroupFloaters #include "llpanelgroup.h" //-TT @@ -183,8 +184,10 @@ void LLGroupActions::join(const LLUUID& group_id) { S32 cost = gdatap->mMembershipFee; LLSD args; + std::string type_currency = LLGridManager::getInstance()->getCurrency(); args["COST"] = llformat("%d", cost); args["NAME"] = gdatap->mName; + args["CUR"] = type_currency; LLSD payload; payload["group_id"] = group_id; diff --git a/indra/newview/llinspectgroup.cpp b/indra/newview/llinspectgroup.cpp index 76617b55bf..3b35ee1ef8 100644 --- a/indra/newview/llinspectgroup.cpp +++ b/indra/newview/llinspectgroup.cpp @@ -41,6 +41,7 @@ #include "lltooltip.h" // positionViewNearMouse() #include "lltrans.h" #include "lluictrl.h" +#include "llviewernetwork.h" class LLFetchGroupData; @@ -267,11 +268,13 @@ void LLInspectGroup::processGroupData() } else { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); std::string amount = LLResMgr::getInstance()->getMonetaryString( data->mMembershipFee); LLStringUtil::format_map_t args; args["[AMOUNT]"] = amount; + args["[CUR]"] = type_currency; cost = getString("CostToJoin", args); } } diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp index 374347758b..d9bf094d19 100644 --- a/indra/newview/llinspectobject.cpp +++ b/indra/newview/llinspectobject.cpp @@ -55,6 +55,7 @@ #include "lltrans.h" #include "llui.h" // positionViewNearMouse() #include "lluictrl.h" +#include "llviewernetwork.h" // [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0c) @@ -188,6 +189,8 @@ BOOL LLInspectObject::postBuild(void) LLSelectMgr::getInstance()->mUpdateSignal.connect( boost::bind(&LLInspectObject::update, this) ); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + getChild("pay_btn")->setToolTipArg(std::string("[CUR]"), type_currency); return TRUE; } @@ -558,11 +561,15 @@ void LLInspectObject::updatePrice(LLSelectNode* nodep) else if (for_sale) { LLStringUtil::format_map_t args; + std::string type_currency = LLGridManager::getInstance()->getCurrency(); args["[AMOUNT]"] = LLResMgr::getInstance()->getMonetaryString(price); + args["[CUR]"] = type_currency; line = getString("Price", args); show_price_icon = true; } + std::string type_currency = LLGridManager::getInstance()->getCurrency(); getChild("price_text")->setValue(line); + getChild("price_symbol")->setTextArg("[CUR]", type_currency); getChild("price_icon")->setVisible(show_price_icon); } diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 644aae534a..92db9d706e 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -55,6 +55,8 @@ #include "lltrans.h" #include "llscrollcontainer.h" #include "llstatusbar.h" +#include "llviewernetwork.h" +#include "llspinctrl.h" const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$ @@ -163,6 +165,8 @@ BOOL LLPanelClassifiedInfo::postBuild() mSnapshotCtrl = getChild("classified_snapshot"); mSnapshotRect = getDefaultSnapshotRect(); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + getChild("price_for_listing")->setLabel(type_currency); return TRUE; } @@ -279,7 +283,9 @@ void LLPanelClassifiedInfo::processProperties(void* data, EAvatarProcessorType t getString("auto_renew_on") : getString("auto_renew_off"); getChild("auto_renew")->setValue(auto_renew_str); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); price_str.setArg("[PRICE]", llformat("%d", c_info->price_for_listing)); + price_str.setArg("[CUR]", type_currency); getChild("price_for_listing")->setValue(LLSD(price_str)); std::string date_str = date_fmt; @@ -1149,6 +1155,8 @@ BOOL LLPublishClassifiedFloater::postBuild() childSetAction("publish_btn", boost::bind(&LLFloater::closeFloater, this, false)); childSetAction("cancel_btn", boost::bind(&LLFloater::closeFloater, this, false)); + std::string type_currency = "Price: " + LLGridManager::getInstance()->getCurrency(); + getChild("price_for_listing")->setLabel(type_currency); return TRUE; } diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index a94f7f9147..004004c454 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -52,6 +52,7 @@ #include "llaccordionctrltab.h" #include "llaccordionctrl.h" +#include "llviewernetwork.h" #include "lltrans.h" //-TT - Patch : ShowGroupFloaters @@ -215,7 +216,9 @@ BOOL LLPanelGroup::postBuild() mButtonJoin = button; mButtonJoin->setCommitCallback(boost::bind(&LLPanelGroup::onBtnJoin,this)); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); mJoinText = panel_general->getChild("join_cost_text"); + mJoinText->setTextArg("[CUR]", type_currency); } LLVoiceClient::getInstance()->addObserver(this); @@ -368,7 +371,9 @@ void LLPanelGroup::update(LLGroupChange gc) std::string fee_buff; if(gdatap->mMembershipFee) { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); string_args["[AMOUNT]"] = llformat("%d", gdatap->mMembershipFee); + string_args["[CUR]"] = type_currency; fee_buff = getString("group_join_btn", string_args); } diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp index 4e368d0986..dc4b0505f2 100644 --- a/indra/newview/llpanelgroupgeneral.cpp +++ b/indra/newview/llpanelgroupgeneral.cpp @@ -50,6 +50,7 @@ #include "lltexturectrl.h" #include "lltrans.h" #include "llviewerwindow.h" +#include "llviewernetwork.h" // for copy URI button #include "llclipboard.h" @@ -144,7 +145,9 @@ BOOL LLPanelGroupGeneral::postBuild() mCtrlEnrollmentFee->setCommitCallback(onCommitEnrollment, this); } + std::string type_currency = LLGridManager::getInstance()->getCurrency(); mSpinEnrollmentFee = getChild("spin_enrollment_fee", recurse); + mSpinEnrollmentFee->setLabel(type_currency); if (mSpinEnrollmentFee) { mSpinEnrollmentFee->setCommitCallback(onCommitAny, this); @@ -379,7 +382,10 @@ bool LLPanelGroupGeneral::apply(std::string& mesg) return false; } - LLNotificationsUtil::add("CreateGroupCost", LLSD(), LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); + LLSD args; + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + args["CUR"] = type_currency; + LLNotificationsUtil::add("CreateGroupCost", args, LLSD(), boost::bind(&LLPanelGroupGeneral::createGroupCallback, this, _1, _2)); return false; } diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp index 363443646d..79f4cc1efa 100644 --- a/indra/newview/llpanelgrouplandmoney.cpp +++ b/indra/newview/llpanelgrouplandmoney.cpp @@ -54,6 +54,7 @@ #include "llstatusbar.h" #include "llfloaterworldmap.h" #include "llviewermessage.h" +#include "llviewernetwork.h" static LLRegisterPanelClassWrapper t_panel_group_money("panel_group_land_money"); @@ -665,6 +666,8 @@ BOOL LLPanelGroupLandMoney::postBuild() bool can_view = gAgent.isInGroup(mGroupID); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + this->setLabelArg("[CUR]", type_currency); mImplementationp->mGroupOverLimitIconp = getChild("group_over_limit_icon"); mImplementationp->mGroupOverLimitTextp = @@ -803,6 +806,7 @@ BOOL LLPanelGroupLandMoney::postBuild() loading_text); } + getChild("group_money_heading")->setTextArg("[CUR]", type_currency); return LLPanelGroupTab::postBuild(); } @@ -1445,9 +1449,10 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg, substitution["datetime"] = LLDateUtil::secondsSinceEpochFromString("%Y-%m-%d", next_stipend_date); LLStringUtil::format (time_str, substitution); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); text.append(time_str); text.append(".\n\n"); - text.append(llformat("%-23sL$%6d\n", LLTrans::getString("GroupMoneyBalance").c_str(), balance )); + text.append(llformat("%-23s%s%6d\n", LLTrans::getString("GroupMoneyBalance").c_str(), type_currency.c_str(), balance )); text.append(1, '\n'); } diff --git a/indra/newview/llpanelland.cpp b/indra/newview/llpanelland.cpp index 70ea290500..fbed3cb382 100644 --- a/indra/newview/llpanelland.cpp +++ b/indra/newview/llpanelland.cpp @@ -43,6 +43,7 @@ #include "roles_constants.h" #include "lluictrlfactory.h" +#include "llviewernetwork.h" // [RLVa:KB] #include "rlvhandler.h" @@ -210,6 +211,8 @@ void LLPanelLandInfo::refresh() &dwell); if(is_public || (is_for_sale && LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected())) { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + getChild("label_area_price")->setTextArg("[CUR]", type_currency); getChild("label_area_price")->setTextArg("[PRICE]", llformat("%d",claim_price)); getChild("label_area_price")->setTextArg("[AREA]", llformat("%d",area)); getChildView("label_area_price")->setVisible(true); diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index 84254a265a..a3f54518f9 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -68,6 +68,7 @@ #include "lltrans.h" #include "llglheaders.h" #include "llpanelloginlistener.h" +#include "lltabcontainer.h" #include "fsdata.h" @@ -178,6 +179,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, childSetAction("delete_saved_login_btn", onClickDelete, this); childSetAction("connect_btn", onClickConnect, this); + childSetAction("grids_btn", onClickGrids, this); getChild("login")->setDefaultBtn("connect_btn"); @@ -889,7 +891,16 @@ void LLPanelLogin::loadLoginPage() curl_free(curl_version); // Grid - char* curl_grid = curl_escape(LLGridManager::getInstance()->getGridLabel().c_str(), 0); + char* curl_grid; + if(LLGridManager::getInstance()->isInSLMain()) { + curl_grid = curl_escape("Agni", 0); + } + else if(LLGridManager::getInstance()->isInSLBeta()) { + curl_grid = curl_escape("Aditi", 0); + } + else { + curl_grid = curl_escape(LLGridManager::getInstance()->getGridLabel().c_str(), 0); + } oStr << "&grid=" << curl_grid; curl_free(curl_grid); @@ -1086,6 +1097,24 @@ void LLPanelLogin::onClickDelete(void*) } } +//static +void LLPanelLogin::onClickGrids(void*) +{ + // bring up the prefs floater + LLFloaterPreference* prefsfloater = dynamic_cast(LLFloaterReg::showInstance("preferences")); + if (prefsfloater) + { + // grab the 'grids' panel from the preferences floater and + // bring it the front! + LLTabContainer* tabcontainer = prefsfloater->getChild("pref core"); + LLPanel* gridspanel = prefsfloater->getChild("grids"); + if (tabcontainer && gridspanel) + { + tabcontainer->selectTabPanel(gridspanel); + } + } +} + // static void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) { diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index eee625da69..ecee916b00 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -97,6 +97,7 @@ private: static void onClickForgotPassword(void*); static void onClickHelp(void*); static void onClickDelete(void*); + static void onClickGrids(void*); static void onPassKey(LLLineEditor* caller, void* user_data); static void onSelectServer(LLUICtrl*, void*); static void onSelectSavedLogin(LLUICtrl*, void*); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index f130b3427a..be0afc74a3 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -54,6 +54,7 @@ #include "llviewermenu.h" #include "llviewertexturelist.h" #include "llsidepanelinventory.h" +#include "llviewernetwork.h" const std::string FILTERS_FILENAME("filters.xml"); @@ -284,6 +285,12 @@ BOOL LLPanelMainInventory::postBuild() mMenuAdd->getChild("Upload Animation")->setLabelArg("[COST]", upload_cost); mMenuAdd->getChild("Bulk Upload")->setLabelArg("[COST]", upload_cost); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + mMenuAdd->getChild("Upload Image")->setLabelArg("[CUR]", type_currency); + mMenuAdd->getChild("Upload Sound")->setLabelArg("[CUR]", type_currency); + mMenuAdd->getChild("Upload Animation")->setLabelArg("[CUR]", type_currency); + mMenuAdd->getChild("Bulk Upload")->setLabelArg("[CUR]", type_currency); + // Trigger callback for focus received so we can deselect items in inbox/outbox LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMainInventory::onFocusReceived, this)); @@ -1592,6 +1599,12 @@ void LLPanelMainInventory::setUploadCostIfNeeded() upload_menu->getChild("Upload Sound")->setLabelArg("[COST]", cost_str); upload_menu->getChild("Upload Animation")->setLabelArg("[COST]", cost_str); upload_menu->getChild("Bulk Upload")->setLabelArg("[COST]", cost_str); + + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + upload_menu->getChild("Upload Image")->setLabelArg("[CUR]", type_currency); + upload_menu->getChild("Upload Sound")->setLabelArg("[CUR]", type_currency); + upload_menu->getChild("Upload Animation")->setLabelArg("[CUR]", type_currency); + upload_menu->getChild("Bulk Upload")->setLabelArg("[CUR]", type_currency); } } } diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index e54e4f63b8..4124bcf15a 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -65,6 +65,7 @@ #include "llviewerregion.h" #include "llviewerobjectlist.h" #include "llviewermessage.h" +#include "llviewernetwork.h" // [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a) #include "rlvhandler.h" #include "rlvlocks.h" @@ -224,9 +225,11 @@ void LLTaskInvFVBridge::buyItem() } else { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLSD args; args["PRICE"] = llformat("%d",sale_info.getSalePrice()); args["OWNER"] = owner_name; + args["CUR"] = type_currency; if (sale_info.getSaleType() != LLSaleInfo::FS_CONTENTS) { U32 next_owner_mask = perm.getMaskNextOwner(); @@ -664,8 +667,10 @@ void LLTaskInvFVBridge::performAction(LLInventoryModel* model, std::string actio { if (price > 0 && price > gStatusBar->getBalance()) { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", price); + args["CUR"] = type_currency; LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_costs", args), price ); } else @@ -711,8 +716,11 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + LLSD args; + args["CUR"] = type_currency; std::ostringstream info; - info << LLTrans::getString("BuyforL$") << price; + info << LLTrans::getString("BuyforL$",args) << price; label.assign(info.str()); } @@ -1056,8 +1064,11 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + LLSD args; + args["CUR"] = type_currency; std::ostringstream info; - info << LLTrans::getString("BuyforL$") << price; + info << LLTrans::getString("BuyforL$",args) << price; label.assign(info.str()); } @@ -1428,8 +1439,11 @@ void LLTaskMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } else { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + LLSD args; + args["CUR"] = type_currency; std::ostringstream info; - info << LLTrans::getString("BuyforL$") << price; + info << LLTrans::getString("BuyforL$",args) << price; label.assign(info.str()); } diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 77df65c54c..1a9723ac95 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -62,6 +62,7 @@ #include "llspinctrl.h" #include "roles_constants.h" #include "llgroupactions.h" +#include "llviewernetwork.h" // [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) #include "llslurl.h" #include "rlvhandler.h" @@ -983,7 +984,10 @@ bool callback_deed_to_group(const LLSD& notification, const LLSD& response) void LLPanelPermissions::onClickDeedToGroup(void* data) { - LLNotificationsUtil::add( "DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + LLSD args; + args["CUR"] = type_currency; + LLNotificationsUtil::add( "DeedObjectToGroup", args, LLSD(), callback_deed_to_group); } ///---------------------------------------------------------------------------- diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 917db44af6..b259bde6d4 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -52,6 +52,7 @@ #include "llviewercontrol.h" #include "llviewerparcelmgr.h" #include "llviewerregion.h" +#include "llviewernetwork.h" // [RLVa:KB] - Checked: 2010-09-02 (RLVa-1.2.1b) #include "rlvhandler.h" // [/RLVa:KB] @@ -543,7 +544,9 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, mForSalePanel->setVisible(for_sale); - const U8* sign = (U8*)getString("price_text").c_str(); + //const U8* sign = (U8*)getString("price_text").c_str(); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + const U8* sign = (U8*)type_currency.c_str(); const U8* sqm = (U8*)getString("area_text").c_str(); mSalesPriceText->setText(llformat("%s%d ", sign, parcel->getSalePrice())); @@ -633,8 +636,10 @@ void LLPanelPlaceProfile::onForSaleBannerClick() if(price - gStatusBar->getBalance() > 0) { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", price); + args["CUR"] = type_currency; LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("buying_selected_land", args), price ); } else diff --git a/indra/newview/llpanelsnapshotinventory.cpp b/indra/newview/llpanelsnapshotinventory.cpp index b0a2a9441b..616637ca34 100644 --- a/indra/newview/llpanelsnapshotinventory.cpp +++ b/indra/newview/llpanelsnapshotinventory.cpp @@ -34,6 +34,7 @@ #include "llfloatersnapshot.h" // FIXME: replace with a snapshot storage model #include "llpanelsnapshot.h" #include "llviewercontrol.h" // gSavedSettings +#include "llviewernetwork.h" /** * The panel provides UI for saving snapshot as an inventory texture. @@ -81,7 +82,9 @@ BOOL LLPanelSnapshotInventory::postBuild() // virtual void LLPanelSnapshotInventory::onOpen(const LLSD& key) { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); getChild("hint_lbl")->setTextArg("[UPLOAD_COST]", llformat("%d", LLGlobalEconomy::Singleton::getInstance()->getPriceUpload())); + getChild("hint_lbl")->setTextArg("[CUR]", type_currency); LLPanelSnapshot::onOpen(key); } diff --git a/indra/newview/llpanelsnapshotoptions.cpp b/indra/newview/llpanelsnapshotoptions.cpp index e1f6a3f9ce..0cf7e3a1e3 100644 --- a/indra/newview/llpanelsnapshotoptions.cpp +++ b/indra/newview/llpanelsnapshotoptions.cpp @@ -29,6 +29,7 @@ #include "lleconomy.h" #include "llpanel.h" #include "llsidetraypanelcontainer.h" +#include "llviewernetwork.h" #include "llfloatersnapshot.h" // FIXME: create a snapshot model @@ -83,8 +84,10 @@ void LLPanelSnapshotOptions::onOpen(const LLSD& key) void LLPanelSnapshotOptions::updateUploadCost() { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); getChild("save_to_inventory_btn")->setLabelArg("[AMOUNT]", llformat("%d", upload_cost)); + getChild("save_to_inventory_btn")->setLabelArg("[CUR]", type_currency); } void LLPanelSnapshotOptions::openPanel(const std::string& panel_name) diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index c2928d30fa..84cc035adf 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -43,6 +43,8 @@ #include "llviewercontrol.h" #include "llviewerinventory.h" #include "llviewerobjectlist.h" +#include "llspinctrl.h" +#include "llviewernetwork.h" // [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) #include "rlvhandler.h" // [/RLVa:KB] @@ -177,6 +179,8 @@ BOOL LLSidepanelItemInfo::postBuild() getChild("CheckPurchase")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this)); // "Price" label for edit getChild("Edit Cost")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitSaleInfo, this)); + std::string type_currency = "Price: " + LLGridManager::getInstance()->getCurrency(); + getChild("Edit Cost")->setLabel(type_currency); refresh(); return TRUE; } diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp index afc261816c..399f0e6490 100644 --- a/indra/newview/llsidepaneltaskinfo.cpp +++ b/indra/newview/llsidepaneltaskinfo.cpp @@ -61,6 +61,7 @@ #include "llspinctrl.h" #include "roles_constants.h" #include "llgroupactions.h" +#include "llviewernetwork.h" // [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) #include "llslurl.h" #include "rlvhandler.h" @@ -935,7 +936,10 @@ static bool callback_deed_to_group(const LLSD& notification, const LLSD& respons void LLSidepanelTaskInfo::onClickDeedToGroup(void *data) { - LLNotificationsUtil::add("DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + LLSD args; + args["CUR"] = type_currency; + LLNotificationsUtil::add("DeedObjectToGroup", args, LLSD(), callback_deed_to_group); } ///---------------------------------------------------------------------------- diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 2c61ed84b2..33ca5c5c85 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -68,6 +68,7 @@ #include "llviewerparcelmgr.h" #include "llviewerthrottle.h" #include "lluictrlfactory.h" +#include "llviewernetwork.h" #include "llagentui.h" #include "llclipboard.h" @@ -507,9 +508,14 @@ void LLStatusBar::setBalance(S32 balance) LLStringUtil::format_map_t string_args; string_args["[AMT]"] = llformat("%s", money_str.c_str()); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + string_args["[CUR]"] = llformat("%s", type_currency.c_str()); std::string label_str = getString("buycurrencylabel", string_args); mBoxBalance->setValue(label_str); + getChild("buyL")->setLabelArg("[CUR]", type_currency); + getChild("buyL")->setToolTipArg(std::string("[CUR]"), type_currency); + getChild("balance")->setToolTipArg(std::string("[CUR]"), type_currency); // Resize the L$ balance background to be wide enough for your balance plus the buy button { const S32 HPAD = 24; diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index e98c2fb659..561064bb79 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -68,6 +68,7 @@ #include "llviewermedia.h" #include "llvoavatarself.h" #include "llviewermediafocus.h" +#include "llviewernetwork.h" #include "llworld.h" #include "llui.h" #include "llweb.h" @@ -974,9 +975,11 @@ BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) if (hover_parcel && hover_parcel->getParcelFlag(PF_FOR_SALE)) { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLStringUtil::format_map_t args; S32 price = hover_parcel->getSalePrice(); args["[AMOUNT]"] = LLResMgr::getInstance()->getMonetaryString(price); + args["[CUR]"] = type_currency; line = LLTrans::getString("TooltipForSaleL$", args); tooltip_msg.append(line); tooltip_msg.push_back('\n'); @@ -1135,9 +1138,11 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l bool for_sale = for_sale_selection(nodep); if(for_sale) { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLStringUtil::format_map_t args; S32 price = nodep->mSaleInfo.getSalePrice(); args["[AMOUNT]"] = LLResMgr::getInstance()->getMonetaryString(price); + args["[CUR]"] = type_currency; tooltip_msg.append(LLTrans::getString("TooltipPrice", args) ); } @@ -1206,7 +1211,8 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l } if (hover_object->flagTakesMoney() || (parentobject && parentobject->flagTakesMoney())) { - permissionsline += LLTrans::getString("TooltipFlagL$") + " "; + permissionsline += LLGridManager::getInstance()->getCurrency(); + //permissionsline += LLTrans::getString("TooltipFlagL$") + " "; } if (hover_object->flagAllowInventoryAdd()) { diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index bfb7231638..db97ad4cfc 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -115,6 +115,7 @@ #include "lltoolgrab.h" #include "llwindow.h" #include "boost/unordered_map.hpp" +#include "llviewernetwork.h" // [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a) #include "rlvhandler.h" #include "rlvlocks.h" @@ -547,6 +548,15 @@ void init_menus() gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", upload_cost); gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", upload_cost); gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", upload_cost); + + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + gMenuHolder->childSetLabelArg("Upload Image", "[CUR]", type_currency); + gMenuHolder->childSetLabelArg("Upload Sound", "[CUR]", type_currency); + gMenuHolder->childSetLabelArg("Upload Animation", "[CUR]", type_currency); + gMenuHolder->childSetLabelArg("Bulk Upload", "[CUR]", type_currency); + + gMenuHolder->childSetLabelArg("Buy and Sell L$", "[CUR]", type_currency); + gMenuHolder->childSetLabelArg("LindenXchange", "[CUR]", type_currency); gAFKMenu = gMenuBarView->getChild("Set Away", TRUE); gBusyMenu = gMenuBarView->getChild("Set Busy", TRUE); @@ -2813,6 +2823,38 @@ bool enable_object_open() return root->allowOpen(); } +bool enable_object_export() +{ + LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); + bool new_value = (object != NULL); + if (new_value) + { + /* + struct ff : public LLSelectedNodeFunctor + { + ff(const LLSD& data) : LLSelectedNodeFunctor(), userdata(data) + { + } + const LLSD& userdata; + virtual bool apply(LLSelectNode* node) + { + // Note: the actual permission checking algorithm depends on the grid TOS and must be + // performed for each prim and texture. This is done later in llviewerobjectbackup.cpp. + // This means that even if the item is enabled in the menu, the export may fail should + // the permissions not be met for each exported asset. The permissions check below + // therefore only corresponds to the minimal permissions requirement common to all grids. + LLPermissions *item_permissions = node->mPermissions; + return (gAgent.getID() == item_permissions->getOwner() && + (gAgent.getID() == item_permissions->getCreator() || + (item_permissions->getMaskOwner() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)); + } + }; + ff * the_ff = new ff(userdata); + new_value = LLSelectMgr::getInstance()->getSelection()->applyToNodes(the_ff, false); + */ + } + return new_value; +} class LLViewJoystickFlycam : public view_listener_t { @@ -5105,8 +5147,10 @@ void handle_buy_or_take() } else { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", total_price); + args["CUR"] = type_currency; LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString( "BuyingCosts", args ), total_price ); } } @@ -5228,11 +5272,13 @@ void show_buy_currency(const char* extra) } mesg << "Go to " << LLNotifications::instance().getGlobalString("BUY_CURRENCY_URL")<< "\nfor information on purchasing currency?"; */ + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLSD args; if (extra != NULL) { args["EXTRA"] = extra; } + args["CUR"] = type_currency; LLNotificationsUtil::add("PromptGoToCurrencyPage", args);//, LLSD(), callback_show_buy_currency); } @@ -5248,8 +5294,10 @@ void handle_buy() if (price > 0 && price > gStatusBar->getBalance()) { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", price); + args["CUR"] = type_currency; LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_object_costs", args), price ); return; } @@ -8987,8 +9035,11 @@ class LLUploadCostCalculator : public view_listener_t bool handleEvent(const LLSD& userdata) { + calculateCost(); std::string menu_name = userdata.asString(); gMenuHolder->childSetLabelArg(menu_name, "[COST]", mCostStr); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + gMenuHolder->childSetLabelArg(menu_name, "[CUR]", type_currency); return true; } @@ -9002,6 +9053,20 @@ public: } }; +class LLCurrencyTypeCheck : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string menu_name = userdata.asString(); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + gMenuHolder->childSetLabelArg(menu_name, "[CUR]", type_currency); + + return true; + } + +public: + LLCurrencyTypeCheck() {} +}; class LLToggleUIHints : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -9220,6 +9285,7 @@ void initialize_menus() enable.add("IsGodCustomerService", boost::bind(&is_god_customer_service)); view_listener_t::addEnable(new LLUploadCostCalculator(), "Upload.CalculateCosts"); + view_listener_t::addEnable(new LLCurrencyTypeCheck(), "Currency.TypeCheck"); commit.add("Inventory.NewWindow", boost::bind(&LLFloaterInventory::showAgentInventory)); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index d999085187..2487fff97c 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -61,6 +61,7 @@ #include "lluploaddialog.h" #include "lltrans.h" #include "llfloaterbuycurrency.h" +#include "llviewernetwork.h" // linden libraries #include "llassetuploadresponders.h" @@ -967,9 +968,11 @@ void upload_done_callback( if(!(can_afford_transaction(expected_upload_cost))) { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLStringUtil::format_map_t args; args["NAME"] = data->mAssetInfo.getName(); args["AMOUNT"] = llformat("%d", expected_upload_cost); + args["CUR"] = type_currency; LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("UploadingCosts", args), expected_upload_cost ); is_balance_sufficient = FALSE; } @@ -1286,10 +1289,12 @@ void upload_new_resource( S32 balance = gStatusBar->getBalance(); if (balance < expected_upload_cost) { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); // insufficient funds, bail on this upload LLStringUtil::format_map_t args; args["NAME"] = name; args["AMOUNT"] = llformat("%d", expected_upload_cost); + args["CUR"] = type_currency; LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("UploadingCosts", args), expected_upload_cost ); return; } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index a5e960e6ca..773dc8b5c7 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -111,6 +111,7 @@ #include "llagentui.h" #include "llpanelblockedlist.h" #include "llpanelplaceprofile.h" +#include "llviewernetwork.h" // [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0a) #include "rlvhandler.h" #include "rlvinventory.h" @@ -311,8 +312,10 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_ } else { + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLStringUtil::format_map_t args; args["AMOUNT"] = llformat("%d", amount); + args["CUR"] = type_currency; LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("giving", args), amount ); } } @@ -699,7 +702,9 @@ bool join_group_response(const LLSD& notification, const LLSD& response) { delete_context_data = FALSE; LLSD args; + std::string type_currency = LLGridManager::getInstance()->getCurrency(); args["COST"] = llformat("%d", fee); + args["CUR"] = type_currency; // Set the fee for next time to 0, so that we don't keep // asking about a fee. LLSD next_payload = notification["payload"]; @@ -6134,9 +6139,11 @@ static void process_money_balance_reply_extended(LLMessageSystem* msg) std::string reason = reason_from_transaction_type(transaction_type, item_description); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLStringUtil::format_map_t args; args["REASON"] = reason; // could be empty args["AMOUNT"] = llformat("%d", amount); + args["CUR"] = type_currency; // Need to delay until name looked up, so need to know whether or not // is group @@ -6659,6 +6666,12 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/) gMenuHolder->getChild("Upload Sound")->setLabelArg("[COST]", llformat("%d", upload_cost)); gMenuHolder->getChild("Upload Animation")->setLabelArg("[COST]", llformat("%d", upload_cost)); gMenuHolder->getChild("Bulk Upload")->setLabelArg("[COST]", llformat("%d", upload_cost)); + + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + gMenuHolder->getChild("Upload Image")->setLabelArg("[CUR]", type_currency); + gMenuHolder->getChild("Upload Sound")->setLabelArg("[CUR]", type_currency); + gMenuHolder->getChild("Upload Animation")->setLabelArg("[CUR]", type_currency); + gMenuHolder->getChild("Bulk Upload")->setLabelArg("[CUR]", type_currency); } void notify_cautioned_script_question(const LLSD& notification, const LLSD& response, S32 orig_questions, BOOL granted) @@ -6728,6 +6741,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp BOOL caution = FALSE; S32 count = 0; std::string perms; + std::string type_currency = LLGridManager::getInstance()->getCurrency(); for (S32 i = 0; i < SCRIPT_PERMISSION_EOF; i++) { if ((orig_questions & LSCRIPTRunTimePermissionBits[i]) && SCRIPT_QUESTION_IS_CAUTION[i]) @@ -6742,7 +6756,9 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp perms.append(", "); } - perms.append(LLTrans::getString(SCRIPT_QUESTIONS[i])); + LLSD args; + args["CUR"] = type_currency; + perms.append(LLTrans::getString(SCRIPT_QUESTIONS[i],args)); } } @@ -6771,7 +6787,12 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) LLNotificationsUtil::add(notification["name"], notification["substitutions"], notification["payload"]); // ...with description on top - LLNotificationsUtil::add("DebitPermissionDetails"); + // LLNotificationsUtil::add("DebitPermissionDetails"); - FS:TM grid pannel support + std::string type_currency = LLGridManager::getInstance()->getCurrency(); + LLSD args; + args["CUR"] = type_currency; + LLNotificationsUtil::add("DebitPermissionDetails", args); + //FS:TM grid pannel support return false; } diff --git a/indra/newview/llviewernetwork.cpp b/indra/newview/llviewernetwork.cpp index 7da898ca19..e32468f83d 100644 --- a/indra/newview/llviewernetwork.cpp +++ b/indra/newview/llviewernetwork.cpp @@ -440,8 +440,8 @@ void LLGridManager::gridInfoResponderCB(GridEntry* grid_entry) check = "gridnick"; if (node->hasName(check)) { - grid_entry->grid[check] = node->getTextContents(); - LL_DEBUGS("GridManager") << "[\""<grid[check] << LL_ENDL; + grid_entry->grid[GRID_NICK_VALUE] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\""<grid[GRID_NICK_VALUE] << LL_ENDL; continue; } check = "welcome"; @@ -468,15 +468,71 @@ void LLGridManager::gridInfoResponderCB(GridEntry* grid_entry) check = "help"; if (node->hasName(check)) { - grid_entry->grid[check] = node->getTextContents(); - LL_DEBUGS("GridManager") << "[\""<grid[check] << LL_ENDL; + grid_entry->grid[GRID_HELP] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\""<grid[GRID_HELP] << LL_ENDL; continue; } check = "about"; if (node->hasName(check)) { - grid_entry->grid[check] = node->getTextContents(); - LL_DEBUGS("GridManager") << "[\""<grid[check] << LL_ENDL; + grid_entry->grid[GRID_ABOUT] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\""<grid[GRID_ABOUT] << LL_ENDL; + continue; + } + check = "search"; + if (node->hasName(check)) + { + grid_entry->grid[GRID_SEARCH] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\""<grid[GRID_SEARCH] << LL_ENDL; + continue; + } + check = "SendGridInfoToViewerOnLogin"; + if (node->hasName(check)) + { + grid_entry->grid[GRID_SENDGRIDINFO] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\""<grid[GRID_SENDGRIDINFO] << LL_ENDL; + continue; + } + check = "DirectoryFee"; + if (node->hasName(check)) + { + grid_entry->grid[GRID_DIRECTORY_FEE] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\""<grid[GRID_DIRECTORY_FEE] << LL_ENDL; + continue; + } + check = "CurrencySymbol"; + if (node->hasName(check)) + { + grid_entry->grid[GRID_CURRENCY_SYMBOL] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\""<grid[GRID_CURRENCY_SYMBOL] << LL_ENDL; + continue; + } + check = "RealCurrencySymbol"; + if (node->hasName(check)) + { + grid_entry->grid[GRID_REAL_CURRENCY_SYMBOL] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\""<grid[GRID_REAL_CURRENCY_SYMBOL] << LL_ENDL; + continue; + } + check = "MaxGroups"; + if (node->hasName(check)) + { + grid_entry->grid[GRID_MAXGROUPS] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\""<grid[GRID_MAXGROUPS] << LL_ENDL; + continue; + } + check = "platform"; + if (node->hasName(check)) + { + grid_entry->grid[GRID_PLATFORM] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\""<grid[GRID_PLATFORM] << LL_ENDL; + continue; + } + check = "message"; + if (node->hasName(check)) + { + grid_entry->grid[GRID_MESSAGE] = node->getTextContents(); + LL_DEBUGS("GridManager") << "[\""<grid[GRID_MESSAGE] << LL_ENDL; continue; } check = "helperuri"; @@ -759,11 +815,20 @@ void LLGridManager::addGrid(GridEntry* grid_entry, AddState state) if (grid_entry) { + if(!grid_entry->mOnDoneCallback.empty()) { + grid_entry->mOnDoneCallback(); + } delete grid_entry; grid_entry = NULL; } } +void LLGridManager::deleteGrid(const std::string& grid) +{ + if(MAINGRID == grid) return; + mGridList.erase(grid); + if(mGrid == grid) setGridChoice(MAINGRID); +} // // LLGridManager::addSystemGrid - helper for adding a system grid. void LLGridManager::addSystemGrid(const std::string& label, @@ -979,6 +1044,20 @@ std::string LLGridManager::getLoginPage() return mGridList[mGrid][GRID_LOGIN_PAGE_VALUE]; } +std::string LLGridManager::getCurrency() +{ + std::string type_currency = "L$"; + if(!(isInSLMain() || isInSLBeta())) { + if(mGridList[mGrid].has(GRID_CURRENCY_SYMBOL)) { + type_currency = mGridList[mGrid][GRID_CURRENCY_SYMBOL].asString(); + } + else { + type_currency = "OS$"; + } + } + return type_currency; +} + // void LLGridManager::updateIsInProductionGrid() { diff --git a/indra/newview/llviewernetwork.h b/indra/newview/llviewernetwork.h index 2be93a33e3..0d6e0a6a07 100644 --- a/indra/newview/llviewernetwork.h +++ b/indra/newview/llviewernetwork.h @@ -47,6 +47,16 @@ extern const char* DEFAULT_LOGIN_PAGE; #define GRID_IS_FAVORITE_VALUE "favorite" #define GRID_REGISTER_NEW_ACCOUNT "register" #define GRID_FORGOT_PASSWORD "password" +#define GRID_HELP "help" +#define GRID_ABOUT "about" +#define GRID_SEARCH "search" +#define GRID_SENDGRIDINFO "SendGridInfoToViewerOnLogin" +#define GRID_DIRECTORY_FEE "DirectoryFee" +#define GRID_CURRENCY_SYMBOL "CurrencySymbol" +#define GRID_REAL_CURRENCY_SYMBOL "RealCurrencySymbol" +#define GRID_MAXGROUPS "MaxGroups" +#define GRID_PLATFORM "platform" +#define GRID_MESSAGE "message" // #define GRID_IS_SYSTEM_GRID_VALUE "system_grid" #define GRID_IS_FAVORITE_VALUE "favorite" @@ -66,6 +76,7 @@ struct GridEntry LLXMLNodePtr info_root; bool set_current; std::string last_http_error; + boost::function mOnDoneCallback; }; class LLInvalidGridName @@ -120,6 +131,7 @@ public: void gridInfoResponderCB(GridEntry* grid_data); // add a grid to the list of grids void addGrid(GridEntry* grid_info, AddState state); + void deleteGrid(const std::string& grid); // retrieve a map of grid-name <-> label // by default only return the user visible grids @@ -147,6 +159,7 @@ public: std::string getLoginPage(const std::string& grid) { return mGridList[grid][GRID_LOGIN_PAGE_VALUE]; } void getLoginIdentifierTypes(LLSD& idTypes) { idTypes = mGridList[mGrid][GRID_LOGIN_IDENTIFIER_TYPES]; } std::string getGridNick() { return mGridList[mGrid][GRID_NICK_VALUE]; } + std::string getCurrency(); // get location slurl base for the given region within the selected grid std::string getSLURLBase(const std::string& grid); diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 4796f4d32b..859e9aa947 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -69,6 +69,7 @@ #include "llweb.h" #include "llvieweraudio.h" #include "kcwlinterface.h" +#include "llviewernetwork.h" const F32 PARCEL_COLLISION_DRAW_SECS = 1.f; @@ -2152,8 +2153,10 @@ void LLViewerParcelMgr::startReleaseLand() } // Compute claim price + std::string type_currency = LLGridManager::getInstance()->getCurrency(); LLSD args; args["AREA"] = llformat("%d",mCurrentParcel->getArea()); + args["CUR"] = type_currency; LLNotificationsUtil::add("ReleaseLandWarning", args, LLSD(), releaseAlertCB); } diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp index 95fe76c8bb..033d969515 100644 --- a/indra/newview/llworldmap.cpp +++ b/indra/newview/llworldmap.cpp @@ -33,6 +33,7 @@ #include "lltracker.h" #include "lluistring.h" #include "llviewertexturelist.h" +#include "llviewernetwork.h" #include "lltrans.h" // Timers to temporise database requests @@ -520,9 +521,11 @@ bool LLWorldMap::insertItem(U32 x_world, U32 y_world, std::string& name, LLUUID& case MAP_ITEM_LAND_FOR_SALE_ADULT: // adult land for sale { static LLUIString tooltip_fmt = LLTrans::getString("worldmap_item_tooltip_format"); + std::string type_currency = LLGridManager::getInstance()->getCurrency(); tooltip_fmt.setArg("[AREA]", llformat("%d", extra)); tooltip_fmt.setArg("[PRICE]", llformat("%d", extra2)); + tooltip_fmt.setArg("[CUR]", type_currency); new_item.setTooltip(tooltip_fmt.getString()); if (type == MAP_ITEM_LAND_FOR_SALE) diff --git a/indra/newview/skins/default/xui/da/floater_about_land.xml b/indra/newview/skins/default/xui/da/floater_about_land.xml index 110c09f549..d4af332b14 100644 --- a/indra/newview/skins/default/xui/da/floater_about_land.xml +++ b/indra/newview/skins/default/xui/da/floater_about_land.xml @@ -107,7 +107,7 @@ Gå til 'Verden' > 'Om land' eller vælg en anden parcel Ikke til salg. - Pris: L$[PRICE] (L$[PRICE_PER_SQM]/m²). + Pris: [CUR][PRICE] ([CUR][PRICE_PER_SQM]/m²).