From fe164b57ceed7c586b2fa2b3b854645d05e29051 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 13 Jan 2016 15:20:07 +0100 Subject: [PATCH] Make sure to set CURRENT_GRID default arg as soon as login process starts and remove cruft to set CURRENT_GRID all over the place --- indra/newview/fschathistory.cpp | 4 +--- indra/newview/fspanellogin.cpp | 1 - indra/newview/llappviewer.cpp | 8 -------- indra/newview/llfloaterauction.cpp | 2 -- indra/newview/llfloatersellland.cpp | 2 -- indra/newview/llfloatertos.cpp | 2 -- indra/newview/llstartup.cpp | 11 +++-------- indra/newview/llurldispatcher.cpp | 1 - 8 files changed, 4 insertions(+), 27 deletions(-) diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index ca160beb36..ad67f74e87 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -417,9 +417,7 @@ public: || (mSourceType == CHAT_SOURCE_SYSTEM && mType != CHAT_TYPE_RADAR) || mAvatarID.isNull()) { - //mFrom = LLTrans::getString("SECOND_LIFE"); - //[FIX FIRE-2852] Changed function to find the right Gridname - mFrom = LLGridManager::getInstance()->getGridLabel(); + mFrom = LLTrans::getString("CURRENT_GRID"); if(!chat.mFromName.empty() && (mFrom != chat.mFromName)) { mFrom += " (" + chat.mFromName + ")"; diff --git a/indra/newview/fspanellogin.cpp b/indra/newview/fspanellogin.cpp index 5bfd003e03..2858c5df84 100644 --- a/indra/newview/fspanellogin.cpp +++ b/indra/newview/fspanellogin.cpp @@ -871,7 +871,6 @@ void FSPanelLogin::onClickConnect(void *) { // user must type in something into the username field LLSD args; - args["CURRENT_GRID"] = LLGridManager::getInstance()->getGridLabel(); LLNotificationsUtil::add("MustHaveAccountToLogIn", args); } else diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 082471e66b..4ee2c36fc3 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3282,12 +3282,8 @@ bool LLAppViewer::initConfiguration() LLStringUtil::format_map_t args; // // //args["[APP_NAME]"] = LLTrans::getString("SECOND_LIFE"); - // //[FIX FIRE-2852] Changed function to find the right Gridname - // args["[APP_NAME]"] = LLGridManager::getInstance()->getGridLabel(); - // //[FIX FIRE-2919] Making sure Current_grid has the right value args["[APP_NAME]"] = LLTrans::getString("APP_NAME"); // - args["[CURRENT_GRID]"] = LLGridManager::getInstance()->getGridLabel(); splash_msg = LLTrans::getString("StartupLoading", args); LLSplashScreen::show(); LLSplashScreen::update(splash_msg); @@ -5420,15 +5416,11 @@ void LLAppViewer::forceDisconnect(const std::string& mesg) { // Tell users what happened args["ERROR_MESSAGE"] = big_reason; - //[FIX FIRE-2919] Making sure Current_grid has the right value - args["CURRENT_GRID"] = LLGridManager::getInstance()->getGridLabel(); LLNotificationsUtil::add("ErrorMessage", args, LLSD(), &finish_forced_disconnect); } else { args["MESSAGE"] = big_reason; - //[FIX FIRE-2919] Making sure Current_grid has the right value - args["CURRENT_GRID"] = LLGridManager::getInstance()->getGridLabel(); LLNotificationsUtil::add("YouHaveBeenLoggedOut", args, LLSD(), &finish_disconnect ); } } diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index a3c985bc88..187a3ad9ae 100755 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -437,8 +437,6 @@ void LLFloaterAuction::onClickSellToAnyone(void* data) args["LAND_SIZE"] = llformat("%d", area); args["SALE_PRICE"] = llformat("%d", sale_price); args["NAME"] = LLTrans::getString("Anyone"); - // Fill [CURRENT_GRID] placeholder (FIRE-6777) - args["CURRENT_GRID"] = LLGridManager::getInstance()->getGridLabel(); LLNotification::Params params("ConfirmLandSaleChange"); // Re-use existing dialog params.substitutions(args) diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 9cf2d5805f..12c96dc7ef 100755 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -491,8 +491,6 @@ void LLFloaterSellLandUI::doSellLand(void *userdata) args["LAND_SIZE"] = llformat("%d",area); args["SALE_PRICE"] = llformat("%d",sale_price); args["NAME"] = authorizedBuyerName; - // Fill [CURRENT_GRID] placeholder (FIRE-6777) - args["CURRENT_GRID"] = LLGridManager::getInstance()->getGridLabel(); LLNotification::Params params("ConfirmLandSaleChange"); params.substitutions(args) diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index 8a33ca9e2f..e82c2a18c0 100755 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -307,8 +307,6 @@ void LLFloaterTOS::onCancel( void* userdata ) LLSD args; LLFloaterTOS* self = (LLFloaterTOS*) userdata; LL_INFOS("TOS") << "User disagrees with TOS." << LL_ENDL; - //[FIX FIRE-3143 SJ] Making sure Current_grid has the right value - args["[CURRENT_GRID]"] = LLGridManager::getInstance()->getGridLabel(); LLNotificationsUtil::add("MustAgreeToLogIn", args, LLSD(), login_alert_done); if(self->mReplyPumpName != "") diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index a16659ce8e..e1c32780a8 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1476,7 +1476,7 @@ bool idle_startup() // eLastExecEvent last_exec_event = gLastExecEvent; - const std::string current_grid =LLGridManager::getInstance()->getGrid(); + const std::string current_grid = LLGridManager::getInstance()->getGrid(); const std::string last_grid = gSavedSettings.getString("LastConnectedGrid"); if (!last_grid.empty() && last_grid != current_grid) { @@ -1484,6 +1484,7 @@ bool idle_startup() // since a bad OpenSim setup can crash the viewer a lot last_exec_event = LAST_EXEC_NORMAL; } + LLTrans::setDefaultArg("CURRENT_GRID", LLGridManager::getInstance()->getGridLabel()); // // Setting initial values... @@ -2751,14 +2752,8 @@ bool idle_startup() // initial outfit, but if the load hasn't started // already then something is wrong so fall back // to generic outfits. JC - // Set CURRENT_GRID parameter - //LLNotificationsUtil::add("WelcomeChooseSex", LLSD(), LLSD(), - // callback_choose_gender); - LLSD args; - args["CURRENT_GRID"] = LLGridManager::getInstance()->getGridLabel(); - LLNotificationsUtil::add("WelcomeChooseSex", args, LLSD(), + LLNotificationsUtil::add("WelcomeChooseSex", LLSD(), LLSD(), callback_choose_gender); - // Set CURRENT_GRID parameter LLStartUp::setStartupState( STATE_CLEANUP ); } diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 12cbbf7f2d..97512fae90 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -272,7 +272,6 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const LLSLURL& { LLSD args; args["SLURL"] = slurl.getLocationString(); - args["CURRENT_GRID"] = LLGridManager::getInstance()->getGridLabel(); args["GRID"] = LLGridManager::getInstance()->getGridLabel(slurl.getGrid()); LLNotificationsUtil::add("CantTeleportToGrid", args); return;