diff options
Diffstat (limited to 'linden/indra/newview/llfloaterchat.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterchat.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index 5117b8d..f624ec3 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp | |||
@@ -56,10 +56,11 @@ | |||
56 | #include "llfloaterchatterbox.h" | 56 | #include "llfloaterchatterbox.h" |
57 | #include "llfloatermute.h" | 57 | #include "llfloatermute.h" |
58 | #include "llkeyboard.h" | 58 | #include "llkeyboard.h" |
59 | //#include "lllineeditor.h" | 59 | #include "lllineeditor.h" |
60 | #include "llmutelist.h" | 60 | #include "llmutelist.h" |
61 | //#include "llresizehandle.h" | 61 | //#include "llresizehandle.h" |
62 | #include "llchatbar.h" | 62 | #include "llchatbar.h" |
63 | #include "llspinctrl.h" | ||
63 | #include "llstatusbar.h" | 64 | #include "llstatusbar.h" |
64 | #include "llviewertexteditor.h" | 65 | #include "llviewertexteditor.h" |
65 | #include "llviewergesture.h" // for triggering gestures | 66 | #include "llviewergesture.h" // for triggering gestures |
@@ -223,6 +224,34 @@ void log_chat_text(const LLChat& chat) | |||
223 | 224 | ||
224 | LLLogChat::saveHistory(std::string("chat"),histstr); | 225 | LLLogChat::saveHistory(std::string("chat"),histstr); |
225 | } | 226 | } |
227 | |||
228 | // static | ||
229 | void LLFloaterChat::toggleHistoryChannelControl() | ||
230 | { | ||
231 | LLFloaterChat* chat_floater = LLFloaterChat::getInstance(LLSD()); | ||
232 | BOOL visible = gSavedSettings.getBOOL("ChatChannelSelect"); | ||
233 | BOOL control = chat_floater->getChild<LLSpinCtrl>("channel_control")->getVisible(); | ||
234 | |||
235 | LLLineEditor* input = chat_floater->getChild<LLLineEditor>("Chat Editor"); | ||
236 | LLRect input_rect = input->getRect(); | ||
237 | S32 chan_width = chat_floater->getChild<LLSpinCtrl>("channel_control")->getRect().getWidth(); | ||
238 | |||
239 | if (visible && !control) | ||
240 | { | ||
241 | input_rect.setLeftTopAndSize(input_rect.mLeft+chan_width+4, input_rect.mTop, | ||
242 | input_rect.getWidth()-chan_width, input_rect.getHeight()); | ||
243 | } | ||
244 | else if (!visible && control) | ||
245 | { | ||
246 | input_rect.setLeftTopAndSize(input_rect.mLeft-chan_width-4, input_rect.mTop, | ||
247 | input_rect.getWidth()+chan_width, input_rect.getHeight()); | ||
248 | } | ||
249 | input->setRect(input_rect); | ||
250 | |||
251 | chat_floater->childSetVisible("channel_control", visible); | ||
252 | chat_floater->childSetEnabled("channel_control", visible); | ||
253 | } | ||
254 | |||
226 | // static | 255 | // static |
227 | void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) | 256 | void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) |
228 | { | 257 | { |