aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llprefscolors.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llprefscolors.cpp')
-rw-r--r--linden/indra/newview/llprefscolors.cpp30
1 files changed, 27 insertions, 3 deletions
diff --git a/linden/indra/newview/llprefscolors.cpp b/linden/indra/newview/llprefscolors.cpp
index b0bc345..0b4caf5 100644
--- a/linden/indra/newview/llprefscolors.cpp
+++ b/linden/indra/newview/llprefscolors.cpp
@@ -80,6 +80,12 @@ BOOL LLPrefsColors::postBuild()
80 childSetCommitCallback("HighlightOwnNameInChat", onCommitCheckSelfName, this); 80 childSetCommitCallback("HighlightOwnNameInChat", onCommitCheckSelfName, this);
81 childSetCommitCallback("HighlightFriendsChat", onCommitCheckFriends, this); 81 childSetCommitCallback("HighlightFriendsChat", onCommitCheckFriends, this);
82 82
83 getChild<LLColorSwatchCtrl>("effect_color_swatch")->set(gSavedSettings.getColor4("EffectColor"));
84
85 getChild<LLColorSwatchCtrl>("client_tag_color")->set(gSavedSettings.getColor4("ImprudenceTagColor"));
86 static BOOL* sShowClientColor = rebind_llcontrol<BOOL>("ShowClientColor", &gSavedSettings, true);
87 childSetValue("client_name_color_check", (*sShowClientColor));
88
83 return TRUE; 89 return TRUE;
84} 90}
85 91
@@ -96,6 +102,8 @@ void LLPrefsColors::refreshColors()
96 mHTMLLinkColor = gSavedSettings.getColor4("HTMLLinkColor"); 102 mHTMLLinkColor = gSavedSettings.getColor4("HTMLLinkColor");
97 mFriendsChatColor = gSavedSettings.getColor4("FriendsChatColor"); 103 mFriendsChatColor = gSavedSettings.getColor4("FriendsChatColor");
98 mOwnNameChatColor = gSavedSettings.getColor4("OwnNameChatColor"); 104 mOwnNameChatColor = gSavedSettings.getColor4("OwnNameChatColor");
105 mEffectColor = gSavedSettings.getColor4("EffectColor");
106 mClientTagColor = gSavedSettings.getColor4("ImprudenceTagColor");
99} 107}
100 108
101// static 109// static
@@ -113,9 +121,6 @@ void LLPrefsColors::updateSelfCheck()
113 childSetEnabled("nick01", highlight_names_enabled); 121 childSetEnabled("nick01", highlight_names_enabled);
114 childSetEnabled("nick02", highlight_names_enabled); 122 childSetEnabled("nick02", highlight_names_enabled);
115 childSetEnabled("nick03", highlight_names_enabled); 123 childSetEnabled("nick03", highlight_names_enabled);
116 childSetEnabled("nick01_text", highlight_names_enabled);
117 childSetEnabled("nick02_text", highlight_names_enabled);
118 childSetEnabled("nick03_text", highlight_names_enabled);
119} 124}
120 125
121// static 126// static
@@ -130,6 +135,18 @@ void LLPrefsColors::updateFriendsCheck()
130 getChild<LLColorSwatchCtrl>("FriendsChatColor")->setEnabled(childGetValue("HighlightFriendsChat")); 135 getChild<LLColorSwatchCtrl>("FriendsChatColor")->setEnabled(childGetValue("HighlightFriendsChat"));
131} 136}
132 137
138// static
139void LLPrefsColors::onCommitCheckClient(LLUICtrl* ctrl, void* userdata)
140{
141 LLPrefsColors* self = (LLPrefsColors*)userdata;
142 self->updateClientCheck();
143}
144
145void LLPrefsColors::updateClientCheck()
146{
147 getChild<LLColorSwatchCtrl>("client_tag_color")->setEnabled(childGetValue("client_name_color_checkt"));
148}
149
133void LLPrefsColors::cancel() 150void LLPrefsColors::cancel()
134{ 151{
135 gSavedSettings.setColor4("SystemChatColor", mSystemChatColor); 152 gSavedSettings.setColor4("SystemChatColor", mSystemChatColor);
@@ -143,6 +160,8 @@ void LLPrefsColors::cancel()
143 gSavedSettings.setColor4("HTMLLinkColor", mHTMLLinkColor); 160 gSavedSettings.setColor4("HTMLLinkColor", mHTMLLinkColor);
144 gSavedSettings.setColor4("FriendsChatColor", mFriendsChatColor); 161 gSavedSettings.setColor4("FriendsChatColor", mFriendsChatColor);
145 gSavedSettings.setColor4("OwnNameChatColor", mOwnNameChatColor); 162 gSavedSettings.setColor4("OwnNameChatColor", mOwnNameChatColor);
163 gSavedSettings.setColor4("EffectColor", mEffectColor);
164 gSavedSettings.setColor4("ImprudenceTagColor", mClientTagColor);
146} 165}
147 166
148void LLPrefsColors::apply() 167void LLPrefsColors::apply()
@@ -177,5 +196,10 @@ void LLPrefsColors::apply()
177 boost::trim(nick03); 196 boost::trim(nick03);
178 gSavedSettings.setString("HighlightNickname03", nick03); 197 gSavedSettings.setString("HighlightNickname03", nick03);
179 198
199 gSavedSettings.setColor4("EffectColor", childGetValue("effect_color_swatch"));
200
201 gSavedSettings.setBOOL("ShowClientColor", childGetValue("client_name_color_check"));
202 gSavedSettings.setColor4("ImprudenceTagColor", getChild<LLColorSwatchCtrl>("client_tag_color")->get());
203
180 refreshColors(); // member values become the official values and cancel becomes a no-op. 204 refreshColors(); // member values become the official values and cancel becomes a no-op.
181} 205}