diff options
| author | Steven Bennetts <steve@lindenlab.com> | 2009-09-07 22:55:07 +0000 |
|---|---|---|
| committer | Steven Bennetts <steve@lindenlab.com> | 2009-09-07 22:55:07 +0000 |
| commit | 79653dfed48105019b8ecca9cf4bfaa2a390e100 (patch) | |
| tree | 455943795bf3371bbff0689604cf5eedd903fae4 /indra/newview/llsyswellwindow.cpp | |
| parent | a9b2296b2b5664cfc8d86c7f99c00c10268e250a (diff) | |
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1566 https://svn.aws.productengine.com/secondlife/pe/stable-2@1580 -> viewer-2.0.0-3
* Bugs: EXT-807 EXT-810 EXT-811 EXT-784 EXT-820 EXT-393 EXT-826 EXT-811 EXT-801 EXT-808 EXT-393 EXT-743 EXT-699 EXT-397 EXT-812 EXT-736 EXT-744 EXT-809 EXT-306 EXT-854 EXT-857 EXT-790
* New Dev: EXT-694 EXT-393 EXT-367 EXT-819 EXT-795 EXT-827 EXT-788
* EXT-272 - Draggable Landmarks
* EXT-715 - Block List Panel
* EXT-782 - Implement advanced place information accordions
Diffstat (limited to 'indra/newview/llsyswellwindow.cpp')
| -rw-r--r-- | indra/newview/llsyswellwindow.cpp | 57 |
1 files changed, 25 insertions, 32 deletions
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 15d77dbf88..7ddbf0a744 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -38,9 +38,9 @@ #include "llviewercontrol.h" #include "llviewerwindow.h" +#include "llchiclet.h" //--------------------------------------------------------------------------------- -LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLFloater(LLSD()), - mSysWell(NULL), +LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLDockableFloater(NULL, key), mChannel(NULL), mScrollContainer(NULL), mNotificationList(NULL) @@ -57,13 +57,9 @@ BOOL LLSysWellWindow::postBuild() mNotificationList = getChild<LLScrollingPanelList>("notification_list"); mIMRowList = getChild<LLScrollingPanelList>("im_row_panel_list"); - gViewerWindow->setOnBottomTrayWidthChanged(boost::bind(&LLSysWellWindow::adjustWindowPosition, this)); // *TODO: won't be necessary after docking is realized mScrollContainer->setBorderVisible(FALSE); - mDockTongue = LLUI::getUIImage("windows/Flyout_Pointer.png"); - - - return TRUE; + return LLDockableFloater::postBuild(); } //--------------------------------------------------------------------------------- @@ -82,7 +78,6 @@ void LLSysWellWindow::addItem(LLSysWellItem::Params p) LLSysWellItem* new_item = new LLSysWellItem(p); mNotificationList->addPanel(dynamic_cast<LLScrollingPanel*>(new_item)); reshapeWindow(); - adjustWindowPosition(); // *TODO: won't be necessary after docking is realized new_item->setOnItemCloseCallback(boost::bind(&LLSysWellWindow::onItemClose, this, _1)); new_item->setOnItemClickCallback(boost::bind(&LLSysWellWindow::onItemClick, this, _1)); @@ -127,10 +122,6 @@ void LLSysWellWindow::removeItemByID(const LLUUID& id) return; reshapeWindow(); - adjustWindowPosition(); // *TODO: won't be necessary after docking is realized - - // hide chiclet window if there are no items left - setVisible(!isWindowEmpty()); } //--------------------------------------------------------------------------------- @@ -148,11 +139,20 @@ void LLSysWellWindow::onItemClose(LLSysWellItem* item) removeItemByID(id); if(mChannel) mChannel->killToastByNotificationID(id); + + // hide chiclet window if there are no items left + setVisible(!isWindowEmpty()); } //--------------------------------------------------------------------------------- void LLSysWellWindow::toggleWindow() { + if (getDockControl() == NULL) + { + setDockControl(new LLDockControl( + LLBottomTray::getInstance()->getSysWell(), this, + getDockTongue(), LLDockControl::TOP, isDocked())); + } setVisible(!getVisible()); } @@ -162,12 +162,20 @@ void LLSysWellWindow::setVisible(BOOL visible) // on Show adjust position of SysWell chiclet's window if(visible) { + if (LLBottomTray::instanceExists()) + { + LLBottomTray::getInstance()->getSysWell()->setToggleState(TRUE); + } if(mChannel) mChannel->removeAndStoreAllVisibleToasts(); - - adjustWindowPosition(); // *TODO: won't be necessary after docking is realized } - + else + { + if (LLBottomTray::instanceExists()) + { + LLBottomTray::getInstance()->getSysWell()->setToggleState(FALSE); + } + } if(mChannel) mChannel->setShowToasts(!visible); @@ -175,16 +183,6 @@ void LLSysWellWindow::setVisible(BOOL visible) } //--------------------------------------------------------------------------------- -void LLSysWellWindow::adjustWindowPosition() // *TODO: won't be necessary after docking is realized -{ - const S32 WINDOW_MARGIN = 5; - - LLRect btm_rect = LLBottomTray::getInstance()->getRect(); - LLRect this_rect = getRect(); - setOrigin(btm_rect.mRight - this_rect.getWidth() - WINDOW_MARGIN, WINDOW_MARGIN); -} - -//--------------------------------------------------------------------------------- void LLSysWellWindow::reshapeWindow() { // Get size for scrollbar and floater's header @@ -272,7 +270,6 @@ void LLSysWellWindow::addIMRow(const LLUUID& sessionId, S32 chicletCounter, { mIMRowList->addPanel(new RowPanel(this, sessionId, chicletCounter, name, otherParticipantId)); - adjustWindowPosition(); // *TODO: won't be necessary after docking is realized } //--------------------------------------------------------------------------------- @@ -286,14 +283,12 @@ void LLSysWellWindow::delIMRow(const LLUUID& sessionId) // hide chiclet window if there are no items left setVisible(!isWindowEmpty()); - - adjustWindowPosition(); // *TODO: won't be necessary after docking is realized } //--------------------------------------------------------------------------------- bool LLSysWellWindow::isWindowEmpty() { - if(mIMRowList->getPanelList().size() == 0 && mNotificationList->getPanelList().size() == 0) + if(mIMRowList->getPanelList().size() == 0 && LLBottomTray::getInstance()->getSysWell()->getCounter() == 0) { return true; } @@ -328,7 +323,7 @@ void LLSysWellWindow::sessionRemoved(const LLUUID& sessionId) { delIMRow(sessionId); reshapeWindow(); - mSysWell->updateUreadIMNotifications(); + LLBottomTray::getInstance()->getSysWell()->updateUreadIMNotifications(); } //--------------------------------------------------------------------------------- @@ -396,5 +391,3 @@ void LLSysWellWindow::RowPanel::updatePanel(BOOL allow_modify) } //--------------------------------------------------------------------------------- - - |
