aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llprefschat.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llprefschat.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp
index 4453751..f3b7278 100644
--- a/linden/indra/newview/llprefschat.cpp
+++ b/linden/indra/newview/llprefschat.cpp
@@ -32,6 +32,8 @@
32 32
33#include "llviewerprecompiledheaders.h" 33#include "llviewerprecompiledheaders.h"
34 34
35#include "llchatbar.h"
36#include "llfloaterchat.h"
35#include "llprefschat.h" 37#include "llprefschat.h"
36#include "lltexteditor.h" 38#include "lltexteditor.h"
37#include "llviewercontrol.h" 39#include "llviewercontrol.h"
@@ -69,11 +71,11 @@ protected:
69 BOOL mPlayTypingAnim; 71 BOOL mPlayTypingAnim;
70 BOOL mChatBubbles; 72 BOOL mChatBubbles;
71 BOOL mScriptErrorAsChat; 73 BOOL mScriptErrorAsChat;
74 BOOL mChatChannel;
72 F32 mConsoleOpacity; 75 F32 mConsoleOpacity;
73 F32 mBubbleOpacity; 76 F32 mBubbleOpacity;
74}; 77};
75 78
76
77LLPrefsChatImpl::LLPrefsChatImpl() 79LLPrefsChatImpl::LLPrefsChatImpl()
78 : LLPanel(std::string("Chat Panel")) 80 : LLPanel(std::string("Chat Panel"))
79{ 81{
@@ -101,6 +103,7 @@ LLPrefsChatImpl::LLPrefsChatImpl()
101 childSetValue("chat_full_width_check", gSavedSettings.getBOOL("ChatFullWidth")); 103 childSetValue("chat_full_width_check", gSavedSettings.getBOOL("ChatFullWidth"));
102 childSetValue("close_chat_on_return_check", gSavedSettings.getBOOL("CloseChatOnReturn")); 104 childSetValue("close_chat_on_return_check", gSavedSettings.getBOOL("CloseChatOnReturn"));
103 childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim")); 105 childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim"));
106 childSetValue("toggle_channel_control", gSavedSettings.getBOOL("ChatChannelSelect"));
104 childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity")); 107 childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity"));
105 childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity")); 108 childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity"));
106 109
@@ -124,6 +127,7 @@ LLPrefsChatImpl::LLPrefsChatImpl()
124 mChatFullWidth = gSavedSettings.getBOOL("ChatFullWidth"); 127 mChatFullWidth = gSavedSettings.getBOOL("ChatFullWidth");
125 mCloseChatOnReturn = gSavedSettings.getBOOL("CloseChatOnReturn"); 128 mCloseChatOnReturn = gSavedSettings.getBOOL("CloseChatOnReturn");
126 mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim"); 129 mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim");
130 mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect");
127 mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity"); 131 mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity");
128 mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); 132 mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity");
129} 133}
@@ -149,6 +153,7 @@ void LLPrefsChatImpl::cancel()
149 gSavedSettings.setBOOL("ChatFullWidth", mChatFullWidth); 153 gSavedSettings.setBOOL("ChatFullWidth", mChatFullWidth);
150 gSavedSettings.setBOOL("CloseChatOnReturn", mCloseChatOnReturn); 154 gSavedSettings.setBOOL("CloseChatOnReturn", mCloseChatOnReturn);
151 gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim); 155 gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim);
156 gSavedSettings.setBOOL("ChatChannelSelect", mChatChannel);
152 gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity); 157 gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity);
153 gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity); 158 gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity);
154} 159}
@@ -181,8 +186,21 @@ void LLPrefsChatImpl::apply()
181 186
182 gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal()); 187 gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal());
183 gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal()); 188 gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal());
189
190 BOOL chan_check = childGetValue("toggle_channel_control");
191 gSavedSettings.setBOOL("ChatChannelSelect", chan_check);
192 if (mChatChannel != chan_check)
193 {
194 if (gChatBar)
195 {
196 gChatBar->toggleChannelControl();
197 LLFloaterChat::toggleHistoryChannelControl();
198 }
199 mChatChannel = chan_check;
200 }
184} 201}
185 202
203
186//--------------------------------------------------------------------------- 204//---------------------------------------------------------------------------
187 205
188LLPrefsChat::LLPrefsChat() 206LLPrefsChat::LLPrefsChat()