aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
authorArmin Weatherwax2011-01-20 14:24:11 +0100
committerJacek Antonelli2011-02-22 15:40:50 -0600
commitdfbdcaaf136e2e7c3bdb9b0b9185797b406b3bf5 (patch)
tree1edbed672d5ef0b28f3f2a7988d034a7caf762c7 /linden/indra/newview
parentTransferred the new linux32 gtk-etc package to our server. (diff)
downloadmeta-impy-dfbdcaaf136e2e7c3bdb9b0b9185797b406b3bf5.zip
meta-impy-dfbdcaaf136e2e7c3bdb9b0b9185797b406b3bf5.tar.gz
meta-impy-dfbdcaaf136e2e7c3bdb9b0b9185797b406b3bf5.tar.bz2
meta-impy-dfbdcaaf136e2e7c3bdb9b0b9185797b406b3bf5.tar.xz
re-enable statistics packet for SL, firstuse warn about it
(cherry picked from commit 282cb19508dcd38039454dfe71d23bb042fe376c)
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/app_settings/settings.xml11
-rw-r--r--linden/indra/newview/llappviewer.cpp27
-rw-r--r--linden/indra/newview/llfirstuse.cpp28
-rw-r--r--linden/indra/newview/llfirstuse.h3
-rw-r--r--linden/indra/newview/llstartup.cpp52
-rw-r--r--linden/indra/newview/llstartup.h4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/notifications.xml18
7 files changed, 122 insertions, 21 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index a857b7a..890d018 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -954,6 +954,17 @@
954 <key>Value</key> 954 <key>Value</key>
955 <integer>1</integer> 955 <integer>1</integer>
956 </map> 956 </map>
957 <key>WarnFirstPrivacy</key>
958 <map>
959 <key>Comment</key>
960 <string>Enables FirstPrivacy warning on login</string>
961 <key>Persist</key>
962 <integer>1</integer>
963 <key>Type</key>
964 <string>Boolean</string>
965 <key>Value</key>
966 <integer>1</integer>
967 </map>
957 <key>WarnFirstVoiceLicense</key> 968 <key>WarnFirstVoiceLicense</key>
958 <map> 969 <map>
959 <key>Comment</key> 970 <key>Comment</key>
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 2e97f80..f281734 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -1823,6 +1823,7 @@ bool LLAppViewer::initConfiguration()
1823 LLFirstUse::addConfigVariable("FirstVoice"); 1823 LLFirstUse::addConfigVariable("FirstVoice");
1824 LLFirstUse::addConfigVariable("FirstMedia"); 1824 LLFirstUse::addConfigVariable("FirstMedia");
1825 LLFirstUse::addConfigVariable("FirstLoginScreen"); 1825 LLFirstUse::addConfigVariable("FirstLoginScreen");
1826 LLFirstUse::addConfigVariable("FirstPrivacy");
1826 1827
1827// [RLVa:KB] - Checked: RLVa-1.0.3a (2009-09-10) | Added: RLVa-1.0.3a 1828// [RLVa:KB] - Checked: RLVa-1.0.3a (2009-09-10) | Added: RLVa-1.0.3a
1828 //LLFirstUse::addConfigVariable(RLV_SETTING_FIRSTUSE_DETACH); 1829 //LLFirstUse::addConfigVariable(RLV_SETTING_FIRSTUSE_DETACH);
@@ -3420,18 +3421,22 @@ void LLAppViewer::idle()
3420 // Initialize the viewer_stats_timer with an already elapsed time 3421 // Initialize the viewer_stats_timer with an already elapsed time
3421 // of SEND_STATS_PERIOD so that the initial stats report will 3422 // of SEND_STATS_PERIOD so that the initial stats report will
3422 // be sent immediately. 3423 // be sent immediately.
3423 static LLFrameStatsTimer viewer_stats_timer(SEND_STATS_PERIOD); 3424 if(!gDisconnected && gHippoGridManager->getConnectedGrid()->isSecondLife())
3424 reset_statistics();
3425
3426 // Update session stats every large chunk of time
3427 // *FIX: (???) SAMANTHA
3428 /* or don't! part of a larger effort to waste less CPU cycles. -Patrick Sapinski (Sunday, November 29, 2009)
3429 if (viewer_stats_timer.getElapsedTimeF32() >= SEND_STATS_PERIOD && !gDisconnected)
3430 { 3425 {
3431 llinfos << "Transmitting sessions stats" << llendl; 3426 static LLFrameStatsTimer viewer_stats_timer(SEND_STATS_PERIOD);
3432 send_stats(); 3427 reset_statistics();
3433 viewer_stats_timer.reset(); 3428
3434 } */ 3429 // Update session stats every large chunk of time
3430 // *FIX: (???) SAMANTHA
3431
3432 /* or don't! part of a larger effort to waste less CPU cycles. -Patrick Sapinski (Sunday, November 29, 2009)*/
3433 if (viewer_stats_timer.getElapsedTimeF32() >= SEND_STATS_PERIOD )
3434 {
3435 llinfos << "Transmitting sessions stats" << llendl;
3436 send_stats();
3437 viewer_stats_timer.reset();
3438 }
3439 }
3435 3440
3436 // Print the object debugging stats 3441 // Print the object debugging stats
3437 static LLFrameTimer object_debug_timer; 3442 static LLFrameTimer object_debug_timer;
diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp
index e82aa96..a15b912 100644
--- a/linden/indra/newview/llfirstuse.cpp
+++ b/linden/indra/newview/llfirstuse.cpp
@@ -405,3 +405,31 @@ void LLFirstUse::voiceLicenseAgreement()
405 LLStartUp::setStartupState(STATE_LOGIN_AUTH_INIT); 405 LLStartUp::setStartupState(STATE_LOGIN_AUTH_INIT);
406 } 406 }
407} 407}
408
409void LLFirstUse::callbackPrivacy(const LLSD& notification, const LLSD& response)
410{
411
412 S32 option = LLNotification::getSelectedOption(notification, response);
413 if ( 0 == option )
414 {
415 gSavedSettings.setWarning("FirstPrivacy", FALSE);
416 LLStartUp::setStartupState(STATE_PRIVACY_LECTURED);
417 }
418 if ( 1 == option )
419 {
420 LLStartUp::resetLogin();
421 }
422}
423
424// static
425void LLFirstUse::Privacy()
426{
427 if (gSavedSettings.getWarning("FirstPrivacy"))
428 {
429 LLNotifications::instance().add("FirstPrivacy", LLSD(), LLSD(), callbackPrivacy);
430 }
431 else
432 {
433 LLStartUp::setStartupState(STATE_PRIVACY_LECTURED);
434 }
435}
diff --git a/linden/indra/newview/llfirstuse.h b/linden/indra/newview/llfirstuse.h
index b0bf05f..d59e2ca 100644
--- a/linden/indra/newview/llfirstuse.h
+++ b/linden/indra/newview/llfirstuse.h
@@ -116,7 +116,8 @@ public:
116 static void callbackClientTags(const LLSD& notification, const LLSD& response); 116 static void callbackClientTags(const LLSD& notification, const LLSD& response);
117 static void ClientTags(); 117 static void ClientTags();
118 static void voiceLicenseAgreement(); 118 static void voiceLicenseAgreement();
119 119 static void callbackPrivacy(const LLSD& notification, const LLSD& response);
120 static void Privacy();
120protected: 121protected:
121 static std::set<std::string> sConfigVariables; 122 static std::set<std::string> sConfigVariables;
122 123
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 3c8f810..77a2694 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -852,7 +852,47 @@ bool idle_startup()
852 852
853 if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState()) 853 if (STATE_LOGIN_CLEANUP == LLStartUp::getStartupState())
854 { 854 {
855
855 LL_DEBUGS("AppInitStartupState") << "STATE_LOGIN_CLEANUP" << LL_ENDL; 856 LL_DEBUGS("AppInitStartupState") << "STATE_LOGIN_CLEANUP" << LL_ENDL;
857
858 gDisconnected = TRUE;
859
860 std::string cmd_line_grid_choice = gSavedSettings.getString("CmdLineGridChoice");
861 std::string cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI").asString();
862 if(!cmd_line_grid_choice.empty() && cmd_line_login_uri.empty())
863 {
864 gHippoGridManager->setCurrentGrid(cmd_line_grid_choice);
865 }
866
867 gHippoGridManager->setCurrentGridAsConnected();
868 gHippoLimits->setLimits();
869
870 if (gHippoGridManager->getConnectedGrid()->isSecondLife())
871 {
872 LLStartUp::setStartupState( STATE_LECTURE_PRIVACY );
873 LLFirstUse::Privacy();
874 }
875 else
876 {
877 LLStartUp::setStartupState( STATE_PRIVACY_LECTURED );
878 }
879
880 return FALSE;
881
882 }
883
884 if (STATE_LECTURE_PRIVACY == LLStartUp::getStartupState())
885 {
886 LL_DEBUGS("AppInitStartupState") << "STATE_LECTURE_PRIVACY" << LL_ENDL;
887
888 //wait for the user to decide
889 ms_sleep(1);
890 return FALSE;
891 }
892
893 if (STATE_PRIVACY_LECTURED == LLStartUp::getStartupState())
894 {
895 LL_DEBUGS("AppInitStartupState") << "STATE_PRIVACY_LECTURED" << LL_ENDL;
856 //reset the values that could have come in from a slurl 896 //reset the values that could have come in from a slurl
857 if (!gLoginHandler.getWebLoginKey().isNull()) 897 if (!gLoginHandler.getWebLoginKey().isNull())
858 { 898 {
@@ -894,15 +934,9 @@ bool idle_startup()
894 gDebugInfo["LoginName"] = firstname + " " + lastname; 934 gDebugInfo["LoginName"] = firstname + " " + lastname;
895 } 935 }
896 936
897 std::string cmd_line_grid_choice = gSavedSettings.getString("CmdLineGridChoice");
898 std::string cmd_line_login_uri = gSavedSettings.getLLSD("CmdLineLoginURI").asString();
899 if(!cmd_line_grid_choice.empty() && cmd_line_login_uri.empty())
900 {
901 gHippoGridManager->setCurrentGrid(cmd_line_grid_choice);
902 }
903 937
904 gHippoGridManager->setCurrentGridAsConnected(); 938
905 gHippoLimits->setLimits(); 939
906 // create necessary directories 940 // create necessary directories
907 // *FIX: these mkdir's should error check 941 // *FIX: these mkdir's should error check
908 gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); 942 gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname);
@@ -3686,6 +3720,8 @@ std::string LLStartUp::startupStateToString(EStartupState state)
3686 RTNENUM( STATE_LOGIN_SHOW ); 3720 RTNENUM( STATE_LOGIN_SHOW );
3687 RTNENUM( STATE_LOGIN_WAIT ); 3721 RTNENUM( STATE_LOGIN_WAIT );
3688 RTNENUM( STATE_LOGIN_CLEANUP ); 3722 RTNENUM( STATE_LOGIN_CLEANUP );
3723 RTNENUM( STATE_LECTURE_PRIVACY );
3724 RTNENUM( STATE_PRIVACY_LECTURED );
3689 RTNENUM( STATE_LOGIN_VOICE_LICENSE ); 3725 RTNENUM( STATE_LOGIN_VOICE_LICENSE );
3690 RTNENUM( STATE_UPDATE_CHECK ); 3726 RTNENUM( STATE_UPDATE_CHECK );
3691 RTNENUM( STATE_LOGIN_AUTH_INIT ); 3727 RTNENUM( STATE_LOGIN_AUTH_INIT );
diff --git a/linden/indra/newview/llstartup.h b/linden/indra/newview/llstartup.h
index 9a3c91c..e033582 100644
--- a/linden/indra/newview/llstartup.h
+++ b/linden/indra/newview/llstartup.h
@@ -49,7 +49,9 @@ typedef enum {
49 STATE_BROWSER_INIT, // Initialize web browser for login screen 49 STATE_BROWSER_INIT, // Initialize web browser for login screen
50 STATE_LOGIN_SHOW, // Show login screen 50 STATE_LOGIN_SHOW, // Show login screen
51 STATE_LOGIN_WAIT, // Wait for user input at login screen 51 STATE_LOGIN_WAIT, // Wait for user input at login screen
52 STATE_LOGIN_CLEANUP, // Get rid of login screen and start login 52 STATE_LOGIN_CLEANUP, // lecture about privacy
53 STATE_LECTURE_PRIVACY, // wait until the lecture was read
54 STATE_PRIVACY_LECTURED, // Get rid of login screen and start login
53 STATE_LOGIN_VOICE_LICENSE, // Show license agreement for using voice 55 STATE_LOGIN_VOICE_LICENSE, // Show license agreement for using voice
54 STATE_UPDATE_CHECK, // Wait for user at a dialog box (updates, term-of-service, etc) 56 STATE_UPDATE_CHECK, // Wait for user at a dialog box (updates, term-of-service, etc)
55 STATE_LOGIN_AUTH_INIT, // Start login to SL servers 57 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 0301c3d..04f9f4b 100644
--- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
@@ -7059,6 +7059,24 @@ Apply this region's settings? (&quot;Ignore&quot; will ignore all region setting
7059The new font will appear after you restart [VIEWER_NAME]. 7059The new font will appear after you restart [VIEWER_NAME].
7060</notification> 7060</notification>
7061 7061
7062<notification
7063 icon="alertmodal.tga"
7064 name="FirstPrivacy"
7065 type="alertmodal">
7066Terms of service of the grid you are connecting to require sending a "statistics packet" every 5 minutes.
7067That is for example: Data about your hardware (CPU, RAM), number of avatars around, number of sims visited.
7068Please check *the grids* privacy policy about usage of that data.
7069 <form name="form">
7070 <button
7071 index="0"
7072 name="ok"
7073 text="Login anyway"/>
7074 <button
7075 index="1"
7076 name="notok"
7077 text="Do not log in"/>
7078 </form>
7079</notification>
7062 7080
7063<!--End Imprudence notifications--> 7081<!--End Imprudence notifications-->
7064 7082