diff options
author | McCabe Maxsted | 2011-05-03 18:09:28 -0700 |
---|---|---|
committer | McCabe Maxsted | 2011-05-04 15:21:09 -0700 |
commit | cc8e7060dfb54900f1600965a78c6f6f9fc564c4 (patch) | |
tree | 9b23e53ace5696db2c78867582308f38cba19d71 /linden/indra/newview/llpanelgeneral.cpp | |
parent | Backported crash fix in llhudeffectlookat from gpl'd viewer 2 (diff) | |
download | meta-impy-cc8e7060dfb54900f1600965a78c6f6f9fc564c4.zip meta-impy-cc8e7060dfb54900f1600965a78c6f6f9fc564c4.tar.gz meta-impy-cc8e7060dfb54900f1600965a78c6f6f9fc564c4.tar.bz2 meta-impy-cc8e7060dfb54900f1600965a78c6f6f9fc564c4.tar.xz |
Besides the numerous label and organizational changes, here are the main points
* Moved numerous options out of the Advanced panel
* Moved numerous options out of the General panel
* Combined the Network and Web Browser panels
* Combined IM, Chat, and Spell checking preferences
* Combined 'Show timestamps in IMs' and 'Show timestamps in Local Chat' to one ShowTimestamps setting
* Removed UI for 'hide my own group title'. This can still be set in the debug settings
* Renamed Popups > Notifications
* Renamed Chat Colors > Colors
* Renamed 'IMs and Logging' to 'Logging and Privacy'
* Moved Colors next to Skins
* Added style guide to the top of every preferences panel xui
Diffstat (limited to 'linden/indra/newview/llpanelgeneral.cpp')
-rw-r--r-- | linden/indra/newview/llpanelgeneral.cpp | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp index 70146ce..ac957ed 100644 --- a/linden/indra/newview/llpanelgeneral.cpp +++ b/linden/indra/newview/llpanelgeneral.cpp | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "llpanelgeneral.h" | 36 | #include "llpanelgeneral.h" |
37 | 37 | ||
38 | // project includes | 38 | // project includes |
39 | #include "llcolorswatch.h" | 39 | #include "llcheckboxctrl.h" |
40 | #include "llcombobox.h" | 40 | #include "llcombobox.h" |
41 | #include "lluictrlfactory.h" | 41 | #include "lluictrlfactory.h" |
42 | #include "llurlsimstring.h" | 42 | #include "llurlsimstring.h" |
@@ -90,28 +90,25 @@ BOOL LLPanelGeneral::postBuild() | |||
90 | childSetValue("show_location_checkbox", gSavedSettings.getBOOL("ShowStartLocation")); | 90 | childSetValue("show_location_checkbox", gSavedSettings.getBOOL("ShowStartLocation")); |
91 | childSetValue("show_all_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitleAll")); | 91 | childSetValue("show_all_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitleAll")); |
92 | childSetValue("show_my_name_checkbox", gSavedSettings.getBOOL("RenderNameHideSelf")); | 92 | childSetValue("show_my_name_checkbox", gSavedSettings.getBOOL("RenderNameHideSelf")); |
93 | childSetValue("small_avatar_names_checkbox", gSavedSettings.getBOOL("SmallAvatarNames")); | 93 | childSetValue("large_avatar_names_checkbox", !gSavedSettings.getBOOL("SmallAvatarNames")); |
94 | childSetValue("highlight_friends_checkbox", gSavedSettings.getBOOL("HighlightFriends")); | 94 | childSetValue("highlight_friends_checkbox", gSavedSettings.getBOOL("HighlightFriends")); |
95 | childSetValue("show_my_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitle")); | 95 | //childSetValue("show_my_title_checkbox", gSavedSettings.getBOOL("RenderHideGroupTitle")); -- MC |
96 | childSetValue("afk_timeout_spinner", gSavedSettings.getF32("AFKTimeout")); | 96 | |
97 | childSetEnabled("afk_timeout_spinner", gSavedSettings.getBOOL("AllowIdleAFK")); | ||
98 | childSetValue("afk_timeout_spinner", llround(gSavedSettings.getF32("AFKTimeout") / 60)); // User enters minutes, we store as seconds -- MC | ||
97 | childSetValue("afk_timeout_checkbox", gSavedSettings.getBOOL("AllowIdleAFK")); | 99 | childSetValue("afk_timeout_checkbox", gSavedSettings.getBOOL("AllowIdleAFK")); |
100 | childSetCommitCallback("afk_timeout_checkbox", onCommitAFKCheckbox, this); | ||
101 | |||
98 | childSetValue("mini_map_notify_chat", gSavedSettings.getBOOL("MiniMapNotifyChatRange")); | 102 | childSetValue("mini_map_notify_chat", gSavedSettings.getBOOL("MiniMapNotifyChatRange")); |
99 | childSetValue("mini_map_notify_sim", gSavedSettings.getBOOL("MiniMapNotifySimRange")); | 103 | childSetValue("mini_map_notify_sim", gSavedSettings.getBOOL("MiniMapNotifySimRange")); |
100 | 104 | ||
101 | // mDisplayNamesUsage = gSavedSettings.getU32("DisplayNamesUsage"); | 105 | // mDisplayNamesUsage = gSavedSettings.getU32("DisplayNamesUsage"); |
102 | // mLegacyNamesForFriends = gSavedSettings.getBOOL("LegacyNamesForFriends"); | 106 | // mLegacyNamesForFriends = gSavedSettings.getBOOL("LegacyNamesForFriends"); |
103 | 107 | ||
104 | getChild<LLColorSwatchCtrl>("effect_color_swatch")->set(gSavedSettings.getColor4("EffectColor")); | ||
105 | |||
106 | childSetValue("ui_scale_slider", gSavedSettings.getF32("UIScaleFactor")); | ||
107 | childSetValue("ui_auto_scale", gSavedSettings.getBOOL("UIAutoScale")); | ||
108 | |||
109 | LLComboBox* time_combobox = getChild<LLComboBox>("time_combobox"); | 108 | LLComboBox* time_combobox = getChild<LLComboBox>("time_combobox"); |
110 | time_combobox->setCurrentByIndex(gSavedSettings.getU32("TimeFormat")); | 109 | time_combobox->setCurrentByIndex(gSavedSettings.getU32("TimeFormat")); |
111 | 110 | ||
112 | childSetValue("language_combobox", gSavedSettings.getString("Language")); | 111 | childSetValue("language_combobox", gSavedSettings.getString("Language")); |
113 | |||
114 | childSetAction("reset_ui_size", onClickResetUISize, this); | ||
115 | 112 | ||
116 | // if we have no agent, we can't let them choose anything | 113 | // if we have no agent, we can't let them choose anything |
117 | // if we have an agent, then we only let them choose if they have a choice | 114 | // if we have an agent, then we only let them choose if they have a choice |
@@ -166,16 +163,13 @@ void LLPanelGeneral::apply() | |||
166 | gSavedSettings.setBOOL("ShowStartLocation", childGetValue("show_location_checkbox")); | 163 | gSavedSettings.setBOOL("ShowStartLocation", childGetValue("show_location_checkbox")); |
167 | gSavedSettings.setBOOL("RenderHideGroupTitleAll", childGetValue("show_all_title_checkbox")); | 164 | gSavedSettings.setBOOL("RenderHideGroupTitleAll", childGetValue("show_all_title_checkbox")); |
168 | gSavedSettings.setBOOL("RenderNameHideSelf", childGetValue("show_my_name_checkbox")); | 165 | gSavedSettings.setBOOL("RenderNameHideSelf", childGetValue("show_my_name_checkbox")); |
169 | gSavedSettings.setBOOL("SmallAvatarNames", childGetValue("small_avatar_names_checkbox")); | 166 | gSavedSettings.setBOOL("SmallAvatarNames", !childGetValue("large_avatar_names_checkbox")); |
170 | gSavedSettings.setBOOL("HighlightFriends", childGetValue("highlight_friends_checkbox")); | 167 | gSavedSettings.setBOOL("HighlightFriends", childGetValue("highlight_friends_checkbox")); |
171 | gSavedSettings.setBOOL("RenderHideGroupTitle", childGetValue("show_my_title_checkbox")); | 168 | //gSavedSettings.setBOOL("RenderHideGroupTitle", childGetValue("show_my_title_checkbox")); -- MC |
172 | gSavedSettings.setF32("AFKTimeout", childGetValue("afk_timeout_spinner").asReal()); | 169 | gSavedSettings.setF32("AFKTimeout", 60 * childGetValue("afk_timeout_spinner").asReal()); // User enters minutes, we store as seconds -- MC |
173 | gSavedSettings.setBOOL("AllowIdleAFK", childGetValue("afk_timeout_checkbox")); | 170 | gSavedSettings.setBOOL("AllowIdleAFK", childGetValue("afk_timeout_checkbox")); |
174 | gSavedSettings.setBOOL("MiniMapNotifyChatRange", childGetValue("mini_map_notify_chat")); | 171 | gSavedSettings.setBOOL("MiniMapNotifyChatRange", childGetValue("mini_map_notify_chat")); |
175 | gSavedSettings.setBOOL("MiniMapNotifySimRange", childGetValue("mini_map_notify_sim")); | 172 | gSavedSettings.setBOOL("MiniMapNotifySimRange", childGetValue("mini_map_notify_sim")); |
176 | gSavedSettings.setColor4("EffectColor", childGetValue("effect_color_swatch")); | ||
177 | gSavedSettings.setF32("UIScaleFactor", childGetValue("ui_scale_slider").asReal()); | ||
178 | gSavedSettings.setBOOL("UIAutoScale", childGetValue("ui_auto_scale")); | ||
179 | gSavedSettings.setString("Language", childGetValue("language_combobox")); | 173 | gSavedSettings.setString("Language", childGetValue("language_combobox")); |
180 | 174 | ||
181 | /* | 175 | /* |
@@ -218,14 +212,6 @@ void LLPanelGeneral::cancel() | |||
218 | } | 212 | } |
219 | 213 | ||
220 | // static | 214 | // static |
221 | void LLPanelGeneral::onClickResetUISize(void* user_data) | ||
222 | { | ||
223 | LLPanelGeneral* self = (LLPanelGeneral*)user_data; | ||
224 | F32 def = gSavedSettings.getControl("UIScaleFactor")->getDefault().asReal(); | ||
225 | self->childSetValue("ui_scale_slider", def); | ||
226 | } | ||
227 | |||
228 | // static | ||
229 | void LLPanelGeneral::onClickGrid(void *) | 215 | void LLPanelGeneral::onClickGrid(void *) |
230 | { | 216 | { |
231 | FloaterGridManager::getInstance()->open(); | 217 | FloaterGridManager::getInstance()->open(); |
@@ -241,3 +227,14 @@ void LLPanelGeneral::onLocationChanged(LLUICtrl* ctrl, void* data) | |||
241 | self->getChild<LLComboBox>("default_location_combo")->setTextEntry(LLURLSimString::sInstance.mSimString); | 227 | self->getChild<LLComboBox>("default_location_combo")->setTextEntry(LLURLSimString::sInstance.mSimString); |
242 | } | 228 | } |
243 | } | 229 | } |
230 | |||
231 | // static | ||
232 | void LLPanelGeneral::onCommitAFKCheckbox(LLUICtrl* ctrl, void* data) | ||
233 | { | ||
234 | LLPanelGeneral* self = (LLPanelGeneral*)data; | ||
235 | LLCheckBoxCtrl* check = (LLCheckBoxCtrl*)ctrl; | ||
236 | |||
237 | if (!self || !check) return; | ||
238 | self->childSetEnabled("afk_timeout_spinner", check->get()); | ||
239 | self->childSetEnabled("minutes_textbox", check->get()); | ||
240 | } | ||