diff options
Diffstat (limited to 'indra/newview/llsyswellwindow.cpp')
-rw-r--r-- | indra/newview/llsyswellwindow.cpp | 54 |
1 files changed, 32 insertions, 22 deletions
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 8c6ea59407..ba15053381 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), @@ -63,6 +63,7 @@ LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLDockableFloater(NULL, key) { mTypedItemsCount[IT_NOTIFICATION] = 0; mTypedItemsCount[IT_INSTANT_MESSAGE] = 0; + setOverlapsScreenChannel(true); } //--------------------------------------------------------------------------------- @@ -89,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); } //--------------------------------------------------------------------------------- @@ -105,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(); } //--------------------------------------------------------------------------------- @@ -175,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) @@ -191,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) @@ -286,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) @@ -299,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) @@ -352,7 +349,6 @@ LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& } // Initialize chiclet. - mChiclet->setRect(LLRect(5, 28, 30, 3)); // *HACK: workaround for (EXT-3599) mChiclet->setChicletSizeChangedCallback(boost::bind(&LLIMWellWindow::RowPanel::onChicletSizeChanged, this, mChiclet, _2)); mChiclet->enableCounterControl(true); mChiclet->setCounter(chicletCounter); @@ -413,6 +409,11 @@ BOOL LLIMWellWindow::RowPanel::handleMouseDown(S32 x, S32 y, MASK mask) return LLPanel::handleMouseDown(x, y, mask); } +// virtual +BOOL LLIMWellWindow::RowPanel::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + return mChiclet->handleRightMouseDown(x, y, mask); +} /************************************************************************/ /* ObjectRowPanel implementation */ /************************************************************************/ @@ -556,6 +557,12 @@ BOOL LLIMWellWindow::ObjectRowPanel::handleMouseDown(S32 x, S32 y, MASK mask) return LLPanel::handleMouseDown(x, y, mask); } +// virtual +BOOL LLIMWellWindow::ObjectRowPanel::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + return mChiclet->handleRightMouseDown(x, y, mask); +} + /************************************************************************/ /* LLNotificationWellWindow implementation */ /************************************************************************/ @@ -693,8 +700,7 @@ void LLNotificationWellWindow::connectListUpdaterToSignal(std::string notificati void LLNotificationWellWindow::onItemClick(LLSysWellItem* item) { LLUUID id = item->getID(); - if(mChannel) - mChannel->loadStoredToastByNotificationIDToChannel(id); + LLFloaterReg::showInstance("inspect_toast", id); } void LLNotificationWellWindow::onItemClose(LLSysWellItem* item) @@ -743,9 +749,13 @@ BOOL LLIMWellWindow::postBuild() void LLIMWellWindow::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - if (mMessageList->getItemByValue(session_id)) return; + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); + if (!session) return; - if (!gIMMgr->hasSession(session_id)) return; + // no need to spawn chiclets for participants in P2P calls called through Avaline + if (session->isP2P() && session->isOtherParticipantAvaline()) return; + + if (mMessageList->getItemByValue(session_id)) return; addIMRow(session_id, 0, name, other_participant_id); reshapeWindow(); |