From e563e2c2cc66fa9f3b47c4814d70f9800d957026 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Mon, 26 Apr 2010 20:06:23 -0700 Subject: Ported currency changes from Hippo (#237) and fixed some labels Hippo missed (also fixed #200 in the process) --- linden/indra/llinventory/lltransactionflags.cpp | 10 +- linden/indra/llui/llnotifications.cpp | 8 +- linden/indra/newview/hippoGridManager.cpp | 5 +- linden/indra/newview/llassetuploadresponders.cpp | 3 + linden/indra/newview/llcurrencyuimanager.cpp | 12 +- linden/indra/newview/llfirstuse.cpp | 3 + linden/indra/newview/llfloateranimpreview.cpp | 4 +- linden/indra/newview/llfloaterbuy.cpp | 3 + linden/indra/newview/llfloaterbuycontents.cpp | 3 + linden/indra/newview/llfloaterbuycurrency.cpp | 9 + linden/indra/newview/llfloaterbuyland.cpp | 12 +- linden/indra/newview/llfloaterimagepreview.cpp | 4 +- linden/indra/newview/llfloaterland.cpp | 6 + linden/indra/newview/llfloaternamedesc.cpp | 3 + linden/indra/newview/llfloaterpostcard.cpp | 3 + linden/indra/newview/llfloaterproperties.cpp | 4 + linden/indra/newview/llfloatersellland.cpp | 4 + linden/indra/newview/llfloatersnapshot.cpp | 17 + linden/indra/newview/llgivemoney.cpp | 20 +- linden/indra/newview/llhoverview.cpp | 6 +- linden/indra/newview/llnotify.cpp | 6 + linden/indra/newview/llpanelaudioprefs.cpp | 4 + linden/indra/newview/llpanelclassified.cpp | 5 + linden/indra/newview/llpaneldirland.cpp | 16 + linden/indra/newview/llpanelgroupgeneral.cpp | 11 +- linden/indra/newview/llpanelgrouplandmoney.cpp | 29 +- linden/indra/newview/llpanelinventory.cpp | 7 +- linden/indra/newview/llpanelland.cpp | 3 + linden/indra/newview/llpanelmsgs.cpp | 3 + linden/indra/newview/llpanelpermissions.cpp | 26 +- linden/indra/newview/llpanelplace.cpp | 3 + linden/indra/newview/llstatusbar.cpp | 8 +- linden/indra/newview/llviewermenu.cpp | 15 +- linden/indra/newview/llviewermessage.cpp | 34 +- linden/indra/newview/llviewerparcelmgr.cpp | 3 + linden/indra/newview/llworldmap.cpp | 6 +- .../skins/default/xui/en-us/floater_about_land.xml | 6 +- .../xui/en-us/floater_animation_preview.xml | 2 +- .../default/xui/en-us/floater_buy_contents.xml | 2 +- .../default/xui/en-us/floater_buy_currency.xml | 18 +- .../skins/default/xui/en-us/floater_buy_land.xml | 16 +- .../skins/default/xui/en-us/floater_buy_object.xml | 2 +- .../default/xui/en-us/floater_chat_history.xml | 2 +- .../skins/default/xui/en-us/floater_directory.xml | 10 +- .../default/xui/en-us/floater_image_preview.xml | 2 +- .../en-us/floater_inventory_item_properties.xml | 2 +- .../default/xui/en-us/floater_name_description.xml | 2 +- .../skins/default/xui/en-us/floater_pay.xml | 10 +- .../skins/default/xui/en-us/floater_pay_object.xml | 10 +- .../skins/default/xui/en-us/floater_postcard.xml | 3 +- .../skins/default/xui/en-us/floater_sell_land.xml | 4 +- .../skins/default/xui/en-us/floater_snapshot.xml | 4 +- .../default/xui/en-us/floater_sound_preview.xml | 2 +- .../skins/default/xui/en-us/floater_tools.xml | 10 +- .../skins/default/xui/en-us/menu_viewer.xml | 12 +- .../skins/default/xui/en-us/notifications.xml | 120 +++--- .../default/xui/en-us/panel_avatar_classified.xml | 2 +- .../skins/default/xui/en-us/panel_classified.xml | 2 +- .../skins/default/xui/en-us/panel_friends.xml | 2 +- .../default/xui/en-us/panel_group_general.xml | 14 +- .../default/xui/en-us/panel_group_land_money.xml | 4 +- .../skins/default/xui/en-us/panel_place.xml | 2 +- .../skins/default/xui/en-us/panel_place_small.xml | 2 +- .../default/xui/en-us/panel_preferences_audio.xml | 10 +- .../default/xui/en-us/panel_preferences_popups.xml | 2 +- .../newview/skins/default/xui/en-us/strings.xml | 415 +++++++++++---------- 66 files changed, 606 insertions(+), 406 deletions(-) diff --git a/linden/indra/llinventory/lltransactionflags.cpp b/linden/indra/llinventory/lltransactionflags.cpp index e0f87aa..aaea161 100644 --- a/linden/indra/llinventory/lltransactionflags.cpp +++ b/linden/indra/llinventory/lltransactionflags.cpp @@ -36,7 +36,9 @@ #include "lluuid.h" #include "lltransactionflags.h" #include "lltransactiontypes.h" - + +#include "../newview/hippoGridManager.h" + const U8 TRANSACTION_FLAGS_NONE = 0; const U8 TRANSACTION_FLAG_SOURCE_GROUP = 1; const U8 TRANSACTION_FLAG_DEST_GROUP = 2; @@ -114,7 +116,7 @@ std::string build_transfer_message_to_source( std::ostringstream ostr; if(dest_id.isNull()) { - ostr << "You paid L$" << amount; + ostr << "You paid " << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() << amount; switch(transaction_type) { case TRANS_GROUP_CREATE: @@ -132,7 +134,7 @@ std::string build_transfer_message_to_source( } else { - ostr << "You paid " << dest_name << " L$" << amount; + ostr << "You paid " << dest_name << ' ' << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() << amount; append_reason(ostr, transaction_type, description); } ostr << "."; @@ -160,7 +162,7 @@ std::string build_transfer_message_to_destination( return description; } std::ostringstream ostr; - ostr << source_name << " paid you L$" << amount; + ostr << source_name << " paid you " << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() << amount; append_reason(ostr, transaction_type, description); ostr << "."; return ostr.str(); diff --git a/linden/indra/llui/llnotifications.cpp b/linden/indra/llui/llnotifications.cpp index 58ec511..0b8bbbe 100644 --- a/linden/indra/llui/llnotifications.cpp +++ b/linden/indra/llui/llnotifications.cpp @@ -40,6 +40,8 @@ #include #include +#include "../newview/hippoGridManager.h" + const std::string NOTIFICATION_PERSIST_VERSION = "0.93"; @@ -605,9 +607,9 @@ void LLNotification::init(const std::string& template_name, const LLSD& form_ele mSubstitutions["[VIEWER_NAME]"] = LLNotifications::instance().getGlobalString("VIEWER_NAME"); mSubstitutions["[VIEWER_SITE]"] = LLNotifications::instance().getGlobalString("VIEWER_SITE"); - // TODO: set these based on which grid the user is connected to. - mSubstitutions["[GRID_NAME]"] = LLNotifications::instance().getGlobalString("SECOND_LIFE"); - mSubstitutions["[GRID_SITE]"] = LLNotifications::instance().getGlobalString("SECOND_LIFE_SITE"); + mSubstitutions["[GRID_NAME]"] = gHippoGridManager->getConnectedGrid()->getGridName(); + mSubstitutions["[GRID_SITE]"] = gHippoGridManager->getConnectedGrid()->getWebSite(); + mSubstitutions["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); mSubstitutions["_URL"] = getURL(); mSubstitutions["_NAME"] = template_name; diff --git a/linden/indra/newview/hippoGridManager.cpp b/linden/indra/newview/hippoGridManager.cpp index 9acdd69..60c33e8 100644 --- a/linden/indra/newview/hippoGridManager.cpp +++ b/linden/indra/newview/hippoGridManager.cpp @@ -13,6 +13,7 @@ #include #include #include +#include "lltrans.h" #include "llviewercontrol.h" #include "llweb.h" @@ -441,14 +442,14 @@ std::string HippoGridInfo::getDirectoryFee() const { std::string fee; formatFee(fee, mDirectoryFee, true); - if (fee != "free") fee += "/week"; + if (fee != LLTrans::getString("hippo_label_free")) fee += "/" + LLTrans::getString("hippo_label_week"); return fee; } void HippoGridInfo::formatFee(std::string &fee, int cost, bool showFree) const { if (showFree && (cost == 0)) { - fee = "free"; + fee = LLTrans::getString("hippo_label_free"); } else { fee = llformat("%s%d", getCurrencySymbol().c_str(), cost); } diff --git a/linden/indra/newview/llassetuploadresponders.cpp b/linden/indra/newview/llassetuploadresponders.cpp index 001d2e9..aff1fb8 100644 --- a/linden/indra/newview/llassetuploadresponders.cpp +++ b/linden/indra/newview/llassetuploadresponders.cpp @@ -63,6 +63,8 @@ #include "llscrolllistctrl.h" #include "llsdserialize.h" +#include "hippoGridManager.h" + // When uploading multiple files, don't display any of them when uploading more than this number. static const S32 FILE_COUNT_DISPLAY_THRESHOLD = 5; @@ -227,6 +229,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content) LLSD args; args["AMOUNT"] = llformat("%d", expected_upload_cost); + args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); LLNotifications::instance().add("UploadPayment", args); } diff --git a/linden/indra/newview/llcurrencyuimanager.cpp b/linden/indra/newview/llcurrencyuimanager.cpp index 8682124..99d0430 100644 --- a/linden/indra/newview/llcurrencyuimanager.cpp +++ b/linden/indra/newview/llcurrencyuimanager.cpp @@ -47,6 +47,7 @@ #include "llxmlrpctransaction.h" #include "llviewernetwork.h" +#include "hippoGridManager.h" const F64 CURRENCY_ESTIMATE_FREQUENCY = 2.0; // how long of a pause in typing a currency buy amount before an @@ -238,17 +239,11 @@ void LLCurrencyUIManager::Impl::finishCurrencyBuy() void LLCurrencyUIManager::Impl::startTransaction(TransactionType type, const char* method, LLXMLRPCValue params) { - static std::string transactionURI; - if (transactionURI.empty()) - { - transactionURI = LLViewerLogin::getInstance()->getHelperURI() + "currency.php"; - } - delete mTransaction; mTransactionType = type; mTransaction = new LLXMLRPCTransaction( - transactionURI, + LLViewerLogin::getInstance()->getHelperURI() + "currency.php", method, params, false /* don't use gzip */ @@ -372,6 +367,7 @@ void LLCurrencyUIManager::Impl::updateUI() } mPanel.childShow("currency_action"); + mPanel.childSetTextArg("currency_action", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); LLLineEditor* lindenAmount = mPanel.getChild("currency_amt"); if (lindenAmount) @@ -478,7 +474,9 @@ void LLCurrencyUIManager::buy(const std::string& buy_msg) LLUIString msg = buy_msg; msg.setArg("[LINDENS]", llformat("%d", impl.mUserCurrencyBuy)); + msg.setArg("[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); msg.setArg("[USD]", llformat("%#.2f", impl.mSiteCurrencyEstimatedCost / 100.0)); + msg.setArg("[REALCURRENCY]", gHippoGridManager->getConnectedGrid()->getRealCurrencySymbol()); LLConfirmationManager::confirm(impl.mSiteConfirm, msg, impl, diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp index bc982af..34e3fcc 100644 --- a/linden/indra/newview/llfirstuse.cpp +++ b/linden/indra/newview/llfirstuse.cpp @@ -46,6 +46,7 @@ #include "lltracker.h" #include "llvoavatar.h" +#include "hippoGridManager.h" // [RLVa:KB] - Version: 1.22.11 #include "llviewerwindow.h" @@ -94,6 +95,7 @@ void LLFirstUse::useBalanceIncrease(S32 delta) LLSD args; args["AMOUNT"] = llformat("%d",delta); + args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); LLNotifications::instance().add("FirstBalanceIncrease", args); } } @@ -108,6 +110,7 @@ void LLFirstUse::useBalanceDecrease(S32 delta) LLSD args; args["AMOUNT"] = llformat("%d",-delta); + args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); LLNotifications::instance().add("FirstBalanceDecrease", args); } } diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp index 57ee161..a7d880e 100644 --- a/linden/indra/newview/llfloateranimpreview.cpp +++ b/linden/indra/newview/llfloateranimpreview.cpp @@ -67,6 +67,8 @@ #include "pipeline.h" #include "lluictrlfactory.h" +#include "hippoGridManager.h" + S32 LLFloaterAnimPreview::sUploadAmount = 10; const S32 PREVIEW_BORDER_WIDTH = 2; @@ -162,7 +164,7 @@ BOOL LLFloaterAnimPreview::postBuild() childSetCommitCallback("name_form", onCommitName, this); - childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d",sUploadAmount)); + childSetLabelArg("ok_btn", "[UPLOADFEE]", gHippoGridManager->getConnectedGrid()->getUploadFee()); childSetAction("ok_btn", onBtnOK, this); setDefaultBtn(); diff --git a/linden/indra/newview/llfloaterbuy.cpp b/linden/indra/newview/llfloaterbuy.cpp index a33cabc..86cab43 100644 --- a/linden/indra/newview/llfloaterbuy.cpp +++ b/linden/indra/newview/llfloaterbuy.cpp @@ -50,6 +50,8 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" +#include "hippoGridManager.h" + LLFloaterBuy* LLFloaterBuy::sInstance = NULL; LLFloaterBuy::LLFloaterBuy() @@ -184,6 +186,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info) // Add after columns added so appropriate heights are correct. object_list->addElement(row); + sInstance->childSetTextArg("buy_text", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); sInstance->childSetTextArg("buy_text", "[AMOUNT]", llformat("%d", sale_info.getSalePrice())); sInstance->childSetTextArg("buy_text", "[NAME]", owner_name); diff --git a/linden/indra/newview/llfloaterbuycontents.cpp b/linden/indra/newview/llfloaterbuycontents.cpp index 95a8caa..498d6ac 100644 --- a/linden/indra/newview/llfloaterbuycontents.cpp +++ b/linden/indra/newview/llfloaterbuycontents.cpp @@ -54,6 +54,8 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" +#include "hippoGridManager.h" + LLFloaterBuyContents* LLFloaterBuyContents::sInstance = NULL; LLFloaterBuyContents::LLFloaterBuyContents() @@ -129,6 +131,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info) } sInstance->childSetTextArg("contains_text", "[NAME]", node->mName); + sInstance->childSetTextArg("buy_text", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); sInstance->childSetTextArg("buy_text", "[AMOUNT]", llformat("%d", sale_info.getSalePrice())); sInstance->childSetTextArg("buy_text", "[NAME]", owner_name); diff --git a/linden/indra/newview/llfloaterbuycurrency.cpp b/linden/indra/newview/llfloaterbuycurrency.cpp index cfbc5da..07723e0 100644 --- a/linden/indra/newview/llfloaterbuycurrency.cpp +++ b/linden/indra/newview/llfloaterbuycurrency.cpp @@ -46,6 +46,8 @@ #include "llwindow.h" #include "llappviewer.h" +#include "hippoGridManager.h" + static const S32 STANDARD_BUY_AMOUNT = 2000; static const S32 MINIMUM_BALANCE_AMOUNT = 0; @@ -263,9 +265,11 @@ void LLFloaterBuyCurrencyUI::updateUI() childSetVisible("buy_action", true); childSetTextArg("buy_action", "[NAME]", mTargetName); childSetTextArg("buy_action", "[PRICE]", llformat("%d",mTargetPrice)); + childSetTextArg("buy_action", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); } else { + childSetTextArg("buy_action_unknown", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); childSetVisible("buy_action_unknown", true); } } @@ -274,16 +278,21 @@ void LLFloaterBuyCurrencyUI::updateUI() childShow("balance_label"); childShow("balance_amount"); childSetTextArg("balance_amount", "[AMT]", llformat("%d", balance)); + childSetTextArg("balance_amount", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); S32 buying = mManager.getAmount(); childShow("buying_label"); childShow("buying_amount"); childSetTextArg("buying_amount", "[AMT]", llformat("%d", buying)); + childSetTextArg("buying_amount", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); S32 total = balance + buying; childShow("total_label"); childShow("total_amount"); childSetTextArg("total_amount", "[AMT]", llformat("%d", total)); + childSetTextArg("total_amount", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); + + childSetTextArg("currency_est", "[REALCURRENCY]", gHippoGridManager->getConnectedGrid()->getRealCurrencySymbol()); childSetVisible("purchase_warning_repurchase", false); childSetVisible("purchase_warning_notenough", false); diff --git a/linden/indra/newview/llfloaterbuyland.cpp b/linden/indra/newview/llfloaterbuyland.cpp index 29506e2..75630b2 100644 --- a/linden/indra/newview/llfloaterbuyland.cpp +++ b/linden/indra/newview/llfloaterbuyland.cpp @@ -66,6 +66,8 @@ #include "llviewernetwork.h" #include "roles_constants.h" +#include "hippoGridManager.h" + // NOTE: This is duplicated in lldatamoney.cpp ... const F32 GROUP_LAND_BONUS_FACTOR = 1.1f; const F64 CURRENCY_ESTIMATE_FREQUENCY = 0.5; @@ -1024,6 +1026,7 @@ void LLFloaterBuyLandUI::refreshUI() LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mParcelActualArea); string_args["[AMOUNT2]"] = llformat("%d", mParcelSupportedObjects); + string_args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); childSetText("info_size", getString("meters_supports_object", string_args)); @@ -1227,7 +1230,8 @@ void LLFloaterBuyLandUI::refreshUI() childSetText("purchase_action", llformat( - "Pay L$ %d to %s for this land", + "Pay %s %d to %s for this land", + gHippoGridManager->getConnectedGrid()->getCurrencySymbol().c_str(), mParcelPrice, mParcelSellerName.c_str() )); @@ -1239,6 +1243,7 @@ void LLFloaterBuyLandUI::refreshUI() { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mAgentCashBalance); + string_args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); childSetText("currency_reason", getString("have_enough_lindens", string_args)); } @@ -1247,6 +1252,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["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); childSetText("currency_reason", getString("not_enough_lindens", string_args)); @@ -1257,6 +1263,7 @@ void LLFloaterBuyLandUI::refreshUI() { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", finalBalance); + string_args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); childSetText("currency_balance", getString("balance_left", string_args)); @@ -1265,6 +1272,7 @@ void LLFloaterBuyLandUI::refreshUI() { LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mParcelPrice - mAgentCashBalance); + string_args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); childSetText("currency_balance", getString("balance_needed", string_args)); @@ -1331,6 +1339,7 @@ void LLFloaterBuyLandUI::startBuyPreConfirm() LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mCurrency.getAmount()); string_args["[AMOUNT2]"] = llformat("%#.2f", mCurrency.getEstimate() / 100.0); + string_args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); action += getString("buy_for_US", string_args); } @@ -1338,6 +1347,7 @@ void LLFloaterBuyLandUI::startBuyPreConfirm() LLStringUtil::format_map_t string_args; string_args["[AMOUNT]"] = llformat("%d", mParcelPrice); string_args["[SELLER]"] = mParcelSellerName; + string_args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); action += getString("pay_to_for_land", string_args); diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp index 87d577d..9827a31 100644 --- a/linden/indra/newview/llfloaterimagepreview.cpp +++ b/linden/indra/newview/llfloaterimagepreview.cpp @@ -60,6 +60,8 @@ #include "llstring.h" #include "llviewercontrol.h" +#include "hippoGridManager.h" + //static S32 LLFloaterImagePreview::sUploadAmount = 10; @@ -94,7 +96,7 @@ BOOL LLFloaterImagePreview::postBuild() return FALSE; } - childSetLabelArg("ok_btn", "[AMOUNT]", llformat("%d",sUploadAmount)); + childSetLabelArg("ok_btn", "[UPLOADFEE]", gHippoGridManager->getConnectedGrid()->getUploadFee()); LLCtrlSelectionInterface* iface = childGetSelectionInterface("clothing_type_combo"); if (iface) diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp index 08c04ab..cc398da 100644 --- a/linden/indra/newview/llfloaterland.cpp +++ b/linden/indra/newview/llfloaterland.cpp @@ -76,6 +76,8 @@ #include "llviewercontrol.h" #include "roles_constants.h" +#include "hippoGridManager.h" + static std::string OWNER_ONLINE = "0"; static std::string OWNER_OFFLINE = "1"; static std::string OWNER_GROUP = "2"; @@ -645,6 +647,7 @@ void LLPanelLandGeneral::refresh() mSaleInfoForSaleNoObjects->setVisible(TRUE); } mSaleInfoNotForSale->setVisible(FALSE); + mSaleInfoForSale1->setTextArg("[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); F32 cost_per_sqm = 0.0f; if (area > 0) @@ -887,6 +890,7 @@ void LLPanelLandGeneral::onClickBuyPass(void* data) LLSD args; args["COST"] = cost; + args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); args["PARCEL_NAME"] = parcel_name; args["TIME"] = time; @@ -2068,6 +2072,7 @@ void LLPanelLandOptions::refreshSearch() } BOOL show_directory = parcel->getParcelFlag(PF_SHOW_DIRECTORY); mCheckShowDirectory ->set(show_directory); + mCheckShowDirectory->setLabelArg("[DIRECTORYFEE]", gHippoGridManager->getConnectedGrid()->getDirectoryFee()); // Set by string in case the order in UI doesn't match the order by index. // *TODO:Translate @@ -2435,6 +2440,7 @@ void LLPanelLandAccess::refresh() S32 pass_price = parcel->getPassPrice(); childSetValue( "PriceSpin", (F32)pass_price ); + childSetLabelArg("PriceSpin", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); F32 pass_hours = parcel->getPassHours(); childSetValue( "HoursSpin", pass_hours ); diff --git a/linden/indra/newview/llfloaternamedesc.cpp b/linden/indra/newview/llfloaternamedesc.cpp index acfcfab..9413611 100644 --- a/linden/indra/newview/llfloaternamedesc.cpp +++ b/linden/indra/newview/llfloaternamedesc.cpp @@ -55,6 +55,8 @@ #include "llassetstorage.h" #include "llinventorytype.h" +#include "hippoGridManager.h" + const S32 PREVIEW_LINE_HEIGHT = 19; const S32 PREVIEW_CLOSE_BOX_SIZE = 16; const S32 PREVIEW_BORDER_WIDTH = 2; @@ -138,6 +140,7 @@ BOOL LLFloaterNameDesc::postBuild() childSetAction("cancel_btn", onBtnCancel, this); // OK button + childSetLabelArg("ok_btn", "[UPLOADFEE]", gHippoGridManager->getConnectedGrid()->getUploadFee()); childSetAction("ok_btn", onBtnOK, this); setDefaultBtn("ok_btn"); diff --git a/linden/indra/newview/llfloaterpostcard.cpp b/linden/indra/newview/llfloaterpostcard.cpp index b0ab0f9..41b6515 100644 --- a/linden/indra/newview/llfloaterpostcard.cpp +++ b/linden/indra/newview/llfloaterpostcard.cpp @@ -66,6 +66,8 @@ #include //boost.regex lib +#include "hippoGridManager.h" + ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- @@ -355,6 +357,7 @@ bool LLFloaterPostcard::missingSubjMsgAlertCallback(const LLSD& notification, co if((childGetValue("subject_form").asString()).empty()) { // Stuff the subject back into the form. + childSetTextArg("default_subject", "[GRID_NAME]", gHippoGridManager->getConnectedGrid()->getGridName()); childSetValue("subject_form", getString("default_subject")); } diff --git a/linden/indra/newview/llfloaterproperties.cpp b/linden/indra/newview/llfloaterproperties.cpp index 3059843..7dc6e42 100644 --- a/linden/indra/newview/llfloaterproperties.cpp +++ b/linden/indra/newview/llfloaterproperties.cpp @@ -59,6 +59,8 @@ #include "lluictrlfactory.h" +#include "hippoGridManager.h" + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLPropertiesObserver @@ -164,6 +166,8 @@ LLFloaterProperties::LLFloaterProperties(const std::string& name, const LLRect& sPropertiesObserver = new LLPropertiesObserver; } sPropertiesObserverCount++; + + childSetTextArg("TextPrice", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); // add the object to the static structure LLUUID key = mItemID ^ mObjectID; diff --git a/linden/indra/newview/llfloatersellland.cpp b/linden/indra/newview/llfloatersellland.cpp index 92e070f..bf4a4c3 100644 --- a/linden/indra/newview/llfloatersellland.cpp +++ b/linden/indra/newview/llfloatersellland.cpp @@ -46,6 +46,8 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" +#include "hippoGridManager.h" + // defined in llfloaterland.cpp void send_parcel_select_objects(S32 parcel_local_id, S32 return_type, uuid_list_t* return_ids = NULL); @@ -284,6 +286,8 @@ void LLFloaterSellLandUI::refreshUI() childSetText("info_parcel", parcelp->getName()); childSetTextArg("info_size", "[AREA]", llformat("%d", mParcelActualArea)); + childSetTextArg("price_ld", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); + std::string price_str = childGetValue("price").asString(); bool valid_price = false; valid_price = (price_str != "") && LLLineEditor::prevalidateNonNegativeS32(utf8str_to_wstring(price_str)); diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp index b4f2cc2..f67340e 100644 --- a/linden/indra/newview/llfloatersnapshot.cpp +++ b/linden/indra/newview/llfloatersnapshot.cpp @@ -77,6 +77,8 @@ #include "llvfile.h" #include "llvfs.h" +#include "hippoGridManager.h" + ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- @@ -1256,6 +1258,21 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater) floater->getChild("local_size_combo")->selectNthItem(gSavedSettings.getS32("SnapshotLocalLastResolution")); floater->getChild("local_format_combo")->selectNthItem(gSavedSettings.getS32("SnapshotFormat")); + std::string fee = gHippoGridManager->getConnectedGrid()->getUploadFee(); + floater->childSetLabelArg("upload_btn", "[UPLOADFEE]", fee); + + if (snapshot_type_radio) { + const child_list_t *childs = snapshot_type_radio->getChildList(); + if (childs) { + child_list_t::const_iterator it, end=childs->end(); + for (it=childs->begin(); it!=end; ++it) { + LLRadioCtrl *ctrl = dynamic_cast(*it); + if (ctrl && (ctrl->getName() == "texture")) + ctrl->setLabelArg("[UPLOADFEE]", fee); + } + } + } + floater->childSetVisible("upload_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_TEXTURE); floater->childSetVisible("send_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_POSTCARD); floater->childSetVisible("save_btn", shot_type == LLSnapshotLivePreview::SNAPSHOT_LOCAL); diff --git a/linden/indra/newview/llgivemoney.cpp b/linden/indra/newview/llgivemoney.cpp index 423357d..6c69334 100644 --- a/linden/indra/newview/llgivemoney.cpp +++ b/linden/indra/newview/llgivemoney.cpp @@ -52,6 +52,8 @@ #include "lltransactiontypes.h" #include "lluictrlfactory.h" +#include "hippoGridManager.h" + ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- @@ -111,6 +113,7 @@ LLFloaterPay::LLFloaterPay(const std::string& name, childSetAction("fastpay 1",&LLFloaterPay::onGive,info); childSetVisible("fastpay 1", FALSE); + childSetLabelArg("fastpay 1", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); mQuickPayButton[i] = getChild("fastpay 1"); mQuickPayInfo[i] = info; @@ -121,6 +124,7 @@ LLFloaterPay::LLFloaterPay(const std::string& name, childSetAction("fastpay 5",&LLFloaterPay::onGive,info); childSetVisible("fastpay 5", FALSE); + childSetLabelArg("fastpay 5", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); mQuickPayButton[i] = getChild("fastpay 5"); mQuickPayInfo[i] = info; @@ -131,6 +135,7 @@ LLFloaterPay::LLFloaterPay(const std::string& name, childSetAction("fastpay 10",&LLFloaterPay::onGive,info); childSetVisible("fastpay 10", FALSE); + childSetLabelArg("fastpay 10", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); mQuickPayButton[i] = getChild("fastpay 10"); mQuickPayInfo[i] = info; @@ -141,6 +146,7 @@ LLFloaterPay::LLFloaterPay(const std::string& name, childSetAction("fastpay 20",&LLFloaterPay::onGive,info); childSetVisible("fastpay 20", FALSE); + childSetLabelArg("fastpay 20", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); mQuickPayButton[i] = getChild("fastpay 20"); mQuickPayInfo[i] = info; @@ -149,7 +155,7 @@ LLFloaterPay::LLFloaterPay(const std::string& name, childSetVisible("amount text", FALSE); childSetVisible("currency text", FALSE); - + childSetTextArg("currency text", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); std::string last_amount; if(sLastAmount > 0) @@ -246,7 +252,7 @@ void LLFloaterPay::processPayPriceReply(LLMessageSystem* msg, void **userdata) msg->getS32Fast(_PREHASH_ButtonData,_PREHASH_PayButton,pay_button,i); if (pay_button > 0) { - std::string button_str = "L$"; + std::string button_str = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); button_str += LLResMgr::getInstance()->getMonetaryString( pay_button ); self->mQuickPayButton[i]->setLabelSelected(button_str); @@ -267,7 +273,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 = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); balance_str += LLResMgr::getInstance()->getMonetaryString( max_pay_amount ); const LLFontGL* font = LLResMgr::getInstance()->getRes(LLFONT_SANSSERIF); S32 new_button_width = font->getWidth( std::string(balance_str)); @@ -329,7 +335,9 @@ void LLFloaterPay::payViaObject(money_callback callback, const LLUUID& object_id LLViewerObject* object = gObjectList.findObject(object_id); if (!object) return; - LLFloaterPay *floater = new LLFloaterPay("Give L$", callback, object_id, TRUE); + LLFloaterPay *floater = new LLFloaterPay( + "Give " + gHippoGridManager->getConnectedGrid()->getCurrencySymbol(), + callback, object_id, TRUE); if (!floater) return; LLSelectNode* node = floater->mObjectSelection->getFirstRootNode(); @@ -362,7 +370,9 @@ void LLFloaterPay::payDirectly(money_callback callback, const LLUUID& target_id, BOOL is_group) { - LLFloaterPay *floater = new LLFloaterPay("Give L$", callback, target_id, FALSE); + LLFloaterPay *floater = new LLFloaterPay( + "Give " + gHippoGridManager->getConnectedGrid()->getCurrencySymbol(), + callback, target_id, FALSE); if (!floater) return; floater->childSetVisible("amount", TRUE); diff --git a/linden/indra/newview/llhoverview.cpp b/linden/indra/newview/llhoverview.cpp index 44ef594..5d59818 100644 --- a/linden/indra/newview/llhoverview.cpp +++ b/linden/indra/newview/llhoverview.cpp @@ -72,6 +72,8 @@ #include "llhudmanager.h" // For testing effects #include "llhudeffect.h" +#include "hippoGridManager.h" + // // Constants // @@ -387,7 +389,7 @@ void LLHoverView::updateText() if (object->flagTakesMoney() || (parent && parent->flagTakesMoney()) ) { - line.append(LLTrans::getString("TooltipFlagL$") + " "); + line.append(gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + " "); suppressObjectHoverDisplay = FALSE; // Show tip } @@ -433,6 +435,7 @@ void LLHoverView::updateText() else if (for_sale) { LLStringUtil::format_map_t args; + args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); args["[AMOUNT]"] = llformat("%d", nodep->mSaleInfo.getSalePrice()); line.append(LLTrans::getString("TooltipForSaleL$", args)); suppressObjectHoverDisplay = FALSE; // Show tip @@ -614,6 +617,7 @@ void LLHoverView::updateText() if (hover_parcel && hover_parcel->getParcelFlag(PF_FOR_SALE)) { LLStringUtil::format_map_t args; + args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); args["[AMOUNT]"] = llformat("%d", hover_parcel->getSalePrice()); line = LLTrans::getString("TooltipForSaleL$", args); mText.push_back(line); diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index f8c3b30..a436d2d 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp @@ -56,6 +56,8 @@ #include "lluictrlfactory.h" #include "llversionviewer.h" +#include "hippoGridManager.h" + // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0e) | Added: RLVa-0.2.0b #include "rlvhandler.h" // [/RLVa:KB] @@ -552,6 +554,10 @@ void LLNotifyBox::format(std::string& msg, const LLStringUtil::format_map_t& arg // targs["[SECOND_LIFE]"] = LLNotifications::instance().getGlobalString("SECOND_LIFE"); // targs["[VIEWER_NAME]"] = LLNotifications::instance().getGlobalString("VIEWER_NAME"); + //targs["[GRID_NAME]"] = gHippoGridManager->getConnectedGrid()->getGridName(); + //targs["[GRID_SITE]"] = gHippoGridManager->getConnectedGrid()->getWebSite(); + //targs["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); + LLStringUtil::format(msg, targs); } diff --git a/linden/indra/newview/llpanelaudioprefs.cpp b/linden/indra/newview/llpanelaudioprefs.cpp index 86ece1d..7ad8712 100644 --- a/linden/indra/newview/llpanelaudioprefs.cpp +++ b/linden/indra/newview/llpanelaudioprefs.cpp @@ -62,6 +62,8 @@ #include "llviewerwindow.h" #include "llviewercontrol.h" +#include "hippoGridManager.h" + // // Static functions // @@ -88,6 +90,8 @@ LLPanelAudioPrefs::~LLPanelAudioPrefs() BOOL LLPanelAudioPrefs::postBuild() { refreshValues(); // initialize member data from saved settings + childSetLabelArg("L$ Change Threshold", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); + return TRUE; } diff --git a/linden/indra/newview/llpanelclassified.cpp b/linden/indra/newview/llpanelclassified.cpp index 4428133..c6f9b0c 100644 --- a/linden/indra/newview/llpanelclassified.cpp +++ b/linden/indra/newview/llpanelclassified.cpp @@ -71,6 +71,8 @@ #include "llviewerwindow.h" // for window width, height #include "llappviewer.h" // abortQuit() +#include "hippoGridManager.h" + const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$ const S32 MATURE_UNDEFINED = -1; const S32 MATURE_CONTENT = 1; @@ -677,6 +679,7 @@ void LLPanelClassified::processClassifiedInfoReply(LLMessageSystem *msg, void ** std::string datestr = llformat("%02d/%02d/%d", now->tm_mon+1, now->tm_mday, now->tm_year+1900); LLStringUtil::format_map_t string_args; string_args["[DATE]"] = datestr; + string_args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); string_args["[AMT]"] = llformat("%d", price_for_listing); self->childSetText("classified_info_text", self->getString("ad_placed_paid", string_args)); @@ -873,6 +876,7 @@ void LLPanelClassified::callbackGotPriceForListing(S32 option, std::string text, LLSD args; std::string price_text = llformat("%d", MINIMUM_PRICE_FOR_LISTING); args["MIN_PRICE"] = price_text; + args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); LLNotifications::instance().add("MinClassifiedPrice", args); return; @@ -884,6 +888,7 @@ void LLPanelClassified::callbackGotPriceForListing(S32 option, std::string text, LLSD args; args["AMOUNT"] = llformat("%d", price_for_listing); + args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); LLNotifications::instance().add("PublishClassified", args, LLSD(), boost::bind(&LLPanelClassified::confirmPublish, self, _1, _2)); } diff --git a/linden/indra/newview/llpaneldirland.cpp b/linden/indra/newview/llpaneldirland.cpp index 8f4aa9f..c702931 100644 --- a/linden/indra/newview/llpaneldirland.cpp +++ b/linden/indra/newview/llpaneldirland.cpp @@ -52,6 +52,8 @@ #include "llviewercontrol.h" #include "llviewermessage.h" #include "llnotify.h" +#include "hippoGridManager.h" + //----------------------------------------------------------------------------- // Constants //----------------------------------------------------------------------------- @@ -99,6 +101,10 @@ BOOL LLPanelDirLand::postBuild() childSetAction("Search", onClickSearchCore, this); setDefaultBtn("Search"); + childSetTextArg("land", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); + childSetTextArg("pricecheck_symbol", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); + childSetLabelArg("pricecheck", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); + mCurrentSortColumn = "per_meter"; LLScrollListCtrl* results = getChild("results"); @@ -106,6 +112,16 @@ BOOL LLPanelDirLand::postBuild() { results->setSortChangedCallback(onClickSort); results->sortByColumn(mCurrentSortColumn,mCurrentSortAscending); + + LLStringUtil::format_map_t args; + args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); + int n = results->getNumColumns(); + for (int i=0; igetColumn(i); + std::string label = col->mLabel; + LLStringUtil::format(label, args); + results->setColumnLabel(col->mName, label); + } } return TRUE; diff --git a/linden/indra/newview/llpanelgroupgeneral.cpp b/linden/indra/newview/llpanelgroupgeneral.cpp index cbf4a87..8553291 100644 --- a/linden/indra/newview/llpanelgroupgeneral.cpp +++ b/linden/indra/newview/llpanelgroupgeneral.cpp @@ -34,6 +34,8 @@ #include "llpanelgroupgeneral.h" +#include "hippoGridManager.h" + #include "lluictrlfactory.h" #include "llagent.h" #include "roles_constants.h" @@ -185,6 +187,7 @@ BOOL LLPanelGroupGeneral::postBuild() mCtrlEnrollmentFee = getChild("check_enrollment_fee", recurse); if (mCtrlEnrollmentFee) { + mCtrlEnrollmentFee->setLabelArg("[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); mCtrlEnrollmentFee->setCommitCallback(onCommitEnrollment); mCtrlEnrollmentFee->setCallbackUserData(this); } @@ -235,6 +238,9 @@ BOOL LLPanelGroupGeneral::postBuild() mComboActiveTitle->resetDirty(); } + LLStringUtil::format_map_t args; + args["[GROUPCREATEFEE]"] = gHippoGridManager->getConnectedGrid()->getGroupCreationFee(); + mConfirmGroupCreateStr = getString("confirm_group_create_str", args); mIncompleteMemberDataStr = getString("incomplete_member_data_str"); mConfirmGroupCreateStr = getString("confirm_group_create_str"); @@ -351,6 +357,7 @@ void LLPanelGroupGeneral::onClickJoin(void *userdata) S32 cost = gdatap->mMembershipFee; LLSD args; args["COST"] = llformat("%d", cost); + args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); LLSD payload; payload["group_id"] = self->mGroupID; @@ -730,7 +737,9 @@ void LLPanelGroupGeneral::update(LLGroupChange gc) if ( visible ) { - fee_buff = llformat( "Join (L$%d)", gdatap->mMembershipFee); + fee_buff = llformat( "Join (%s%d)", + gHippoGridManager->getConnectedGrid()->getCurrencySymbol().c_str(), + gdatap->mMembershipFee); mBtnJoinGroup->setLabelSelected(fee_buff); mBtnJoinGroup->setLabelUnselected(fee_buff); } diff --git a/linden/indra/newview/llpanelgrouplandmoney.cpp b/linden/indra/newview/llpanelgrouplandmoney.cpp index f69ea9f..bded59c 100644 --- a/linden/indra/newview/llpanelgrouplandmoney.cpp +++ b/linden/indra/newview/llpanelgrouplandmoney.cpp @@ -55,6 +55,8 @@ #include "llfloaterworldmap.h" #include "llviewermessage.h" +#include "hippoGridManager.h" + //////////////////////////////////////////////////////////////////////////// class LLGroupMoneyTabEventHandler @@ -528,6 +530,9 @@ void LLPanelGroupLandMoney::activate() mImplementationp->mBeenActivated = true; } + setLabelArg("[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); + childSetTextArg("group_money_heading", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); + //fill in the max contribution //This calculation is unfortunately based on @@ -779,7 +784,9 @@ void LLPanelGroupLandMoney::processPlacesReply(LLMessageSystem* msg, void**) LLPanelGroupLandMoney* selfp = sGroupIDs.getIfThere(group_id); if(!selfp) { - llinfos << "Group Panel Land L$ " << group_id << " no longer in existence." + llinfos << "Group Panel Land " + << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + << ' ' << group_id << " no longer in existence." << llendl; return; } @@ -1116,7 +1123,9 @@ void LLPanelGroupLandMoney::processGroupAccountDetailsReply(LLMessageSystem* msg msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group L$ history reply for another agent!" << llendl; + llwarns << "Got group " + << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + << " history reply for another agent!" << llendl; return; } @@ -1287,7 +1296,9 @@ void LLPanelGroupLandMoney::processGroupAccountTransactionsReply(LLMessageSystem msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group L$ history reply for another agent!" << llendl; + llwarns << "Got group " + << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + << " history reply for another agent!" << llendl; return; } @@ -1428,7 +1439,9 @@ void LLGroupMoneyPlanningTabEventHandler::processReply(LLMessageSystem* msg, text.append("The next stipend day is "); text.append(next_stipend_date); text.append("\n\n"); - text.append(llformat("%-24sL$%6d\n", "Balance", balance )); + text.append(llformat("%-24s%s%6d\n", "Balance", + gHippoGridManager->getConnectedGrid()->getCurrencySymbol().c_str(), + balance)); text.append(1, '\n'); } @@ -1458,7 +1471,9 @@ void LLPanelGroupLandMoney::processGroupAccountSummaryReply(LLMessageSystem* msg msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id ); if (gAgent.getID() != agent_id) { - llwarns << "Got group L$ history reply for another agent!" << llendl; + llwarns << "Got group " + << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + << " history reply for another agent!" << llendl; return; } @@ -1470,7 +1485,9 @@ void LLPanelGroupLandMoney::processGroupAccountSummaryReply(LLMessageSystem* msg self = LLGroupMoneyTabEventHandler::sInstanceIDs.getIfThere(request_id); if (!self) { - llwarns << "GroupAccountSummary recieved for non-existent group L$ planning tab." << llendl; + llwarns << "GroupAccountSummary recieved for non-existent group " + << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + << " planning tab." << llendl; return; } diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp index 2b78281..f882362 100644 --- a/linden/indra/newview/llpanelinventory.cpp +++ b/linden/indra/newview/llpanelinventory.cpp @@ -86,6 +86,8 @@ #include "llvoavatar.h" // [/RLVa:KB] +#include "hippoGridManager.h" + ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs ///---------------------------------------------------------------------------- @@ -238,6 +240,7 @@ void LLTaskInvFVBridge::buyItem() { LLSD args; args["PRICE"] = llformat("%d",sale_info.getSalePrice()); + args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); args["OWNER"] = owner_name; if (sale_info.getSaleType() != LLSaleInfo::FS_CONTENTS) { @@ -724,7 +727,7 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) else { std::ostringstream info; - info << "Buy for L$" << price; + info << "Buy for " << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() << price; label.assign(info.str()); } @@ -1102,7 +1105,7 @@ void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) else { std::ostringstream info; - info << "Buy for L$" << price; + info << "Buy for " << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() << price; label.assign(info.str()); } diff --git a/linden/indra/newview/llpanelland.cpp b/linden/indra/newview/llpanelland.cpp index 27bfaea..7c9faaf 100644 --- a/linden/indra/newview/llpanelland.cpp +++ b/linden/indra/newview/llpanelland.cpp @@ -49,6 +49,8 @@ #include "lluictrlfactory.h" +#include "hippoGridManager.h" + LLPanelLandSelectObserver* LLPanelLandInfo::sObserver = NULL; LLPanelLandInfo* LLPanelLandInfo::sInstance = NULL; @@ -213,6 +215,7 @@ void LLPanelLandInfo::refresh() &dwell); if(is_public || (is_for_sale && LLViewerParcelMgr::getInstance()->getParcelSelection()->getWholeParcelSelected())) { + childSetTextArg("label_area_price","[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); childSetTextArg("label_area_price","[PRICE]", llformat("%d",claim_price)); childSetTextArg("label_area_price","[AREA]", llformat("%d",area)); childSetVisible("label_area_price",true); diff --git a/linden/indra/newview/llpanelmsgs.cpp b/linden/indra/newview/llpanelmsgs.cpp index 42af550..3ea7aa5 100644 --- a/linden/indra/newview/llpanelmsgs.cpp +++ b/linden/indra/newview/llpanelmsgs.cpp @@ -40,6 +40,8 @@ #include "lluictrlfactory.h" #include "llfirstuse.h" +#include "hippoGridManager.h" + //----------------------------------------------------------------------------- LLPanelMsgs::LLPanelMsgs() : LLPanel("Messages Panel") @@ -66,6 +68,7 @@ BOOL LLPanelMsgs::postBuild() childSetValue("show_in_inventory", gSavedSettings.getBOOL("ShowInInventory")); childSetValue("notify_money_change_checkbox", gSavedSettings.getBOOL("NotifyMoneyChange")); + childSetLabelArg("notify_money_change_checkbox", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); return TRUE; } diff --git a/linden/indra/newview/llpanelpermissions.cpp b/linden/indra/newview/llpanelpermissions.cpp index 0cb5b9e..cd1aee7 100644 --- a/linden/indra/newview/llpanelpermissions.cpp +++ b/linden/indra/newview/llpanelpermissions.cpp @@ -65,6 +65,8 @@ #include "lluictrlfactory.h" #include "roles_constants.h" +#include "hippoGridManager.h" + ///---------------------------------------------------------------------------- /// Class llpanelpermissions ///---------------------------------------------------------------------------- @@ -134,6 +136,9 @@ LLPanelPermissions::~LLPanelPermissions() void LLPanelPermissions::refresh() { + LLStringUtil::format_map_t argsCurrency; + argsCurrency["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); + LLButton* BtnDeedToGroup = getChild("button deed"); if(BtnDeedToGroup) { @@ -234,7 +239,7 @@ void LLPanelPermissions::refresh() } childSetEnabled("Cost",false); - childSetText("Cost",getString("Cost Default")); + childSetText("Cost", getString("Cost Default", argsCurrency)); childSetText("Edit Cost",LLStringUtil::null); childSetEnabled("Edit Cost",false); @@ -465,11 +470,11 @@ void LLPanelPermissions::refresh() // If there are multiple items for sale then set text to PRICE PER UNIT. if (num_for_sale > 1) { - childSetText("Cost",getString("Cost Per Unit")); + childSetText("Cost",getString("Cost Per Unit", argsCurrency)); } else { - childSetText("Cost",getString("Cost Default")); + childSetText("Cost",getString("Cost Default", argsCurrency)); } LLLineEditor *editPrice = getChild("Edit Cost"); @@ -510,15 +515,15 @@ void LLPanelPermissions::refresh() // If multiple items are for sale, set text to TOTAL PRICE. if (num_for_sale > 1) - childSetText("Cost",getString("Cost Total")); + childSetText("Cost", getString("Cost Total", argsCurrency)); else - childSetText("Cost",getString("Cost Default")); + childSetText("Cost", getString("Cost Default", argsCurrency)); } // This is a public object. else { childSetEnabled("Cost",false); - childSetText("Cost",getString("Cost Default")); + childSetText("Cost", getString("Cost Default", argsCurrency)); childSetText("Edit Cost",LLStringUtil::null); childSetEnabled("Edit Cost",false); @@ -954,7 +959,9 @@ bool callback_deed_to_group(const LLSD& notification, const LLSD& response) void LLPanelPermissions::onClickDeedToGroup(void* data) { - LLNotifications::instance().add( "DeedObjectToGroup", LLSD(), LLSD(), callback_deed_to_group); + LLSD args; + args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); + LLNotifications::instance().add( "DeedObjectToGroup", args, LLSD(), callback_deed_to_group); } ///---------------------------------------------------------------------------- @@ -1060,6 +1067,9 @@ void LLPanelPermissions::setAllSaleInfo() llinfos << "LLPanelPermissions::setAllSaleInfo()" << llendl; LLSaleInfo::EForSale sale_type = LLSaleInfo::FS_NOT; + LLStringUtil::format_map_t argsCurrency; + argsCurrency["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); + LLCheckBoxCtrl *checkPurchase = getChild("checkbox for sale"); // Set the sale type if the object(s) are for sale. @@ -1093,7 +1103,7 @@ void LLPanelPermissions::setAllSaleInfo() { // Don't extract the price if it's labeled as MIXED or is empty. const std::string& editPriceString = editPrice->getText(); - if (editPriceString != getString("Cost Mixed") && + if (editPriceString != getString("Cost Mixed", argsCurrency) && !editPriceString.empty()) { price = atoi(editPriceString.c_str()); diff --git a/linden/indra/newview/llpanelplace.cpp b/linden/indra/newview/llpanelplace.cpp index 7ca3622..300cd79 100644 --- a/linden/indra/newview/llpanelplace.cpp +++ b/linden/indra/newview/llpanelplace.cpp @@ -58,6 +58,8 @@ #include "llweb.h" #include "llsdutil.h" +#include "hippoGridManager.h" + //static std::list LLPanelPlace::sAllPanels; @@ -311,6 +313,7 @@ void LLPanelPlace::processParcelInfoReply(LLMessageSystem *msg, void **) if (flags & DFQ_FOR_SALE) { LLUIString forsale = self->getString("forsale_text"); + forsale.setArg("[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); forsale.setArg("[PRICE]", llformat("%d", sale_price)); info_text += forsale; } diff --git a/linden/indra/newview/llstatusbar.cpp b/linden/indra/newview/llstatusbar.cpp index b4076b9..5434c20 100644 --- a/linden/indra/newview/llstatusbar.cpp +++ b/linden/indra/newview/llstatusbar.cpp @@ -87,6 +87,8 @@ #include +#include "hippoGridManager.h" + // // Globals // @@ -669,10 +671,8 @@ void LLStatusBar::creditBalance(S32 credit) void LLStatusBar::setBalance(S32 balance) { - std::string money_str = LLResMgr::getInstance()->getMonetaryString( balance ); - std::string balance_str = "L$"; - balance_str += money_str; - mTextBalance->setText( balance_str ); + mTextBalance->setText(gHippoGridManager->getConnectedGrid()->getCurrencySymbol().c_str() + + LLResMgr::getInstance()->getMonetaryString(balance)); if (mBalance && (fabs((F32)(mBalance - balance)) > gSavedSettings.getF32("UISndMoneyChangeThreshold"))) { diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 9d06853..770384a 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -225,6 +225,7 @@ #include "jcfloater_animation_list.h" #include "llfloaterassetbrowser.h" +#include "hippoGridManager.h" #include "hippoLimits.h" using namespace LLVOAvatarDefines; @@ -665,12 +666,14 @@ void init_menus() LLViewerLogin::getInstance()->isInProductionGrid()); // Assume L$10 for now, the server will tell us the real cost at login - const std::string upload_cost("10"); - gMenuHolder->childSetLabelArg("Upload Image", "[COST]", upload_cost); - gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", upload_cost); - gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", upload_cost); - gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", upload_cost); - gMenuHolder->childSetLabelArg("ImportUpload", "[COST]", upload_cost); + std::string fee = gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + "10"; + gMenuHolder->childSetLabelArg("Upload Image", "[UPLOADFEE]", fee); + gMenuHolder->childSetLabelArg("Upload Sound", "[UPLOADFEE]", fee); + gMenuHolder->childSetLabelArg("Upload Animation", "[UPLOADFEE]", fee); + gMenuHolder->childSetLabelArg("Bulk Upload", "[UPLOADFEE]", fee); + gMenuHolder->childSetLabelArg("ImportUpload", "[UPLOADFEE]", fee); + gMenuHolder->childSetLabelArg("Buy and Sell L$...", "[CURRENCY]", + gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); gAFKMenu = gMenuBarView->getChild("Set Away", TRUE); gBusyMenu = gMenuBarView->getChild("Set Busy", TRUE); diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 5609edf..7a52b84 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -138,11 +138,12 @@ #include "llviewerdisplay.h" #include "llkeythrottle.h" -#include "hippoLimits.h" - #include #include // Boost Reg Expresions +#include "hippoGridManager.h" +#include "hippoLimits.h" + #if LL_WINDOWS // For Windows specific error handler #include "llwindebug.h" // For the invalid message handler #endif @@ -682,6 +683,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) delete_context_data = FALSE; LLSD args; args["COST"] = llformat("%d", fee); + args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); // Set the fee for next time to 0, so that we don't keep // asking about a fee. LLSD next_payload = notification["payload"]; @@ -4632,7 +4634,8 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) msg->getS32("MoneyData", "SquareMetersCredit", credit); msg->getS32("MoneyData", "SquareMetersCommitted", committed); msg->getStringFast(_PREHASH_MoneyData, _PREHASH_Description, desc); - LL_INFOS("Messaging") << "L$, credit, committed: " << balance << " " << credit << " " + LL_INFOS("Messaging") << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + << ", credit, committed: " << balance << " " << credit << " " << committed << LL_ENDL; if (gStatusBar) @@ -5030,15 +5033,21 @@ void process_economy_data(LLMessageSystem *msg, void** /*user_data*/) S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload(); - LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is L$" << upload_cost << LL_ENDL; + LL_INFOS_ONCE("Messaging") << "EconomyData message arrived; upload cost is " + << gHippoGridManager->getConnectedGrid()->getCurrencySymbol() + << upload_cost << LL_ENDL; LLFloaterImagePreview::setUploadAmount(upload_cost); LLFloaterAnimPreview::setUploadAmount(upload_cost); - gMenuHolder->childSetLabelArg("Upload Image", "[COST]", llformat("%d", upload_cost)); - gMenuHolder->childSetLabelArg("Upload Sound", "[COST]", llformat("%d", upload_cost)); - gMenuHolder->childSetLabelArg("Upload Animation", "[COST]", llformat("%d", upload_cost)); - gMenuHolder->childSetLabelArg("Bulk Upload", "[COST]", llformat("%d", upload_cost)); + std::string fee = gHippoGridManager->getConnectedGrid()->getUploadFee(); + gMenuHolder->childSetLabelArg("Upload Image", "[UPLOADFEE]", fee); + gMenuHolder->childSetLabelArg("Upload Sound", "[UPLOADFEE]", fee); + gMenuHolder->childSetLabelArg("Upload Animation", "[UPLOADFEE]", fee); + gMenuHolder->childSetLabelArg("Bulk Upload", "[UPLOADFEE]", fee); + gMenuHolder->childSetLabelArg("ImportUpload", "[UPLOADFEE]", fee); + gMenuHolder->childSetLabelArg("Buy and Sell L$...", "[CURRENCY]", + gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); } void notify_cautioned_script_question(const LLSD& notification, const LLSD& response, S32 orig_questions, BOOL granted) @@ -5112,7 +5121,9 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp perms.append(", "); } - perms.append(LLFloaterChat::getInstance()->getString(SCRIPT_QUESTIONS[i])); + LLStringUtil::format_map_t args; + args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); + perms.append(LLFloaterChat::getInstance()->getString(SCRIPT_QUESTIONS[i], args)); } } @@ -5273,8 +5284,11 @@ void process_script_question(LLMessageSystem *msg, void **user_data) { if (questions & LSCRIPTRunTimePermissionBits[i]) { + LLStringUtil::format_map_t args; + args["[CURRENCY]"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); + count++; - script_question += " " + LLFloaterChat::getInstance()->getString(SCRIPT_QUESTIONS[i]) + "\n"; + script_question += " " + LLFloaterChat::getInstance()->getString(SCRIPT_QUESTIONS[i], args) + "\n"; // check whether permission question should cause special caution dialog caution |= (SCRIPT_QUESTION_IS_CAUTION[i]); diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp index b0e1e78..cb8ae66 100644 --- a/linden/indra/newview/llviewerparcelmgr.cpp +++ b/linden/indra/newview/llviewerparcelmgr.cpp @@ -70,6 +70,8 @@ #include "roles_constants.h" #include "llweb.h" +#include "hippoGridManager.h" + const F32 PARCEL_COLLISION_DRAW_SECS = 1.f; @@ -2016,6 +2018,7 @@ void LLViewerParcelMgr::startReleaseLand() // Compute claim price LLSD args; args["AREA"] = llformat("%d",mCurrentParcel->getArea()); + args["CURRENCY"] = gHippoGridManager->getConnectedGrid()->getCurrencySymbol(); LLNotifications::instance().add("ReleaseLandWarning", args, LLSD(), releaseAlertCB); } diff --git a/linden/indra/newview/llworldmap.cpp b/linden/indra/newview/llworldmap.cpp index 572f31f..908cd87 100644 --- a/linden/indra/newview/llworldmap.cpp +++ b/linden/indra/newview/llworldmap.cpp @@ -47,6 +47,8 @@ #include "llviewerregion.h" #include "llregionflags.h" +#include "hippoGridManager.h" + const F32 REQUEST_ITEMS_TIMER = 10.f * 60.f; // 10 minutes // For DEV-17507, do lazy image loading in llworldmapview.cpp instead, @@ -790,7 +792,9 @@ void LLWorldMap::processMapItemReply(LLMessageSystem* msg, void**) case MAP_ITEM_LAND_FOR_SALE: // land for sale case MAP_ITEM_LAND_FOR_SALE_ADULT: // adult land for sale { - new_item.mToolTip = llformat("%d sq. m. L$%d", new_item.mExtra, new_item.mExtra2); + new_item.mToolTip = llformat("%d sq. m. %s%d", new_item.mExtra, + gHippoGridManager->getConnectedGrid()->getCurrencySymbol().c_str(), + new_item.mExtra2); if (type == MAP_ITEM_LAND_FOR_SALE) { LLWorldMap::getInstance()->mLandForSale.push_back(new_item); diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml b/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml index 569e421..80281f6 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml @@ -118,7 +118,7 @@ bottom="-220" drop_shadow_visible="true" enabled="true" follows="left|top" font="SansSerifSmall" h_pad="0" halign="left" height="16" left="96" mouse_opaque="true" name="For Sale: Price L$[PRICE]." v_pad="0" width="226"> - Price: L$[PRICE] (L$[PRICE_PER_SQM]/sq.m.). + Price: [CURRENCY][PRICE] ([CURRENCY][PRICE_PER_SQM]/sq.m.). About Land or select another parcel to show its details. width="119" /> @@ -991,7 +991,7 @@ Options: