From 68911876b92ce7bfd33962f139529894503c1cd0 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Tue, 8 Jan 2013 13:48:18 -0500 Subject: [PATCH] Option to Disallow communicate shortcut opening detached friends list Added CommunicateSpecificShortcut Added checkbox to Text Chat preferences --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llprefschat.cpp | 4 ++++ indra/newview/llviewermenu.cpp | 3 ++- .../default/xui/en-us/panel_preferences_chat.xml | 3 ++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c1e4f02c0..07785949b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -782,6 +782,17 @@ Found in Advanced->Rendering->Info Displays Value 1 + CommunicateSpecificShortcut + + Comment + When true, the keyboard shortcut for Communicate will not bring up the torn off Friends List. + Persist + 1 + Type + Boolean + Value + 0 + MarketImporterUpdateFreq Comment diff --git a/indra/newview/llprefschat.cpp b/indra/newview/llprefschat.cpp index 7290c3fb9..95b442c4c 100644 --- a/indra/newview/llprefschat.cpp +++ b/indra/newview/llprefschat.cpp @@ -66,6 +66,7 @@ private: LLColor4 mHTMLLinkColor; BOOL mChatFullWidth; BOOL mCloseChatOnReturn; + bool mOnlyComm; BOOL mArrowKeysMoveAvatar; BOOL mShowTimestamps; BOOL mPlayTypingAnim; @@ -111,6 +112,7 @@ LLPrefsChatImpl::LLPrefsChatImpl() childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity")); childSetValue("translate_language_combobox", gSavedSettings.getString("TranslateLanguage")); childSetValue("translate_chat", gSavedSettings.getBOOL("TranslateChat")); + mOnlyComm = gSavedSettings.getBOOL("CommunicateSpecificShortcut"); } void LLPrefsChatImpl::refreshValues() @@ -139,6 +141,7 @@ void LLPrefsChatImpl::refreshValues() mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); mTranslateLanguage = gSavedSettings.getString("TranslateLanguage"); mTranslateChat = gSavedSettings.getBOOL("TranslateChat"); + mOnlyComm = gSavedSettings.getBOOL("CommunicateSpecificShortcut"); } void LLPrefsChatImpl::cancel() @@ -166,6 +169,7 @@ void LLPrefsChatImpl::cancel() gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity); gSavedSettings.setString("TranslateLanguage", mTranslateLanguage); gSavedSettings.setBOOL("TranslateChat", mTranslateChat); + gSavedSettings.setBOOL("CommunicateSpecificShortcut", mOnlyComm); } void LLPrefsChatImpl::apply() diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 7781f8a82..a58e8ecf2 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2062,7 +2062,8 @@ class LLViewCommunicate : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) { - if (LLFloaterChatterBox::getInstance()->getFloaterCount() == 0) + static LLCachedControl only_comm("CommunicateSpecificShortcut"); + if (!only_comm && LLFloaterChatterBox::getInstance()->getFloaterCount() == 0) { LLFloaterMyFriends::toggleInstance(); } diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml index 6bfb517f4..505cd314f 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml @@ -24,8 +24,9 @@ (# lines) - Chat Options: + Chat Options: +