summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterchat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterchat.cpp')
-rw-r--r--indra/newview/llfloaterchat.cpp51
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)
{