diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llprefschat.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/linden/indra/newview/llprefschat.cpp b/linden/indra/newview/llprefschat.cpp index 4453751..82ae07c 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" |
@@ -45,10 +47,13 @@ class LLPrefsChatImpl : public LLPanel | |||
45 | public: | 47 | public: |
46 | LLPrefsChatImpl(); | 48 | LLPrefsChatImpl(); |
47 | /*virtual*/ ~LLPrefsChatImpl(){}; | 49 | /*virtual*/ ~LLPrefsChatImpl(){}; |
50 | /*virtual*/ BOOL postBuild(); | ||
48 | 51 | ||
49 | void apply(); | 52 | void apply(); |
50 | void cancel(); | 53 | void cancel(); |
51 | 54 | ||
55 | static void onCheckToggleChannel(LLUICtrl* ctrl, void* user_data); | ||
56 | |||
52 | protected: | 57 | protected: |
53 | S32 mChatSize; | 58 | S32 mChatSize; |
54 | F32 mChatPersist; | 59 | F32 mChatPersist; |
@@ -73,7 +78,6 @@ protected: | |||
73 | F32 mBubbleOpacity; | 78 | F32 mBubbleOpacity; |
74 | }; | 79 | }; |
75 | 80 | ||
76 | |||
77 | LLPrefsChatImpl::LLPrefsChatImpl() | 81 | LLPrefsChatImpl::LLPrefsChatImpl() |
78 | : LLPanel(std::string("Chat Panel")) | 82 | : LLPanel(std::string("Chat Panel")) |
79 | { | 83 | { |
@@ -128,6 +132,13 @@ LLPrefsChatImpl::LLPrefsChatImpl() | |||
128 | mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); | 132 | mBubbleOpacity = gSavedSettings.getF32("ChatBubbleOpacity"); |
129 | } | 133 | } |
130 | 134 | ||
135 | BOOL LLPrefsChatImpl::postBuild() | ||
136 | { | ||
137 | childSetCommitCallback("toggle_channel_control",onCheckToggleChannel, this); | ||
138 | |||
139 | return TRUE; | ||
140 | } | ||
141 | |||
131 | void LLPrefsChatImpl::cancel() | 142 | void LLPrefsChatImpl::cancel() |
132 | { | 143 | { |
133 | gSavedSettings.setS32("ChatFontSize", mChatSize); | 144 | gSavedSettings.setS32("ChatFontSize", mChatSize); |
@@ -183,6 +194,16 @@ void LLPrefsChatImpl::apply() | |||
183 | gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal()); | 194 | gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal()); |
184 | } | 195 | } |
185 | 196 | ||
197 | // static | ||
198 | void LLPrefsChatImpl::onCheckToggleChannel(LLUICtrl* ctrl, void* user_data) | ||
199 | { | ||
200 | if (gChatBar) | ||
201 | { | ||
202 | gChatBar->toggleChannelControl(); | ||
203 | LLFloaterChat::toggleHistoryChannelControl(); | ||
204 | } | ||
205 | } | ||
206 | |||
186 | //--------------------------------------------------------------------------- | 207 | //--------------------------------------------------------------------------- |
187 | 208 | ||
188 | LLPrefsChat::LLPrefsChat() | 209 | LLPrefsChat::LLPrefsChat() |