From 282cb19508dcd38039454dfe71d23bb042fe376c Mon Sep 17 00:00:00 2001 From: Armin Weatherwax Date: Thu, 20 Jan 2011 14:24:11 +0100 Subject: re-enable statistics packet for SL, firstuse warn about it --- linden/indra/newview/app_settings/settings.xml | 11 +++++ linden/indra/newview/llappviewer.cpp | 27 ++++++----- linden/indra/newview/llfirstuse.cpp | 28 ++++++++++++ linden/indra/newview/llfirstuse.h | 3 +- linden/indra/newview/llstartup.cpp | 52 ++++++++++++++++++---- linden/indra/newview/llstartup.h | 4 +- .../skins/default/xui/en-us/notifications.xml | 18 ++++++++ 7 files changed, 122 insertions(+), 21 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index c946f40..b7d6433 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -1330,6 +1330,17 @@ Value 1 + WarnFirstPrivacy + + Comment + Enables FirstPrivacy warning on login + Persist + 1 + Type + Boolean + Value + 1 + WarnFirstVoiceLicense Comment diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 36a53d0..d920e84 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -1864,6 +1864,7 @@ bool LLAppViewer::initConfiguration() LLFirstUse::addConfigVariable("FirstVoice"); LLFirstUse::addConfigVariable("FirstMedia"); LLFirstUse::addConfigVariable("FirstLoginScreen"); + LLFirstUse::addConfigVariable("FirstPrivacy"); // [RLVa:KB] - Checked: RLVa-1.0.3a (2009-09-10) | Added: RLVa-1.0.3a //LLFirstUse::addConfigVariable(RLV_SETTING_FIRSTUSE_DETACH); @@ -3472,18 +3473,22 @@ void LLAppViewer::idle() // Initialize the viewer_stats_timer with an already elapsed time // of SEND_STATS_PERIOD so that the initial stats report will // be sent immediately. - static LLFrameStatsTimer viewer_stats_timer(SEND_STATS_PERIOD); - reset_statistics(); - - // Update session stats every large chunk of time - // *FIX: (???) SAMANTHA - /* or don't! part of a larger effort to waste less CPU cycles. -Patrick Sapinski (Sunday, November 29, 2009) - if (viewer_stats_timer.getElapsedTimeF32() >= SEND_STATS_PERIOD && !gDisconnected) + if(!gDisconnected && gHippoGridManager->getConnectedGrid()->isSecondLife()) { - llinfos << "Transmitting sessions stats" << llendl; - send_stats(); - viewer_stats_timer.reset(); - } */ + static LLFrameStatsTimer viewer_stats_timer(SEND_STATS_PERIOD); + reset_statistics(); + + // Update session stats every large chunk of time + // *FIX: (???) SAMANTHA + + /* or don't! part of a larger effort to waste less CPU cycles. -Patrick Sapinski (Sunday, November 29, 2009)*/ + if (viewer_stats_timer.getElapsedTimeF32() >= SEND_STATS_PERIOD ) + { + llinfos << "Transmitting sessions stats" << llendl; + send_stats(); + viewer_stats_timer.reset(); + } + } // Print the object debugging stats static LLFrameTimer object_debug_timer; diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp index 18efa9e..f482d1c 100644 --- a/linden/indra/newview/llfirstuse.cpp +++ b/linden/indra/newview/llfirstuse.cpp @@ -390,3 +390,31 @@ void LLFirstUse::voiceLicenseAgreement() LLStartUp::setStartupState(STATE_LOGIN_AUTH_INIT); } } + +void LLFirstUse::callbackPrivacy(const LLSD& notification, const LLSD& response) +{ + + S32 option = LLNotification::getSelectedOption(notification, response); + if ( 0 == option ) + { + gSavedSettings.setWarning("FirstPrivacy", FALSE); + LLStartUp::setStartupState(STATE_PRIVACY_LECTURED); + } + if ( 1 == option ) + { + LLStartUp::resetLogin(); + } +} + +// static +void LLFirstUse::Privacy() +{ + if (gSavedSettings.getWarning("FirstPrivacy")) + { + LLNotifications::instance().add("FirstPrivacy", LLSD(), LLSD(), callbackPrivacy); + } + else + { + LLStartUp::setStartupState(STATE_PRIVACY_LECTURED); + } +} \ No newline at end of file diff --git a/linden/indra/newview/llfirstuse.h b/linden/indra/newview/llfirstuse.h index 42443ff..8c2ca35 100644 --- a/linden/indra/newview/llfirstuse.h +++ b/linden/indra/newview/llfirstuse.h @@ -116,7 +116,8 @@ public: static void callbackClientTags(const LLSD& notification, const LLSD& response); static void ClientTags(); static void voiceLicenseAgreement(); - + static void callbackPrivacy(const LLSD& notification, const LLSD& response); + static void Privacy(); protected: static std::set sConfigVariables; diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 0417f61..939c2e6 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -872,7 +872,47 @@ bool idle_startup() if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState()) { + LL_DEBUGS("AppInitStartupState") << "STATE_LOGIN_CLEANUP" << LL_ENDL; + + gDisconnected = TRUE; + + std::string cmd_line_grid_choice = gSavedSettings.getString("CmdLineGridChoice"); + std::string cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI").asString(); + if(!cmd_line_grid_choice.empty() && cmd_line_login_uri.empty()) + { + gHippoGridManager->setCurrentGrid(cmd_line_grid_choice); + } + + gHippoGridManager->setCurrentGridAsConnected(); + gHippoLimits->setLimits(); + + if (gHippoGridManager->getConnectedGrid()->isSecondLife()) + { + LLStartUp::setStartupState( STATE_LECTURE_PRIVACY ); + LLFirstUse::Privacy(); + } + else + { + LLStartUp::setStartupState( STATE_PRIVACY_LECTURED ); + } + + return FALSE; + + } + + if (STATE_LECTURE_PRIVACY == LLStartUp::getStartupState()) + { + LL_DEBUGS("AppInitStartupState") << "STATE_LECTURE_PRIVACY" << LL_ENDL; + + //wait for the user to decide + ms_sleep(1); + return FALSE; + } + + if (STATE_PRIVACY_LECTURED == LLStartUp::getStartupState()) + { + LL_DEBUGS("AppInitStartupState") << "STATE_PRIVACY_LECTURED" << LL_ENDL; //reset the values that could have come in from a slurl if (!gLoginHandler.getWebLoginKey().isNull()) { @@ -914,15 +954,9 @@ bool idle_startup() gDebugInfo["LoginName"] = firstname + " " + lastname; } - std::string cmd_line_grid_choice = gSavedSettings.getString("CmdLineGridChoice"); - std::string cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI").asString(); - if(!cmd_line_grid_choice.empty() && cmd_line_login_uri.empty()) - { - gHippoGridManager->setCurrentGrid(cmd_line_grid_choice); - } - gHippoGridManager->setCurrentGridAsConnected(); - gHippoLimits->setLimits(); + + // create necessary directories // *FIX: these mkdir's should error check gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); @@ -3767,6 +3801,8 @@ std::string LLStartUp::startupStateToString(EStartupState state) RTNENUM( STATE_LOGIN_SHOW ); RTNENUM( STATE_LOGIN_WAIT ); RTNENUM( STATE_LOGIN_CLEANUP ); + RTNENUM( STATE_LECTURE_PRIVACY ); + RTNENUM( STATE_PRIVACY_LECTURED ); RTNENUM( STATE_LOGIN_VOICE_LICENSE ); RTNENUM( STATE_UPDATE_CHECK ); RTNENUM( STATE_LOGIN_AUTH_INIT ); diff --git a/linden/indra/newview/llstartup.h b/linden/indra/newview/llstartup.h index 08862e6..3fe8daa 100644 --- a/linden/indra/newview/llstartup.h +++ b/linden/indra/newview/llstartup.h @@ -49,7 +49,9 @@ typedef enum { STATE_BROWSER_INIT, // Initialize web browser for login screen STATE_LOGIN_SHOW, // Show login screen STATE_LOGIN_WAIT, // Wait for user input at login screen - STATE_LOGIN_CLEANUP, // Get rid of login screen and start login + STATE_LOGIN_CLEANUP, // lecture about privacy + STATE_LECTURE_PRIVACY, // wait until the lecture was read + STATE_PRIVACY_LECTURED, // Get rid of login screen and start login STATE_LOGIN_VOICE_LICENSE, // Show license agreement for using voice STATE_UPDATE_CHECK, // Wait for user at a dialog box (updates, term-of-service, etc) STATE_LOGIN_AUTH_INIT, // Start login to SL servers diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml index b8f3fcb..63e85c4 100644 --- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml @@ -7221,6 +7221,24 @@ Apply this region's settings? ("Ignore" will ignore all region setting The new font will appear after you restart [VIEWER_NAME]. + +Terms of service of the grid you are connecting to require sending a "statistics packet" every 5 minutes. +That is for example: Data about your hardware (CPU, RAM), number of avatars around, number of sims visited. +Please check *the grids* privacy policy about usage of that data. +
+