aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llprefsadvanced.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-05-04 08:30:32 -0700
committerJacek Antonelli2010-05-05 16:27:39 -0500
commitfa979d280609eb4e7623d92d4876ab3639a3cddc (patch)
treef983008a4e7bcd05607ccc676dfcc0f43aedbbc6 /linden/indra/newview/llprefsadvanced.cpp
parentdisable speakers button and hide floateractivespeakers if voice not enabled. (diff)
downloadmeta-impy-fa979d280609eb4e7623d92d4876ab3639a3cddc.zip
meta-impy-fa979d280609eb4e7623d92d4876ab3639a3cddc.tar.gz
meta-impy-fa979d280609eb4e7623d92d4876ab3639a3cddc.tar.bz2
meta-impy-fa979d280609eb4e7623d92d4876ab3639a3cddc.tar.xz
Fixed preferences > advanced speedrez interval spinner not updating
Diffstat (limited to 'linden/indra/newview/llprefsadvanced.cpp')
-rw-r--r--linden/indra/newview/llprefsadvanced.cpp32
1 files changed, 28 insertions, 4 deletions
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp
index 2ad8de2..ee90518 100644
--- a/linden/indra/newview/llprefsadvanced.cpp
+++ b/linden/indra/newview/llprefsadvanced.cpp
@@ -40,6 +40,7 @@
40LLPrefsAdvanced::LLPrefsAdvanced() 40LLPrefsAdvanced::LLPrefsAdvanced()
41{ 41{
42 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_advanced.xml"); 42 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_advanced.xml");
43 childSetCommitCallback("speed_rez_check", onCommitCheckBox, this);
43} 44}
44 45
45LLPrefsAdvanced::~LLPrefsAdvanced() 46LLPrefsAdvanced::~LLPrefsAdvanced()
@@ -54,10 +55,12 @@ BOOL LLPrefsAdvanced::postBuild()
54 childSetValue("client_name_tag_check", gSavedSettings.getBOOL("ShowClientNameTag")); 55 childSetValue("client_name_tag_check", gSavedSettings.getBOOL("ShowClientNameTag"));
55 childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ClothingLayerProtection")); 56 childSetValue("client_name_tag_broadcast_check", gSavedSettings.getBOOL("ClothingLayerProtection"));
56 childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP")); 57 childSetValue("http_texture_check", gSavedSettings.getBOOL("ImagePipelineUseHTTP"));
57 childSetValue("speedrez_check", gSavedSettings.getBOOL("SpeedRez")); 58 childSetValue("speed_rez_check", gSavedSettings.getBOOL("SpeedRez"));
58 childSetValue("speedrez_spinner", (F32)gSavedSettings.getU32("SpeedRezInterval")); 59 childSetValue("speed_rez_interval_spinner", (F32)gSavedSettings.getU32("SpeedRezInterval"));
59 childSetValue("appearance_stand_check", gSavedSettings.getBOOL("AppearanceForceStand")); 60 childSetValue("appearance_stand_check", gSavedSettings.getBOOL("AppearanceForceStand"));
60 61
62 refresh();
63
61 return TRUE; 64 return TRUE;
62} 65}
63 66
@@ -67,8 +70,8 @@ void LLPrefsAdvanced::apply()
67 gSavedSettings.setBOOL("DisableTeleportScreens", childGetValue("disable_tp_screen_check")); 70 gSavedSettings.setBOOL("DisableTeleportScreens", childGetValue("disable_tp_screen_check"));
68 gSavedSettings.setBOOL("ShowClientNameTag", childGetValue("client_name_tag_check")); 71 gSavedSettings.setBOOL("ShowClientNameTag", childGetValue("client_name_tag_check"));
69 gSavedSettings.setBOOL("ImagePipelineUseHTTP", childGetValue("http_texture_check")); 72 gSavedSettings.setBOOL("ImagePipelineUseHTTP", childGetValue("http_texture_check"));
70 gSavedSettings.setBOOL("SpeedRez", childGetValue("speedrez_check")); 73 gSavedSettings.setBOOL("SpeedRez", childGetValue("speed_rez_check"));
71 gSavedSettings.setU32("SpeedRezInterval", childGetValue("speedrez_spinner").asReal()); 74 gSavedSettings.setU32("SpeedRezInterval", childGetValue("speed_rez_interval_spinner").asReal());
72 gSavedSettings.setBOOL("AppearanceForceStand", childGetValue("appearance_stand_check")); 75 gSavedSettings.setBOOL("AppearanceForceStand", childGetValue("appearance_stand_check"));
73 76
74 // Need to force a rebake when ClothingLayerProtection toggled for it take effect -- MC 77 // Need to force a rebake when ClothingLayerProtection toggled for it take effect -- MC
@@ -119,3 +122,24 @@ void LLPrefsAdvanced::apply()
119void LLPrefsAdvanced::cancel() 122void LLPrefsAdvanced::cancel()
120{ 123{
121} 124}
125
126void LLPrefsAdvanced::refresh()
127{
128 if (childGetValue("speed_rez_check").asBoolean())
129 {
130 childEnable("speed_rez_interval_spinner");
131 childEnable("speed_rez_seconds_text");
132 }
133 else
134 {
135 childDisable("speed_rez_interval_spinner");
136 childDisable("speed_rez_seconds_text");
137 }
138}
139
140//static
141void LLPrefsAdvanced::onCommitCheckBox(LLUICtrl* ctrl, void* user_data)
142{
143 LLPrefsAdvanced* self = (LLPrefsAdvanced*)user_data;
144 self->refresh();
145}