diff options
author | Jacek Antonelli | 2010-08-01 03:26:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2010-08-01 03:42:42 -0500 |
commit | a9b6989fad493ccc2bb8aae0ffe1e11783635261 (patch) | |
tree | 10fd417e2798c76e96bcc1c72fece02ec77a38cd | |
parent | Removed control_name from old combo boxes to avoid conflicts. (diff) | |
download | meta-impy-a9b6989fad493ccc2bb8aae0ffe1e11783635261.zip meta-impy-a9b6989fad493ccc2bb8aae0ffe1e11783635261.tar.gz meta-impy-a9b6989fad493ccc2bb8aae0ffe1e11783635261.tar.bz2 meta-impy-a9b6989fad493ccc2bb8aae0ffe1e11783635261.tar.xz |
Revamped the LightShare option in Preferences > Advanced.
Instead of a checkbox, it's now a combo box with "Never",
"Ask me every time", or "Always".
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 26 | ||||
-rw-r--r-- | linden/indra/newview/lightshare.cpp | 12 | ||||
-rw-r--r-- | linden/indra/newview/lightshare.h | 8 | ||||
-rw-r--r-- | linden/indra/newview/llprefsadvanced.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml | 25 |
5 files changed, 47 insertions, 26 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index e2871ad..25474a7 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -310,6 +310,17 @@ | |||
310 | <key>Value</key> | 310 | <key>Value</key> |
311 | <integer>0</integer> | 311 | <integer>0</integer> |
312 | </map> | 312 | </map> |
313 | <key>LightShareAllowed</key> | ||
314 | <map> | ||
315 | <key>Comment</key> | ||
316 | <string>Allow LightShare (Windlight settings broadcast from the region): Never (0), Ask (1), or Always (2).</string> | ||
317 | <key>Persist</key> | ||
318 | <integer>1</integer> | ||
319 | <key>Type</key> | ||
320 | <string>U32</string> | ||
321 | <key>Value</key> | ||
322 | <integer>0</integer> | ||
323 | </map> | ||
313 | <key>LightShareIgnoreTimer</key> | 324 | <key>LightShareIgnoreTimer</key> |
314 | <map> | 325 | <map> |
315 | <key>Comment</key> | 326 | <key>Comment</key> |
@@ -12275,21 +12286,6 @@ | |||
12275 | <key>Value</key> | 12286 | <key>Value</key> |
12276 | <integer>1</integer> | 12287 | <integer>1</integer> |
12277 | </map> | 12288 | </map> |
12278 | |||
12279 | <!-- Begin: Use Serverside Windlight Settings --> | ||
12280 | <key>UseServersideWindlightSettings</key> | ||
12281 | <map> | ||
12282 | <key>Comment</key> | ||
12283 | <string>Whether or not to use Windlight settings presented by the server.</string> | ||
12284 | <key>Persist</key> | ||
12285 | <integer>1</integer> | ||
12286 | <key>Type</key> | ||
12287 | <string>Boolean</string> | ||
12288 | <key>Value</key> | ||
12289 | <integer>1</integer> | ||
12290 | </map> | ||
12291 | <!-- End: Use Serverside Windlight Settings --> | ||
12292 | |||
12293 | <key>UseStartScreen</key> | 12289 | <key>UseStartScreen</key> |
12294 | <map> | 12290 | <map> |
12295 | <key>Comment</key> | 12291 | <key>Comment</key> |
diff --git a/linden/indra/newview/lightshare.cpp b/linden/indra/newview/lightshare.cpp index 28b3d97..b422236 100644 --- a/linden/indra/newview/lightshare.cpp +++ b/linden/indra/newview/lightshare.cpp | |||
@@ -101,7 +101,7 @@ WindlightMessage::~WindlightMessage() | |||
101 | // static | 101 | // static |
102 | void WindlightMessage::processWindlight(LLMessageSystem* msg, void**) | 102 | void WindlightMessage::processWindlight(LLMessageSystem* msg, void**) |
103 | { | 103 | { |
104 | if( !gSavedSettings.getBOOL("UseServersideWindlightSettings") ) | 104 | if( gSavedSettings.getU32("UseLightShare") <= LIGHTSHARE_NEVER ) |
105 | return; | 105 | return; |
106 | 106 | ||
107 | WindlightMessage* wl = new WindlightMessage(msg); | 107 | WindlightMessage* wl = new WindlightMessage(msg); |
@@ -112,9 +112,10 @@ void WindlightMessage::processWindlight(LLMessageSystem* msg, void**) | |||
112 | std::string water = LLWaterParamManager::instance()->mCurParams.mName; | 112 | std::string water = LLWaterParamManager::instance()->mCurParams.mName; |
113 | std::string sky = LLWLParamManager::instance()->mCurParams.mName; | 113 | std::string sky = LLWLParamManager::instance()->mCurParams.mName; |
114 | 114 | ||
115 | // If they are using region settings already, just apply the new | 115 | // If they are using region settings already, or LightShare is |
116 | // settings, don't bother asking. | 116 | // always allowed, just apply the new settings, don't bother asking. |
117 | if( sky == sSkyPresetName && water == sWaterPresetName ) | 117 | if( gSavedSettings.getU32("UseLightShare") == LIGHTSHARE_ALWAYS || |
118 | (sky == sSkyPresetName && water == sWaterPresetName) ) | ||
118 | { | 119 | { |
119 | wl->apply(); | 120 | wl->apply(); |
120 | delete wl; | 121 | delete wl; |
@@ -137,7 +138,8 @@ void WindlightMessage::processWindlight(LLMessageSystem* msg, void**) | |||
137 | return; | 138 | return; |
138 | } | 139 | } |
139 | 140 | ||
140 | if( sMostRecent == NULL ) | 141 | if( gSavedSettings.getU32("UseLightShare") == LIGHTSHARE_ASK && |
142 | sMostRecent == NULL ) | ||
141 | { | 143 | { |
142 | // No most recent, so store this and create notification | 144 | // No most recent, so store this and create notification |
143 | // asking the user whether to apply or not. | 145 | // asking the user whether to apply or not. |
diff --git a/linden/indra/newview/lightshare.h b/linden/indra/newview/lightshare.h index f179458..e3cccf0 100644 --- a/linden/indra/newview/lightshare.h +++ b/linden/indra/newview/lightshare.h | |||
@@ -47,6 +47,14 @@ class WindlightMessage | |||
47 | { | 47 | { |
48 | public: | 48 | public: |
49 | 49 | ||
50 | // The meanings of the LightShareAllowed user setting. | ||
51 | enum LIGHTSHARE_ALLOWED | ||
52 | { | ||
53 | LIGHTSHARE_NEVER = 0, | ||
54 | LIGHTSHARE_ASK = 1, | ||
55 | LIGHTSHARE_ALWAYS = 2, | ||
56 | }; | ||
57 | |||
50 | // Constructs a new WindlightMessage instance from a GenericMessage | 58 | // Constructs a new WindlightMessage instance from a GenericMessage |
51 | // with the "Windlight" method, such as those sent by a | 59 | // with the "Windlight" method, such as those sent by a |
52 | // Lightshare-enabled OpenSim region. | 60 | // Lightshare-enabled OpenSim region. |
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp index 6489f52..675a87f 100644 --- a/linden/indra/newview/llprefsadvanced.cpp +++ b/linden/indra/newview/llprefsadvanced.cpp | |||
@@ -58,7 +58,6 @@ BOOL LLPrefsAdvanced::postBuild() | |||
58 | childSetValue("disable_log_screen_check", gSavedSettings.getBOOL("DisableLoginLogoutScreens")); | 58 | childSetValue("disable_log_screen_check", gSavedSettings.getBOOL("DisableLoginLogoutScreens")); |
59 | childSetValue("disable_tp_screen_check", gSavedSettings.getBOOL("DisableTeleportScreens")); | 59 | childSetValue("disable_tp_screen_check", gSavedSettings.getBOOL("DisableTeleportScreens")); |
60 | childSetValue("client_name_tag_check", gSavedSettings.getBOOL("ShowClientNameTag")); | 60 | childSetValue("client_name_tag_check", gSavedSettings.getBOOL("ShowClientNameTag")); |
61 | childSetValue("windlight_check", gSavedSettings.getBOOL("UseServersideWindlightSettings")); | ||
62 | childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ShowMyClientTagToOthers")); | 61 | childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ShowMyClientTagToOthers")); |
63 | childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); | 62 | childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); |
64 | childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez")); | 63 | childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez")); |
@@ -84,7 +83,6 @@ void LLPrefsAdvanced::apply() | |||
84 | gSavedSettings.setBOOL("SpeedRez", childGetValue("speed_rez_check")); | 83 | gSavedSettings.setBOOL("SpeedRez", childGetValue("speed_rez_check")); |
85 | gSavedSettings.setU32("SpeedRezInterval", childGetValue("speed_rez_interval_spinner").asReal()); | 84 | gSavedSettings.setU32("SpeedRezInterval", childGetValue("speed_rez_interval_spinner").asReal()); |
86 | gSavedSettings.setBOOL("AppearanceAnimate", childGetValue("appearance_anim_check")); | 85 | gSavedSettings.setBOOL("AppearanceAnimate", childGetValue("appearance_anim_check")); |
87 | gSavedSettings.setBOOL("UseServersideWindlightSettings", childGetValue("windlight_check")); | ||
88 | gSavedSettings.setBOOL("LanguageIsPublic", childGetValue("language_is_public")); | 86 | gSavedSettings.setBOOL("LanguageIsPublic", childGetValue("language_is_public")); |
89 | 87 | ||
90 | // Need to force a rebake when ClothingLayerProtection toggled for it take effect -- MC | 88 | // Need to force a rebake when ClothingLayerProtection toggled for it take effect -- MC |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml index af8cb1e..1b463a2 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml | |||
@@ -26,11 +26,28 @@ | |||
26 | font="SansSerifSmall" height="16" initial_value="false" | 26 | font="SansSerifSmall" height="16" initial_value="false" |
27 | label="Enable shadows (WARNING: unstable and requires Ultra graphics)" left="12" mouse_opaque="true" | 27 | label="Enable shadows (WARNING: unstable and requires Ultra graphics)" left="12" mouse_opaque="true" |
28 | name="shadows_check" radio_style="false" width="217" /> | 28 | name="shadows_check" radio_style="false" width="217" /> |
29 | |||
30 | |||
31 | <text bottom_delta="-25" left="16" height="15" width="220" | ||
32 | follows="top|left"> | ||
33 | Allow region Windlight settings (LightShare): | ||
34 | </text> | ||
35 | <combo_box name="lightshare_combo" control_name="LightShareAllowed" | ||
36 | bottom_delta="-2" left="240" height="18" width="120" | ||
37 | allow_text_entry="false" follows="left|top"> | ||
38 | <combo_item type="string" name="never" value="0"> | ||
39 | Never | ||
40 | </combo_item> | ||
41 | <combo_item type="string" name="ask" value="1"> | ||
42 | Ask me every time | ||
43 | </combo_item> | ||
44 | <combo_item type="string" name="always" value="2"> | ||
45 | Always | ||
46 | </combo_item> | ||
47 | </combo_box> | ||
48 | |||
49 | |||
29 | <check_box bottom_delta="-25" enabled="true" follows="left|top" | 50 | <check_box bottom_delta="-25" enabled="true" follows="left|top" |
30 | font="SansSerifSmall" height="16" initial_value="true" | ||
31 | label="Use server-side WindLight settings" left="12" mouse_opaque="true" | ||
32 | name="windlight_check" radio_style="false" width="217" /> | ||
33 | <check_box bottom_delta="-18" enabled="true" follows="left|top" | ||
34 | font="SansSerifSmall" height="16" initial_value="false" | 51 | font="SansSerifSmall" height="16" initial_value="false" |
35 | label="Use HTTP texture fetching" left="12" mouse_opaque="true" | 52 | label="Use HTTP texture fetching" left="12" mouse_opaque="true" |
36 | name="http_texture_check" radio_style="false" width="217" /> | 53 | name="http_texture_check" radio_style="false" width="217" /> |