From cc8e7060dfb54900f1600965a78c6f6f9fc564c4 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 3 May 2011 18:09:28 -0700 Subject: 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 --- linden/indra/newview/llprefscolors.cpp | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'linden/indra/newview/llprefscolors.cpp') 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() childSetCommitCallback("HighlightOwnNameInChat", onCommitCheckSelfName, this); childSetCommitCallback("HighlightFriendsChat", onCommitCheckFriends, this); + getChild("effect_color_swatch")->set(gSavedSettings.getColor4("EffectColor")); + + getChild("client_tag_color")->set(gSavedSettings.getColor4("ImprudenceTagColor")); + static BOOL* sShowClientColor = rebind_llcontrol("ShowClientColor", &gSavedSettings, true); + childSetValue("client_name_color_check", (*sShowClientColor)); + return TRUE; } @@ -96,6 +102,8 @@ void LLPrefsColors::refreshColors() mHTMLLinkColor = gSavedSettings.getColor4("HTMLLinkColor"); mFriendsChatColor = gSavedSettings.getColor4("FriendsChatColor"); mOwnNameChatColor = gSavedSettings.getColor4("OwnNameChatColor"); + mEffectColor = gSavedSettings.getColor4("EffectColor"); + mClientTagColor = gSavedSettings.getColor4("ImprudenceTagColor"); } // static @@ -113,9 +121,6 @@ void LLPrefsColors::updateSelfCheck() childSetEnabled("nick01", highlight_names_enabled); childSetEnabled("nick02", highlight_names_enabled); childSetEnabled("nick03", highlight_names_enabled); - childSetEnabled("nick01_text", highlight_names_enabled); - childSetEnabled("nick02_text", highlight_names_enabled); - childSetEnabled("nick03_text", highlight_names_enabled); } // static @@ -130,6 +135,18 @@ void LLPrefsColors::updateFriendsCheck() getChild("FriendsChatColor")->setEnabled(childGetValue("HighlightFriendsChat")); } +// static +void LLPrefsColors::onCommitCheckClient(LLUICtrl* ctrl, void* userdata) +{ + LLPrefsColors* self = (LLPrefsColors*)userdata; + self->updateClientCheck(); +} + +void LLPrefsColors::updateClientCheck() +{ + getChild("client_tag_color")->setEnabled(childGetValue("client_name_color_checkt")); +} + void LLPrefsColors::cancel() { gSavedSettings.setColor4("SystemChatColor", mSystemChatColor); @@ -143,6 +160,8 @@ void LLPrefsColors::cancel() gSavedSettings.setColor4("HTMLLinkColor", mHTMLLinkColor); gSavedSettings.setColor4("FriendsChatColor", mFriendsChatColor); gSavedSettings.setColor4("OwnNameChatColor", mOwnNameChatColor); + gSavedSettings.setColor4("EffectColor", mEffectColor); + gSavedSettings.setColor4("ImprudenceTagColor", mClientTagColor); } void LLPrefsColors::apply() @@ -177,5 +196,10 @@ void LLPrefsColors::apply() boost::trim(nick03); gSavedSettings.setString("HighlightNickname03", nick03); + gSavedSettings.setColor4("EffectColor", childGetValue("effect_color_swatch")); + + gSavedSettings.setBOOL("ShowClientColor", childGetValue("client_name_color_check")); + gSavedSettings.setColor4("ImprudenceTagColor", getChild("client_tag_color")->get()); + refreshColors(); // member values become the official values and cancel becomes a no-op. } -- cgit v1.1