summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcallum <none@none>2010-10-07 12:08:03 -0700
committercallum <none@none>2010-10-07 12:08:03 -0700
commitdd2eff8da2b2508d5fc46492147e015d2455f957 (patch)
treebfae6ad41199479b578301a3c2ca7e749c18cdea
parent01b28ddf5ddc7118bc8b2047d899aee0293a8721 (diff)
EXP-167: Quit On Login Page Activated - viewer code /default setting
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llappviewer.cpp8
-rw-r--r--indra/newview/llappviewer.h1
-rw-r--r--indra/newview/llstartup.cpp10
4 files changed, 29 insertions, 1 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index d5cfc11c2c..142378b540 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6535,6 +6535,17 @@
<key>Value</key>
<real>0.0</real>
</map>
+ <key>QuitOnLoginActivated</key>
+ <map>
+ <key>Comment</key>
+ <string>Quit if login page is activated (used when auto login is on and users must not be able to login manually)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RadioLandBrushAction</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a9bdabe794..e6661e4c9a 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2951,6 +2951,14 @@ void LLAppViewer::earlyExit(const std::string& name, const LLSD& substitutions)
LLNotificationsUtil::add(name, substitutions, LLSD(), finish_early_exit);
}
+// case where we need the viewer to exit without any need for notifications
+void LLAppViewer::earlyExitNoNotify()
+{
+ llwarns << "app_early_exit with no notification: " << llendl;
+ gDoDisconnect = TRUE;
+ finish_early_exit( LLSD(), LLSD() );
+}
+
void LLAppViewer::forceExit(S32 arg)
{
removeMarkerFile();
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 56d88f07c8..b0f8c1dc3d 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -70,6 +70,7 @@ public:
void userQuit(); // The users asks to quit. Confirm, then requestQuit()
void earlyExit(const std::string& name,
const LLSD& substitutions = LLSD()); // Display an error dialog and forcibly quit.
+ void LLAppViewer::earlyExitNoNotify(); // Do not display error dialog then forcibly quit.
void forceExit(S32 arg); // exit() immediately (after some cleanup).
void abortQuit(); // Called to abort a quit request.
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index c56cacd12b..1a42500ec4 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -706,7 +706,15 @@ bool idle_startup()
if (STATE_LOGIN_SHOW == LLStartUp::getStartupState())
{
LL_DEBUGS("AppInit") << "Initializing Window" << LL_ENDL;
-
+
+ // if auto login is on and setting to quit if the login page is activated
+ // is enabled, then go ahead and exit
+ if ( gSavedSettings.getBOOL("AutoLogin") && gSavedSettings.getBOOL("QuitOnLoginActivated") )
+ {
+ // no requirement for notification here - just exit
+ LLAppViewer::instance()->earlyExitNoNotify();
+ }
+
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
timeout_count = 0;