diff options
author | Oz Linden <oz@lindenlab.com> | 2012-09-25 17:24:28 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2012-09-25 17:24:28 -0400 |
commit | bb73374ba13220378485a88bee9649772eba8b44 (patch) | |
tree | 88bb3aa0bec61c85e353323ab2b9aaaec67c3828 | |
parent | d5dbd2e9c1b82e475bd5650a39b3c40fd4c5b51d (diff) |
MAINT-1410: make pre-login changes to login location preference affect the login panel
-rw-r--r-- | indra/newview/llviewercontrol.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index dec1615246..051f5f4485 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -72,6 +72,8 @@ #include "llpanellogin.h" #include "llpaneltopinfobar.h" #include "llspellcheck.h" +#include "llslurl.h" +#include "llstartup.h" #include "llupdaterservice.h" // Third party library includes @@ -496,6 +498,20 @@ bool handleForceShowGrid(const LLSD& newvalue) return true; } +bool handleLoginLocationChanged() +{ + /* + * This connects the default preference setting to the state of the login + * panel if it is displayed; if you open the preferences panel before + * logging in, and change the default login location there, the login + * panel immediately changes to match your new preference. + */ + std::string new_login_location = gSavedSettings.getString("LoginLocation"); + LL_DEBUGS("AppInit")<<new_login_location<<LL_ENDL; + LLStartUp::setStartSLURL(LLSLURL(new_login_location)); + return true; +} + bool handleSpellCheckChanged() { if (gSavedSettings.getBOOL("SpellCheck")) @@ -721,6 +737,7 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderTransparentWater")->getSignal()->connect(boost::bind(&handleRenderTransparentWaterChanged, _2)); gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&handleSpellCheckChanged)); gSavedSettings.getControl("SpellCheckDictionary")->getSignal()->connect(boost::bind(&handleSpellCheckChanged)); + gSavedSettings.getControl("LoginLocation")->getSignal()->connect(boost::bind(&handleLoginLocationChanged)); } #if TEST_CACHED_CONTROL |