summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp124
1 files changed, 56 insertions, 68 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 932a1ef46f..c3663b12dd 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2439,9 +2439,9 @@ bool LLAppViewer::initConfiguration()
bool set_defaults = true;
if(!loadSettingsFromDirectory("Default", set_defaults))
{
- std::ostringstream msg;
- msg << "Unable to load default settings file. The installation may be corrupted.";
- OSMessageBox(msg.str(),LLStringUtil::null,OSMB_OK);
+ OSMessageBox(
+ "Unable to load default settings file. The installation may be corrupted.",
+ LLStringUtil::null,OSMB_OK);
return false;
}
@@ -2562,7 +2562,7 @@ bool LLAppViewer::initConfiguration()
if(gSavedSettings.getBOOL("DisableCrashLogger"))
{
LL_WARNS() << "Crashes will be handled by system, stack trace logs and crash logger are both disabled" << LL_ENDL;
- LLAppViewer::instance()->disableCrashlogger();
+ disableCrashlogger();
}
// Handle initialization from settings.
@@ -2579,7 +2579,7 @@ bool LLAppViewer::initConfiguration()
LL_INFOS() << msg.str() << LL_ENDL;
OSMessageBox(
- msg.str().c_str(),
+ msg.str(),
LLStringUtil::null,
OSMB_OK);
@@ -2689,7 +2689,34 @@ bool LLAppViewer::initConfiguration()
ll_init_fail_log(gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "test_failures.log"));
}
+ const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
+ if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
+ {
+ // Examining "Language" may not suffice -- see LLUI::getLanguage()
+ // logic. Unfortunately LLUI::getLanguage() doesn't yet do us much
+ // good because we haven't yet called LLUI::initClass().
+ gDirUtilp->setSkinFolder(skinfolder->getValue().asString(),
+ gSavedSettings.getString("Language"));
+ }
+
+ if (gSavedSettings.getBOOL("SpellCheck"))
+ {
+ std::list<std::string> dict_list;
+ std::string dict_setting = gSavedSettings.getString("SpellCheckDictionary");
+ boost::split(dict_list, dict_setting, boost::is_any_of(std::string(",")));
+ if (!dict_list.empty())
+ {
+ LLSpellChecker::setUseSpellCheck(dict_list.front());
+ dict_list.pop_front();
+ LLSpellChecker::instance().setSecondaryDictionaries(dict_list);
+ }
+ }
+
// Handle slurl use. NOTE: Don't let SL-55321 reappear.
+ // This initial-SLURL logic, up through the call to
+ // sendURLToOtherInstance(), must precede LLSplashScreen::show() --
+ // because if sendURLToOtherInstance() succeeds, we take a fast exit,
+ // SKIPPING the splash screen and everything else.
// *FIX: This init code should be made more robust to prevent
// the issue SL-55321 from returning. One thought is to allow
@@ -2734,6 +2761,27 @@ bool LLAppViewer::initConfiguration()
}
}
+ // NextLoginLocation is set as a side effect of LLStartUp::setStartSLURL()
+ std::string nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" );
+ if ( !nextLoginLocation.empty() )
+ {
+ LL_DEBUGS("AppInit")<<"set start from NextLoginLocation: "<<nextLoginLocation<<LL_ENDL;
+ LLStartUp::setStartSLURL(LLSLURL(nextLoginLocation));
+ }
+ else if ( ( clp.hasOption("login") || clp.hasOption("autologin"))
+ && gSavedSettings.getString("CmdLineLoginLocation").empty())
+ {
+ // If automatic login from command line with --login switch
+ // init StartSLURL location.
+ std::string start_slurl_setting = gSavedSettings.getString("LoginLocation");
+ LL_DEBUGS("AppInit") << "start slurl setting '" << start_slurl_setting << "'" << LL_ENDL;
+ LLStartUp::setStartSLURL(LLSLURL(start_slurl_setting));
+ }
+ else
+ {
+ // the login location will be set by the login panel (see LLPanelLogin)
+ }
+
//RN: if we received a URL, hand it off to the existing instance.
// don't call anotherInstanceRunning() when doing URL handoff, as
// it relies on checking a marker file which will not work when running
@@ -2749,30 +2797,6 @@ bool LLAppViewer::initConfiguration()
}
}
- const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
- if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString())
- {
- // Examining "Language" may not suffice -- see LLUI::getLanguage()
- // logic. Unfortunately LLUI::getLanguage() doesn't yet do us much
- // good because we haven't yet called LLUI::initClass().
- gDirUtilp->setSkinFolder(skinfolder->getValue().asString(),
- gSavedSettings.getString("Language"));
- }
-
- if (gSavedSettings.getBOOL("SpellCheck"))
- {
- std::list<std::string> dict_list;
- std::string dict_setting = gSavedSettings.getString("SpellCheckDictionary");
- boost::split(dict_list, dict_setting, boost::is_any_of(std::string(",")));
- if (!dict_list.empty())
- {
- LLSpellChecker::setUseSpellCheck(dict_list.front());
- dict_list.pop_front();
- LLSpellChecker::instance().setSecondaryDictionaries(dict_list);
- }
- }
-
-
// Display splash screen. Must be after above check for previous
// crash as this dialog is always frontmost.
std::string splash_msg;
@@ -2804,30 +2828,15 @@ bool LLAppViewer::initConfiguration()
}
LLStringUtil::truncate(gWindowTitle, 255);
- //RN: if we received a URL, hand it off to the existing instance.
- // don't call anotherInstanceRunning() when doing URL handoff, as
- // it relies on checking a marker file which will not work when running
- // out of different directories
-
- if (LLStartUp::getStartSLURL().isValid() &&
- (gSavedSettings.getBOOL("SLURLPassToOtherInstance")))
- {
- if (sendURLToOtherInstance(LLStartUp::getStartSLURL().getSLURLString()))
- {
- // successfully handed off URL to existing instance, exit
- return false;
- }
- }
-
//
// Check for another instance of the app running
+ // This happens AFTER LLSplashScreen::show(). That may or may not be
+ // important.
//
if (mSecondInstance && !gSavedSettings.getBOOL("AllowMultipleViewers"))
{
- std::ostringstream msg;
- msg << LLTrans::getString("MBAlreadyRunning");
OSMessageBox(
- msg.str(),
+ LLTrans::getString("MBAlreadyRunning"),
LLStringUtil::null,
OSMB_OK);
return false;
@@ -2845,27 +2854,6 @@ bool LLAppViewer::initConfiguration()
}
}
- // NextLoginLocation is set from the command line option
- std::string nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" );
- if ( !nextLoginLocation.empty() )
- {
- LL_DEBUGS("AppInit")<<"set start from NextLoginLocation: "<<nextLoginLocation<<LL_ENDL;
- LLStartUp::setStartSLURL(LLSLURL(nextLoginLocation));
- }
- else if ( ( clp.hasOption("login") || clp.hasOption("autologin"))
- && gSavedSettings.getString("CmdLineLoginLocation").empty())
- {
- // If automatic login from command line with --login switch
- // init StartSLURL location.
- std::string start_slurl_setting = gSavedSettings.getString("LoginLocation");
- LL_DEBUGS("AppInit") << "start slurl setting '" << start_slurl_setting << "'" << LL_ENDL;
- LLStartUp::setStartSLURL(LLSLURL(start_slurl_setting));
- }
- else
- {
- // the login location will be set by the login panel (see LLPanelLogin)
- }
-
gLastRunVersion = gSavedSettings.getString("LastRunVersion");
loadColorSettings();