From 09d8d17382c72b7741fde1334e832f39d773299f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 2 Jul 2013 15:30:49 -0400 Subject: CHOP-959: Introduce CmdLineLoginLocation var for --url and --slurl. Route --url and --slurl command-line switches through a common settings variable. Treat them uniformly now. (Previously, passing --url would notice a grid-specific SLURL and preselect that grid; --slurl wouldn't. Now both do.) --- indra/newview/app_settings/cmd_line.xml | 6 ++++-- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llappviewer.cpp | 27 +++++++++++---------------- 3 files changed, 26 insertions(+), 18 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 8ca33fbf54..71a052057c 100755 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -372,7 +372,8 @@ true last_option true - + map-to + CmdLineLoginLocation url @@ -383,7 +384,8 @@ 1 last_option true - + map-to + CmdLineLoginLocation usersessionsettings diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index a39b447cca..8a50ca146b 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1795,6 +1795,17 @@ + CmdLineLoginLocation + + Comment + Startup destination requested on command line + Persist + 0 + Type + String + Value + + ConnectAsGod Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 613a23630f..3116dd4b00 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2597,20 +2597,16 @@ bool LLAppViewer::initConfiguration() // What can happen is that someone can use IE (or potentially // other browsers) and do the rough equivalent of command // injection and steal passwords. Phoenix. SL-55321 - if(clp.hasOption("url")) - { - LLStartUp::setStartSLURL(LLSLURL(clp.getOption("url")[0])); - if(LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION) - { - LLGridManager::getInstance()->setGridChoice(LLStartUp::getStartSLURL().getGrid()); - - } - } - else if(clp.hasOption("slurl")) - { - LLSLURL start_slurl(clp.getOption("slurl")[0]); + std::string CmdLineLoginLocation(gSavedSettings.getString("CmdLineLoginLocation")); + if(! CmdLineLoginLocation.empty()) + { + LLSLURL start_slurl(CmdLineLoginLocation); LLStartUp::setStartSLURL(start_slurl); - } + if(start_slurl.getType() == LLSLURL::LOCATION) + { + LLGridManager::getInstance()->setGridChoice(start_slurl.getGrid()); + } + } const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent"); if(skinfolder && LLStringUtil::null != skinfolder->getValue().asString()) @@ -2753,9 +2749,8 @@ bool LLAppViewer::initConfiguration() LL_DEBUGS("AppInit")<<"set start from NextLoginLocation: "< Date: Tue, 2 Jul 2013 16:33:40 -0400 Subject: CHOP-959: Introduce CmdLineChannel settings var, map --channel to it. --- indra/newview/app_settings/cmd_line.xml | 3 ++- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llappviewer.cpp | 7 ++++--- 3 files changed, 17 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 71a052057c..74117dbd85 100755 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -22,7 +22,8 @@ count 1 - + map-to + CmdLineChannel console diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8a50ca146b..6f50a72016 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1749,6 +1749,17 @@ Value 0 + CmdLineChannel + + Comment + Command line specified channel name + Persist + 0 + Type + String + Value + + CmdLineDisableVoice Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 3116dd4b00..37f1f11451 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2536,9 +2536,10 @@ bool LLAppViewer::initConfiguration() } } - if(clp.hasOption("channel")) - { - LLVersionInfo::resetChannel(clp.getOption("channel")[0]); + std::string CmdLineChannel(gSavedSettings.getString("CmdLineChannel")); + if(! CmdLineChannel.empty()) + { + LLVersionInfo::resetChannel(CmdLineChannel); } // If we have specified crash on startup, set the global so we'll trigger the crash at the right time -- cgit v1.2.3