summaryrefslogtreecommitdiff
path: root/indra/newview/llsyswellwindow.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-12-31 14:31:58 -0800
committerJames Cook <james@lindenlab.com>2009-12-31 14:31:58 -0800
commiteb5a76996a1b1ce2ef30b6106287caae998dcc85 (patch)
treec796af5a77c8ebfa7d9d09709c0b179e721490c8 /indra/newview/llsyswellwindow.cpp
parent4e23ae312f0ab59c0c8c5b55c6c8450adf7d7f82 (diff)
parent6f66ec64b9e360a002a6d658327b72aaaab9325a (diff)
Merge (viewer-2-0 into gooey)
Diffstat (limited to 'indra/newview/llsyswellwindow.cpp')
-rw-r--r--indra/newview/llsyswellwindow.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index bcaefc3690..a46ca1f8ac 100644
--- a/indra/newview/llsyswellwindow.cpp
+++ b/indra/newview/llsyswellwindow.cpp
@@ -52,7 +52,7 @@
#include "llspeakers.h"
//---------------------------------------------------------------------------------
-LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLDockableFloater(NULL, key),
+LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLTransientDockableFloater(NULL, true, key),
mChannel(NULL),
mMessageList(NULL),
mSysWellChiclet(NULL),
@@ -90,13 +90,13 @@ BOOL LLSysWellWindow::postBuild()
// mouse up callback is not called in this case.
setMouseDownCallback(boost::bind(&LLSysWellWindow::releaseNewMessagesState, this));
- return LLDockableFloater::postBuild();
+ return LLTransientDockableFloater::postBuild();
}
//---------------------------------------------------------------------------------
void LLSysWellWindow::setMinimized(BOOL minimize)
{
- LLDockableFloater::setMinimized(minimize);
+ LLTransientDockableFloater::setMinimized(minimize);
}
//---------------------------------------------------------------------------------
@@ -106,15 +106,15 @@ void LLSysWellWindow::onStartUpToastClick(S32 x, S32 y, MASK mask)
setVisible(TRUE);
}
-//---------------------------------------------------------------------------------
-LLSysWellWindow::~LLSysWellWindow()
-{
+void LLSysWellWindow::setSysWellChiclet(LLSysWellChiclet* chiclet)
+{
+ mSysWellChiclet = chiclet;
+ if(mSysWellChiclet)
+ mSysWellChiclet->updateWidget(isWindowEmpty());
}
-
//---------------------------------------------------------------------------------
-void LLSysWellWindow::clear()
+LLSysWellWindow::~LLSysWellWindow()
{
- mMessageList->clear();
}
//---------------------------------------------------------------------------------
@@ -176,7 +176,7 @@ void LLSysWellWindow::setVisible(BOOL visible)
// do not show empty window
if (NULL == mMessageList || isWindowEmpty()) visible = FALSE;
- LLDockableFloater::setVisible(visible);
+ LLTransientDockableFloater::setVisible(visible);
// update notification channel state
if(mChannel)
@@ -192,15 +192,9 @@ void LLSysWellWindow::setVisible(BOOL visible)
}
//---------------------------------------------------------------------------------
-void LLSysWellWindow::onFocusLost()
-{
- setVisible(false);
-}
-
-//---------------------------------------------------------------------------------
void LLSysWellWindow::setDocked(bool docked, bool pop_on_undock)
{
- LLDockableFloater::setDocked(docked, pop_on_undock);
+ LLTransientDockableFloater::setDocked(docked, pop_on_undock);
// update notification channel state
if(mChannel)
@@ -287,6 +281,7 @@ void LLSysWellWindow::handleItemAdded(EItemType added_item_type)
setResizeLimits(min_width,min_height);
}
+ mSysWellChiclet->updateWidget(isWindowEmpty());
}
void LLSysWellWindow::handleItemRemoved(EItemType removed_item_type)
@@ -300,6 +295,7 @@ void LLSysWellWindow::handleItemRemoved(EItemType removed_item_type)
// refresh list to recalculate mSeparator position
mMessageList->reshape(mMessageList->getRect().getWidth(), mMessageList->getRect().getHeight());
}
+ mSysWellChiclet->updateWidget(isWindowEmpty());
}
bool LLSysWellWindow::anotherTypeExists(EItemType item_type)