aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llprefschat.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-10-18 17:58:27 -0700
committerMcCabe Maxsted2009-10-18 17:58:27 -0700
commite4b0e7c82d670081c071d8a3da31b5ec407b8e07 (patch)
tree9410962bbb582eedbec448139e217f2714050777 /linden/indra/newview/llprefschat.cpp
parentStarted 1.3.0 branch (diff)
parentUpdated and added some Linux libs. (diff)
downloadmeta-impy-e4b0e7c82d670081c071d8a3da31b5ec407b8e07.zip
meta-impy-e4b0e7c82d670081c071d8a3da31b5ec407b8e07.tar.gz
meta-impy-e4b0e7c82d670081c071d8a3da31b5ec407b8e07.tar.bz2
meta-impy-e4b0e7c82d670081c071d8a3da31b5ec407b8e07.tar.xz
Merged working branch of 1.2 into LL 1.23 merge
Diffstat (limited to 'linden/indra/newview/llprefschat.cpp')
-rw-r--r--linden/indra/newview/llprefschat.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp
index 559ad2b..2e08cac 100644
--- a/linden/indra/newview/llprefschat.cpp
+++ b/linden/indra/newview/llprefschat.cpp
@@ -33,6 +33,8 @@
33 33
34#include "llviewerprecompiledheaders.h" 34#include "llviewerprecompiledheaders.h"
35 35
36#include "llchatbar.h"
37#include "llfloaterchat.h"
36#include "llprefschat.h" 38#include "llprefschat.h"
37#include "lltexteditor.h" 39#include "lltexteditor.h"
38#include "llviewercontrol.h" 40#include "llviewercontrol.h"
@@ -71,11 +73,11 @@ private:
71 BOOL mPlayTypingAnim; 73 BOOL mPlayTypingAnim;
72 BOOL mChatBubbles; 74 BOOL mChatBubbles;
73 BOOL mScriptErrorAsChat; 75 BOOL mScriptErrorAsChat;
76 BOOL mChatChannel;
74 F32 mConsoleOpacity; 77 F32 mConsoleOpacity;
75 F32 mBubbleOpacity; 78 F32 mBubbleOpacity;
76}; 79};
77 80
78
79LLPrefsChatImpl::LLPrefsChatImpl() 81LLPrefsChatImpl::LLPrefsChatImpl()
80 : LLPanel(std::string("Chat Panel")) 82 : LLPanel(std::string("Chat Panel"))
81{ 83{
@@ -105,6 +107,7 @@ LLPrefsChatImpl::LLPrefsChatImpl()
105 childSetValue("chat_full_width_check", gSavedSettings.getBOOL("ChatFullWidth")); 107 childSetValue("chat_full_width_check", gSavedSettings.getBOOL("ChatFullWidth"));
106 childSetValue("close_chat_on_return_check", gSavedSettings.getBOOL("CloseChatOnReturn")); 108 childSetValue("close_chat_on_return_check", gSavedSettings.getBOOL("CloseChatOnReturn"));
107 childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim")); 109 childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim"));
110 childSetValue("toggle_channel_control", gSavedSettings.getBOOL("ChatChannelSelect"));
108 childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity")); 111 childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity"));
109 childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity")); 112 childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity"));
110} 113}
@@ -131,6 +134,7 @@ void LLPrefsChatImpl::refreshValues()
131 mChatFullWidth = gSavedSettings.getBOOL("ChatFullWidth"); 134 mChatFullWidth = gSavedSettings.getBOOL("ChatFullWidth");
132 mCloseChatOnReturn = gSavedSettings.getBOOL("CloseChatOnReturn"); 135 mCloseChatOnReturn = gSavedSettings.getBOOL("CloseChatOnReturn");
133 mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim"); 136 mPlayTypingAnim = gSavedSettings.getBOOL("PlayTypingAnim");
137 mChatChannel = gSavedSettings.getBOOL("ChatChannelSelect");
134 mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity"); 138 mConsoleOpacity = gSavedSettings.getF32("ConsoleBackgroundOpacity");
135 mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); 139 mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity");
136} 140}
@@ -156,6 +160,7 @@ void LLPrefsChatImpl::cancel()
156 gSavedSettings.setBOOL("ChatFullWidth", mChatFullWidth); 160 gSavedSettings.setBOOL("ChatFullWidth", mChatFullWidth);
157 gSavedSettings.setBOOL("CloseChatOnReturn", mCloseChatOnReturn); 161 gSavedSettings.setBOOL("CloseChatOnReturn", mCloseChatOnReturn);
158 gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim); 162 gSavedSettings.setBOOL("PlayTypingAnim", mPlayTypingAnim);
163 gSavedSettings.setBOOL("ChatChannelSelect", mChatChannel);
159 gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity); 164 gSavedSettings.setF32("ConsoleBackgroundOpacity", mConsoleOpacity);
160 gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity); 165 gSavedSettings.setF32("ChatBubbleOpacity", mBubbleOpacity);
161} 166}
@@ -189,6 +194,18 @@ void LLPrefsChatImpl::apply()
189 gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal()); 194 gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal());
190 gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal()); 195 gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal());
191 196
197 BOOL chan_check = childGetValue("toggle_channel_control");
198 gSavedSettings.setBOOL("ChatChannelSelect", chan_check);
199 if (mChatChannel != chan_check)
200 {
201 if (gChatBar)
202 {
203 gChatBar->toggleChannelControl();
204 //LLFloaterChat::toggleHistoryChannelControl(); temporarily disable until working
205 }
206 mChatChannel = chan_check;
207 }
208
192 refreshValues(); // member values become the official values and cancel becomes a no-op. 209 refreshValues(); // member values become the official values and cancel becomes a no-op.
193} 210}
194 211