diff options
author | Richard Nelson <richard@lindenlab.com> | 2009-08-04 01:12:59 +0000 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2009-08-04 01:12:59 +0000 |
commit | eb853f55c07ae4a3c3f2aa05fbabcf2e4b4dc115 (patch) | |
tree | 7707fccb8d0946b6257d5ed7c5dfd3941c53eec0 /indra/newview/llfloaterchat.cpp | |
parent | db5cda26676f376f18816013c0c5e3fbad5b20d0 (diff) |
svn merge -r 128442:129343 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-18 into svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3
Diffstat (limited to 'indra/newview/llfloaterchat.cpp')
-rw-r--r-- | indra/newview/llfloaterchat.cpp | 51 |
1 files changed, 18 insertions, 33 deletions
diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 1ecbdd8e16..8fcb7b985f 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -54,6 +54,7 @@ //#include "lllineeditor.h" #include "llmutelist.h" //#include "llresizehandle.h" +#include "llchatbar.h" #include "llrecentpeople.h" #include "llstatusbar.h" #include "llviewertexteditor.h" @@ -98,6 +99,7 @@ LLFloaterChat::LLFloaterChat(const LLSD& seed) : LLFloater(seed), mPanel(NULL) { + mFactoryMap["chat_panel"] = LLCallbackMap(createChatPanel, NULL); mFactoryMap["active_speakers_panel"] = LLCallbackMap(createSpeakersPanel, NULL); //Called from floater reg: LLUICtrlFactory::getInstance()->buildFloater(this,"floater_chat_history.xml"); @@ -108,23 +110,27 @@ LLFloaterChat::~LLFloaterChat() // Children all cleaned up by default view destructor. } -void LLFloaterChat::setVisible(BOOL visible) -{ - LLFloater::setVisible( visible ); -} - void LLFloaterChat::draw() { // enable say and shout only when text available childSetValue("toggle_active_speakers_btn", childIsVisible("active_speakers_panel")); + LLChatBar* chat_barp = findChild<LLChatBar>("chat_panel", TRUE); + if (chat_barp) + { + chat_barp->refresh(); + } + mPanel->refreshSpeakers(); LLFloater::draw(); } BOOL LLFloaterChat::postBuild() { + // Hide the chat overlay when our history is visible. + mVisibleSignal.connect(boost::bind(&LLFloaterChat::updateConsoleVisibility, this)); + mPanel = (LLPanelActiveSpeakers*)getChild<LLPanel>("active_speakers_panel"); childSetCommitCallback("show mutes",onClickToggleShowMute,this); //show mutes @@ -134,34 +140,6 @@ BOOL LLFloaterChat::postBuild() return TRUE; } -// public virtual -void LLFloaterChat::onClose(bool app_quitting) -{ - if (getHost()) - { - getHost()->setVisible(FALSE); - } - else - { - setVisible(FALSE); - } -} - -void LLFloaterChat::onVisibilityChange(BOOL new_visibility) -{ - // Hide the chat overlay when our history is visible. - updateConsoleVisibility(); - - LLFloater::onVisibilityChange(new_visibility); -} - -void LLFloaterChat::setMinimized(BOOL minimized) -{ - LLFloater::setMinimized(minimized); - updateConsoleVisibility(); -} - - void LLFloaterChat::updateConsoleVisibility() { // determine whether we should show console due to not being visible @@ -526,6 +504,13 @@ void* LLFloaterChat::createSpeakersPanel(void* data) return new LLPanelActiveSpeakers(LLLocalSpeakerMgr::getInstance(), TRUE); } +//static +void* LLFloaterChat::createChatPanel(void* data) +{ + LLChatBar* chatp = new LLChatBar(); + return chatp; +} + // static void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata) { |