From e2655d4c4b38ad2336ad136a057d315e31195080 Mon Sep 17 00:00:00 2001 From: Palmer Truelson Date: Fri, 26 Jun 2009 12:17:35 +0000 Subject: DEV-34569 new --nonotifications command line option for automated testing Reviewed by Q --- indra/newview/app_settings/cmd_line.xml | 8 ++++++++ indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llappviewer.cpp | 10 ++++++++++ indra/newview/llviewerwindow.cpp | 2 ++ 4 files changed, 31 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml index 783a886fdd..5f143431de 100644 --- a/indra/newview/app_settings/cmd_line.xml +++ b/indra/newview/app_settings/cmd_line.xml @@ -146,6 +146,14 @@ ReplaySession + nonotifications + + desc + User will not get any notifications. NOTE: All notifications that occur will get added to ignore file for future runs. + map-to + IgnoreAllNotifications + + rotate map-to diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 5ad49774a9..afa7f707f1 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3560,6 +3560,17 @@ Value 1 + IgnoreAllNotifications + + Comment + Ignore all notifications so we never need user input on them. + Persist + 0 + Type + Boolean + Value + 0 + IgnorePixelDepth Comment diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index d0d6a118b3..2c570de697 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -641,6 +641,11 @@ bool LLAppViewer::init() // Get the single value from the crash settings file, if it exists std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE); gCrashSettings.loadFromFile(crash_settings_filename); + if(gSavedSettings.getBOOL("IgnoreAllNotifications")) + { + gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, CRASH_BEHAVIOR_ALWAYS_SEND); + gCrashSettings.saveToFile(crash_settings_filename, FALSE); + } ///////////////////////////////////////////////// // OS-specific login dialogs @@ -1971,6 +1976,11 @@ bool LLAppViewer::initConfiguration() { LLAgentPilot::sReplaySession = TRUE; } + + if (clp.hasOption("nonotifications")) + { + gSavedSettings.setBOOL("IgnoreAllNotifications", TRUE); + } if (clp.hasOption("debugsession")) { diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index fb501b023f..5c9f8af216 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1269,6 +1269,8 @@ LLViewerWindow::LLViewerWindow( LLNotifications::instance().getChannel("VW_alerts")->connectChanged(&LLViewerWindow::onAlert); LLNotifications::instance().getChannel("VW_alertmodal")->connectChanged(&LLViewerWindow::onAlert); + LLNotifications::instance().setIgnoreAllNotifications(gSavedSettings.getBOOL("IgnoreAllNotifications")); + llinfos << "NOTE: ALL NOTIFICATIONS THAT OCCUR WILL GET ADDED TO IGNORE LIST FOR LATER RUNS." << llendl; // Default to application directory. LLViewerWindow::sSnapshotBaseName = "Snapshot"; -- cgit v1.2.3