From adbffe79b6b2794e647f6259132f5d64e1e93ea0 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 5 Nov 2010 17:10:28 -0700 Subject: Created new preferences panel to handle chat colors and name highlighting (removes the 'Extras' panel from Prefs > Advanced and moves the color options from 'Text Chat') --- linden/indra/newview/CMakeLists.txt | 2 + linden/indra/newview/llfloaterpreference.cpp | 14 +- linden/indra/newview/llfloaterpreference.h | 2 + linden/indra/newview/llprefsadvanced.cpp | 27 --- linden/indra/newview/llprefschat.cpp | 51 ----- linden/indra/newview/llprefscolors.cpp | 180 +++++++++++++++ linden/indra/newview/llprefscolors.h | 67 ++++++ .../xui/en-us/panel_preferences_advanced.xml | 51 ----- .../default/xui/en-us/panel_preferences_chat.xml | 246 +++++++++------------ .../default/xui/en-us/panel_preferences_colors.xml | 115 ++++++++++ 10 files changed, 478 insertions(+), 277 deletions(-) create mode 100644 linden/indra/newview/llprefscolors.cpp create mode 100644 linden/indra/newview/llprefscolors.h create mode 100644 linden/indra/newview/skins/default/xui/en-us/panel_preferences_colors.xml (limited to 'linden/indra') diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index e3a1745..a4d99f2 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt @@ -333,6 +333,7 @@ set(viewer_SOURCE_FILES llpolymorph.cpp llprefsadvanced.cpp llprefschat.cpp + llprefscolors.cpp llprefsim.cpp llprefsvoice.cpp llpreviewanim.cpp @@ -790,6 +791,7 @@ set(viewer_HEADER_FILES llpolymorph.h llprefsadvanced.h llprefschat.h + llprefscolors.h llprefsim.h llprefsvoice.h llpreview.h diff --git a/linden/indra/newview/llfloaterpreference.cpp b/linden/indra/newview/llfloaterpreference.cpp index b740725..906cf11 100644 --- a/linden/indra/newview/llfloaterpreference.cpp +++ b/linden/indra/newview/llfloaterpreference.cpp @@ -64,6 +64,7 @@ #include "llpanelskins.h" #include "llprefsadvanced.h" #include "llprefschat.h" +#include "llprefscolors.h" #include "llprefsvoice.h" #include "llprefsim.h" #include "llresizehandle.h" @@ -133,6 +134,7 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mAudioPanel(NULL), mMsgPanel(NULL), mSkinsPanel(NULL), + mPrefsColors(NULL), mLCDPanel(NULL), mPrefsFonts(NULL), mPrefsAdvanced(NULL) @@ -190,6 +192,10 @@ LLPreferenceCore::LLPreferenceCore(LLTabContainer* tab_container, LLButton * def mMsgPanel = new LLPanelMsgs(); mTabContainer->addTabPanel(mMsgPanel, mMsgPanel->getLabel(), FALSE, onTabChanged, mTabContainer); mMsgPanel->setDefaultBtn(default_btn); + + mPrefsColors = new LLPrefsColors(); + mTabContainer->addTabPanel(mPrefsColors, mPrefsColors->getLabel(), FALSE, onTabChanged, mTabContainer); + mPrefsColors->setDefaultBtn(default_btn); mSkinsPanel = new LLPanelSkins(); mTabContainer->addTabPanel(mSkinsPanel, mSkinsPanel->getLabel(), FALSE, onTabChanged, mTabContainer); @@ -272,7 +278,11 @@ LLPreferenceCore::~LLPreferenceCore() delete mPrefsFonts; mPrefsFonts = NULL; } - + if (mPrefsColors) + { + delete mPrefsColors; + mPrefsColors = NULL; + } } @@ -290,6 +300,7 @@ void LLPreferenceCore::apply() mSkinsPanel->apply(); mPrefsAdvanced->apply(); mPrefsFonts->apply(); + mPrefsColors->apply(); // hardware menu apply LLFloaterHardwareSettings::instance()->apply(); @@ -320,6 +331,7 @@ void LLPreferenceCore::cancel() mSkinsPanel->cancel(); mPrefsAdvanced->cancel(); mPrefsFonts->cancel(); + mPrefsColors->cancel(); // cancel hardware menu LLFloaterHardwareSettings::instance()->cancel(); diff --git a/linden/indra/newview/llfloaterpreference.h b/linden/indra/newview/llfloaterpreference.h index e98c45c..c52f541 100644 --- a/linden/indra/newview/llfloaterpreference.h +++ b/linden/indra/newview/llfloaterpreference.h @@ -57,6 +57,7 @@ class LLPanelMsgs; class LLPanelSkins; class LLPrefsAdvanced; class ImpPrefsFonts; +class LLPrefsColors; class LLScrollListCtrl; class LLPreferenceCore @@ -94,6 +95,7 @@ private: LLPanelMsgs *mMsgPanel; LLPanelLCD *mLCDPanel; LLPrefsAdvanced *mPrefsAdvanced; + LLPrefsColors *mPrefsColors; ImpPrefsFonts* mPrefsFonts; }; diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp index aa62b34..99bc4fd 100644 --- a/linden/indra/newview/llprefsadvanced.cpp +++ b/linden/indra/newview/llprefsadvanced.cpp @@ -116,15 +116,6 @@ BOOL LLPrefsAdvanced::postBuild() initHelpBtn("EmeraldHelp_SpellCheck", "EmeraldHelp_SpellCheck"); - childSetValue("HighlightOwnNameInIM", gSavedSettings.getBOOL("HighlightOwnNameInIM")); - childSetValue("HighlightFriendsChat", gSavedSettings.getBOOL("HighlightFriendsChat")); - getChild("FriendsChatColor")->set(gSavedSettings.getColor4("FriendsChatColor")); - childSetValue("HighlightOwnNameInChat", gSavedSettings.getBOOL("HighlightOwnNameInChat")); - getChild("OwnNameChatColor")->set(gSavedSettings.getColor4("OwnNameChatColor")); - childSetValue("nick01", gSavedSettings.getString("nick01")); - childSetValue("nick02", gSavedSettings.getString("nick02")); - childSetValue("nick03", gSavedSettings.getString("nick03")); - refresh(); return TRUE; @@ -147,24 +138,6 @@ void LLPrefsAdvanced::apply() gSavedSettings.setU32("LightShareAllowed", (U32)childGetValue("lightshare_combo").asInteger()); - gSavedSettings.setBOOL("HighlightOwnNameInIM", childGetValue("HighlightOwnNameInIM")); - gSavedSettings.setBOOL("HighlightFriendsChat", childGetValue("HighlightFriendsChat")); - gSavedSettings.setColor4("FriendsChatColor", getChild("FriendsChatColor")->get()); - gSavedSettings.setBOOL("HighlightOwnNameInChat", childGetValue("HighlightOwnNameInChat")); - gSavedSettings.setColor4("OwnNameChatColor", getChild("OwnNameChatColor")->get()); - - std::string nick01 = childGetValue("nick01"); - boost::trim(nick01); - gSavedSettings.setString("nick01", nick01); - - std::string nick02 = childGetValue("nick02"); - boost::trim(nick02); - gSavedSettings.setString("nick02", nick02); - - std::string nick03 = childGetValue("nick03"); - boost::trim(nick03); - gSavedSettings.setString("nick03", nick03); - // Need to force a rebake when ClothingLayerProtection toggled for it take effect -- MC if (gSavedSettings.getBOOL("ShowMyClientTagToOthers") != (BOOL)childGetValue("client_name_tag_broadcast_check")) { diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp index 8d704d5..5f74a25 100644 --- a/linden/indra/newview/llprefschat.cpp +++ b/linden/indra/newview/llprefschat.cpp @@ -36,10 +36,8 @@ #include "llchatbar.h" #include "llfloaterchat.h" #include "llprefschat.h" -#include "lltexteditor.h" #include "llviewercontrol.h" #include "lluictrlfactory.h" -#include "llcolorswatch.h" #include "llradiogroup.h" #include "llstylemap.h" @@ -57,15 +55,6 @@ private: S32 mChatSize; F32 mChatPersist; S32 mChatMaxLines; - LLColor4 mSystemChatColor; - LLColor4 mUserChatColor; - LLColor4 mAgentChatColor; - LLColor4 mIMChatColor; - LLColor4 mObjectChatColor; - LLColor4 mOwnerSayChatColor; - LLColor4 mBGChatColor; - LLColor4 mScriptErrorColor; - LLColor4 mHTMLLinkColor; BOOL mChatFullWidth; BOOL mCloseChatOnReturn; BOOL mArrowKeysMoveAvatar; @@ -92,16 +81,6 @@ LLPrefsChatImpl::LLPrefsChatImpl() childSetValue("fade_chat_time", gSavedSettings.getF32("ChatPersistTime")); childSetValue("max_chat_count", gSavedSettings.getS32("ConsoleMaxLines")); - getChild("system")->set(gSavedSettings.getColor4("SystemChatColor")); - getChild("user")->set(gSavedSettings.getColor4("UserChatColor")); - getChild("agent")->set(gSavedSettings.getColor4("AgentChatColor")); - getChild("im")->set(gSavedSettings.getColor4("IMChatColor")); - getChild("script_error")->set(gSavedSettings.getColor4("ScriptErrorColor")); - getChild("objects")->set(gSavedSettings.getColor4("ObjectChatColor")); - getChild("owner")->set(gSavedSettings.getColor4("llOwnerSayChatColor")); - getChild("background")->set(gSavedSettings.getColor4("BackgroundChatColor")); - getChild("links")->set(gSavedSettings.getColor4("HTMLLinkColor")); - childSetValue("arrow_keys_move_avatar_check", gSavedSettings.getBOOL("ArrowKeysMoveAvatar")); childSetValue("show_timestamps_check", gSavedSettings.getBOOL("ChatShowTimestamps")); childSetValue("script_errors_as_chat", gSavedSettings.getBOOL("ScriptErrorsAsChat")); @@ -124,15 +103,6 @@ void LLPrefsChatImpl::refreshValues() mChatSize = gSavedSettings.getS32("ChatFontSize"); mChatPersist = gSavedSettings.getF32("ChatPersistTime"); mChatMaxLines = gSavedSettings.getS32("ConsoleMaxLines"); - mSystemChatColor = gSavedSettings.getColor4("SystemChatColor"); - mUserChatColor = gSavedSettings.getColor4("UserChatColor"); - mAgentChatColor = gSavedSettings.getColor4("AgentChatColor"); - mIMChatColor = gSavedSettings.getColor4("IMChatColor"); - mObjectChatColor = gSavedSettings.getColor4("ObjectChatColor"); - mOwnerSayChatColor = gSavedSettings.getColor4("llOwnerSayChatColor"); - mBGChatColor = gSavedSettings.getColor4("BackgroundChatColor"); - mScriptErrorColor = gSavedSettings.getColor4("ScriptErrorColor"); - mHTMLLinkColor = gSavedSettings.getColor4("HTMLLinkColor"); mArrowKeysMoveAvatar = gSavedSettings.getBOOL("ArrowKeysMoveAvatar"); mShowTimestamps = gSavedSettings.getBOOL("ChatShowTimestamps"); mScriptErrorAsChat = gSavedSettings.getBOOL("ScriptErrorsAsChat"); @@ -154,15 +124,6 @@ void LLPrefsChatImpl::cancel() gSavedSettings.setS32("ChatFontSize", mChatSize); gSavedSettings.setF32("ChatPersistTime", mChatPersist); gSavedSettings.setS32("ConsoleMaxLines", mChatMaxLines); - gSavedSettings.setColor4("SystemChatColor", mSystemChatColor); - gSavedSettings.setColor4("UserChatColor", mUserChatColor); - gSavedSettings.setColor4("AgentChatColor", mAgentChatColor); - gSavedSettings.setColor4("IMChatColor", mIMChatColor); - gSavedSettings.setColor4("ObjectChatColor", mObjectChatColor); - gSavedSettings.setColor4("llOwnerSayChatColor", mOwnerSayChatColor); - gSavedSettings.setColor4("BackgroundChatColor", mBGChatColor); - gSavedSettings.setColor4("ScriptErrorColor", mScriptErrorColor); - gSavedSettings.setColor4("HTMLLinkColor", mHTMLLinkColor); gSavedSettings.setBOOL("ArrowKeysMoveAvatar", mArrowKeysMoveAvatar); gSavedSettings.setBOOL("ChatShowTimestamps", mShowTimestamps); gSavedSettings.setBOOL("ScriptErrorsAsChat", mScriptErrorAsChat); @@ -184,18 +145,6 @@ void LLPrefsChatImpl::apply() gSavedSettings.setF32("ChatPersistTime", childGetValue("fade_chat_time").asReal()); gSavedSettings.setS32("ConsoleMaxLines", childGetValue("max_chat_count")); - gSavedSettings.setColor4("SystemChatColor", childGetValue("system")); - gSavedSettings.setColor4("UserChatColor", childGetValue("user")); - gSavedSettings.setColor4("AgentChatColor", childGetValue("agent")); - gSavedSettings.setColor4("IMChatColor", childGetValue("im")); - gSavedSettings.setColor4("ScriptErrorColor", childGetValue("script_error")); - gSavedSettings.setColor4("ObjectChatColor", childGetValue("objects")); - gSavedSettings.setColor4("llOwnerSayChatColor", childGetValue("owner")); - gSavedSettings.setColor4("BackgroundChatColor", childGetValue("background")); - - gSavedSettings.setColor4("HTMLLinkColor", childGetValue("links")); - LLTextEditor::setLinkColor(childGetValue("links")); - gSavedSettings.setBOOL("ArrowKeysMoveAvatar", childGetValue("arrow_keys_move_avatar_check")); gSavedSettings.setBOOL("ChatShowTimestamps", childGetValue("show_timestamps_check")); gSavedSettings.setBOOL("ScriptErrorsAsChat", childGetValue("script_errors_as_chat")); diff --git a/linden/indra/newview/llprefscolors.cpp b/linden/indra/newview/llprefscolors.cpp new file mode 100644 index 0000000..9a30fcd --- /dev/null +++ b/linden/indra/newview/llprefscolors.cpp @@ -0,0 +1,180 @@ +/** +* @file llprefscolors.cpp +* @brief Color-specific preferences for Imprudence +* +* $LicenseInfo:firstyear=2009&license=viewergpl$ +* +* Copyright (c) 2010, McCabe Maxsted +* +* Imprudence Viewer Source Code +* The source code in this file ("Source Code") is provided to you +* under the terms of the GNU General Public License, version 2.0 +* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in +* this distribution, or online at +* http://secondlifegrid.net/programs/open_source/licensing/gplv2 +* +* There are special exceptions to the terms and conditions of the GPL as +* it is applied to this Source Code. View the full text of the exception +* in the file doc/FLOSS-exception.txt in this software distribution, or +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception +* +* By copying, modifying or distributing this software, you acknowledge +* that you have read and understood your obligations described above, +* and agree to abide by those obligations. +* +* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO +* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +* COMPLETENESS OR PERFORMANCE. +* $/LicenseInfo$ +*/ + +#include "llviewerprecompiledheaders.h" + +#include "llprefscolors.h" +#include "lltexteditor.h" +#include "llviewercontrol.h" + +#include "lluictrlfactory.h" +#include "llcolorswatch.h" + +#include "boost/algorithm/string.hpp" + +LLPrefsColors::LLPrefsColors() +{ + refreshColors(); // initialize member data from saved settings + + LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_colors.xml"); +} + +LLPrefsColors::~LLPrefsColors() +{ + // Children all cleaned up by default view destructor. +} + +BOOL LLPrefsColors::postBuild() +{ + getChild("system")->set(gSavedSettings.getColor4("SystemChatColor")); + getChild("user")->set(gSavedSettings.getColor4("UserChatColor")); + getChild("agent")->set(gSavedSettings.getColor4("AgentChatColor")); + getChild("im")->set(gSavedSettings.getColor4("IMChatColor")); + getChild("script_error")->set(gSavedSettings.getColor4("ScriptErrorColor")); + getChild("objects")->set(gSavedSettings.getColor4("ObjectChatColor")); + getChild("owner")->set(gSavedSettings.getColor4("llOwnerSayChatColor")); + getChild("background")->set(gSavedSettings.getColor4("BackgroundChatColor")); + getChild("links")->set(gSavedSettings.getColor4("HTMLLinkColor")); + getChild("FriendsChatColor")->set(gSavedSettings.getColor4("FriendsChatColor")); + getChild("OwnNameChatColor")->set(gSavedSettings.getColor4("OwnNameChatColor")); + + childSetValue("HighlightOwnNameInIM", gSavedSettings.getBOOL("HighlightOwnNameInIM")); + childSetValue("HighlightFriendsChat", gSavedSettings.getBOOL("HighlightFriendsChat")); + childSetValue("HighlightOwnNameInChat", gSavedSettings.getBOOL("HighlightOwnNameInChat")); + updateSelfCheck(); + updateFriendsCheck(); + + childSetValue("nick01", gSavedSettings.getString("nick01")); + childSetValue("nick02", gSavedSettings.getString("nick02")); + childSetValue("nick03", gSavedSettings.getString("nick03")); + + childSetCommitCallback("HighlightOwnNameInIM", onCommitCheckSelfName, this); + childSetCommitCallback("HighlightOwnNameInChat", onCommitCheckSelfName, this); + childSetCommitCallback("HighlightFriendsChat", onCommitCheckFriends, this); + + return TRUE; +} + +void LLPrefsColors::refreshColors() +{ + mSystemChatColor = gSavedSettings.getColor4("SystemChatColor"); + mUserChatColor = gSavedSettings.getColor4("UserChatColor"); + mAgentChatColor = gSavedSettings.getColor4("AgentChatColor"); + mIMChatColor = gSavedSettings.getColor4("IMChatColor"); + mObjectChatColor = gSavedSettings.getColor4("ObjectChatColor"); + mOwnerSayChatColor = gSavedSettings.getColor4("llOwnerSayChatColor"); + mBGChatColor = gSavedSettings.getColor4("BackgroundChatColor"); + mScriptErrorColor = gSavedSettings.getColor4("ScriptErrorColor"); + mHTMLLinkColor = gSavedSettings.getColor4("HTMLLinkColor"); + mFriendsChatColor = gSavedSettings.getColor4("FriendsChatColor"); + mOwnNameChatColor = gSavedSettings.getColor4("OwnNameChatColor"); +} + +// static +void LLPrefsColors::onCommitCheckSelfName(LLUICtrl* ctrl, void* userdata) +{ + LLPrefsColors* self = (LLPrefsColors*)userdata; + self->updateSelfCheck(); +} + +void LLPrefsColors::updateSelfCheck() +{ + bool highlight_names_enabled = (childGetValue("HighlightOwnNameInIM") || childGetValue("HighlightOwnNameInChat")); + + getChild("OwnNameChatColor")->setEnabled(highlight_names_enabled); + 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 +void LLPrefsColors::onCommitCheckFriends(LLUICtrl* ctrl, void* userdata) +{ + LLPrefsColors* self = (LLPrefsColors*)userdata; + self->updateFriendsCheck(); +} + +void LLPrefsColors::updateFriendsCheck() +{ + getChild("FriendsChatColor")->setEnabled(childGetValue("HighlightFriendsChat")); +} + +void LLPrefsColors::cancel() +{ + gSavedSettings.setColor4("SystemChatColor", mSystemChatColor); + gSavedSettings.setColor4("UserChatColor", mUserChatColor); + gSavedSettings.setColor4("AgentChatColor", mAgentChatColor); + gSavedSettings.setColor4("IMChatColor", mIMChatColor); + gSavedSettings.setColor4("ObjectChatColor", mObjectChatColor); + gSavedSettings.setColor4("llOwnerSayChatColor", mOwnerSayChatColor); + gSavedSettings.setColor4("BackgroundChatColor", mBGChatColor); + gSavedSettings.setColor4("ScriptErrorColor", mScriptErrorColor); + gSavedSettings.setColor4("HTMLLinkColor", mHTMLLinkColor); + gSavedSettings.setColor4("FriendsChatColor", mFriendsChatColor); + gSavedSettings.setColor4("OwnNameChatColor", mOwnNameChatColor); +} + +void LLPrefsColors::apply() +{ + gSavedSettings.setColor4("SystemChatColor", childGetValue("system")); + gSavedSettings.setColor4("UserChatColor", childGetValue("user")); + gSavedSettings.setColor4("AgentChatColor", childGetValue("agent")); + gSavedSettings.setColor4("IMChatColor", childGetValue("im")); + gSavedSettings.setColor4("ScriptErrorColor", childGetValue("script_error")); + gSavedSettings.setColor4("ObjectChatColor", childGetValue("objects")); + gSavedSettings.setColor4("llOwnerSayChatColor", childGetValue("owner")); + gSavedSettings.setColor4("BackgroundChatColor", childGetValue("background")); + + gSavedSettings.setColor4("HTMLLinkColor", childGetValue("links")); + LLTextEditor::setLinkColor(childGetValue("links")); + + gSavedSettings.setBOOL("HighlightOwnNameInIM", childGetValue("HighlightOwnNameInIM")); + gSavedSettings.setBOOL("HighlightFriendsChat", childGetValue("HighlightFriendsChat")); + gSavedSettings.setColor4("FriendsChatColor", getChild("FriendsChatColor")->get()); + gSavedSettings.setBOOL("HighlightOwnNameInChat", childGetValue("HighlightOwnNameInChat")); + gSavedSettings.setColor4("OwnNameChatColor", getChild("OwnNameChatColor")->get()); + + std::string nick01 = childGetValue("nick01"); + boost::trim(nick01); + gSavedSettings.setString("nick01", nick01); + + std::string nick02 = childGetValue("nick02"); + boost::trim(nick02); + gSavedSettings.setString("nick02", nick02); + + std::string nick03 = childGetValue("nick03"); + boost::trim(nick03); + gSavedSettings.setString("nick03", nick03); + + refreshColors(); // member values become the official values and cancel becomes a no-op. +} diff --git a/linden/indra/newview/llprefscolors.h b/linden/indra/newview/llprefscolors.h new file mode 100644 index 0000000..70bda89 --- /dev/null +++ b/linden/indra/newview/llprefscolors.h @@ -0,0 +1,67 @@ +/** +* @file llprefscolors.h +* @brief Advanced preferences options for Imprudence +* +* $LicenseInfo:firstyear=2009&license=viewergpl$ +* +* Copyright (c) 2010, McCabe Maxsted +* +* Imprudence Viewer Source Code +* The source code in this file ("Source Code") is provided to you +* under the terms of the GNU General Public License, version 2.0 +* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in +* this distribution, or online at +* http://secondlifegrid.net/programs/open_source/licensing/gplv2 +* +* There are special exceptions to the terms and conditions of the GPL as +* it is applied to this Source Code. View the full text of the exception +* in the file doc/FLOSS-exception.txt in this software distribution, or +* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception +* +* By copying, modifying or distributing this software, you acknowledge +* that you have read and understood your obligations described above, +* and agree to abide by those obligations. +* +* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO +* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, +* COMPLETENESS OR PERFORMANCE. +* $/LicenseInfo$ +*/ + +#ifndef LLPREFSCOLORS_H +#define LLPREFSCOLORS_H + +#include "llpanel.h" + +class LLPrefsColors : public LLPanel +{ +public: + LLPrefsColors(); + ~LLPrefsColors(); + + BOOL postBuild(); + + void apply(); + void cancel(); + +private: + static void onCommitCheckSelfName(LLUICtrl* ctrl, void* userdata); + static void onCommitCheckFriends(LLUICtrl* ctrl, void* userdata); + void refreshColors(); + void updateFriendsCheck(); + void updateSelfCheck(); + + LLColor4 mSystemChatColor; + LLColor4 mUserChatColor; + LLColor4 mAgentChatColor; + LLColor4 mIMChatColor; + LLColor4 mObjectChatColor; + LLColor4 mOwnerSayChatColor; + LLColor4 mBGChatColor; + LLColor4 mScriptErrorColor; + LLColor4 mHTMLLinkColor; + LLColor4 mFriendsChatColor; + LLColor4 mOwnNameChatColor; +}; + +#endif //LLPREFSCOLORS_H 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 0f2181b..1b771b5 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 @@ -179,57 +179,6 @@ To use spellcheck, right-click a misspelled word tool_tip="Modify the AutoCorrect word list and settings" left="12" bottom_delta="-50" width="180" height="20" font="SansSerifSmall" follows="left|top"/> - - - - - - - - - - - - - - - Nick 1 - - - - Nick 2 - - - - Nick 3 - - diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml index fe60203..27d3fa4 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml @@ -24,60 +24,84 @@ Large + + + Translate Chat: + + + + Translate into this language: + + + + System Default + + + English + + + + + + Dansk (Danish) + + + Deutsch (German) + + + Español (Spanish) + + + Français (French) + + + Italiano (Italian) + + + Magyar (Hungarian) + + + Nederlands (Dutch) + + + Polski (Polish) + + + Portugués (Portuguese) + + + Русский (Russian) + + + Türkçe (Turkish) + + + Українська (Ukrainian) + + + 中文 (简体) (Chinese) + + + 日本語 (Japanese) + + + 한국어 (Korean) + + + - Color: - - - - - - - - - - - - Chat Console: @@ -115,8 +139,29 @@ label="Use full screen width (requires restart)" left="148" mouse_opaque="true" name="chat_full_width_check" radio_style="false" width="239" /> + + + Chat Bubbles: + + + + + Miscellaneous: @@ -147,98 +192,5 @@ font="SansSerifSmall" height="16" initial_value="false" label="Show custom chat channel" left="148" mouse_opaque="true" name="toggle_channel_control" radio_style="false" width="237" /> - - Chat Bubbles: - - - - - - Translate Chat: - - - - Translate into this language: - - - - System Default - - - English - - - - - - Dansk (Danish) - - - Deutsch (German) - - - Español (Spanish) - - - Français (French) - - - Italiano (Italian) - - - Magyar (Hungarian) - - - Nederlands (Dutch) - - - Polski (Polish) - - - Portugués (Portuguese) - - - Русский (Russian) - - - Türkçe (Turkish) - - - Українська (Ukrainian) - - - 中文 (简体) (Chinese) - - - 日本語 (Japanese) - - - 한국어 (Korean) - - diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_colors.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_colors.xml new file mode 100644 index 0000000..11810d2 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_colors.xml @@ -0,0 +1,115 @@ + + + + Chat Colors: + + + + + + + + + + + + + + Line Highlighting: + + + + + + + + + + + Highlight nickname 1: + + + + + Highlight nickname 2: + + + + + Highlight nickname 3: + + + + -- cgit v1.1