diff options
author | skolb <none@none> | 2009-10-23 15:34:15 -0700 |
---|---|---|
committer | skolb <none@none> | 2009-10-23 15:34:15 -0700 |
commit | 2b69cb9e9cf5209a8156580b74e6662e4cc4243f (patch) | |
tree | f38805b6ca5b60e8c0130259865dc610eaee7a0b /indra/newview/llnearbychat.cpp | |
parent | 913786a62b2b8d8e6d9c483ea805a21e694fd818 (diff) | |
parent | 4ddaa866dde7a92e56617a32464e0667de3759ef (diff) |
Merged change to auto play pref (DEV-41787)
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
-rw-r--r-- | indra/newview/llnearbychat.cpp | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 6e90d22d89..bbab9944f3 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -55,11 +55,13 @@ #include "lldraghandle.h" #include "lltrans.h" +#include "llbottomtray.h" +#include "llnearbychatbar.h" static const S32 RESIZE_BAR_THICKNESS = 3; -LLNearbyChat::LLNearbyChat(const LLSD& key) : - LLFloater(key) +LLNearbyChat::LLNearbyChat(const LLSD& key) + : LLDockableFloater(NULL, key) ,mChatHistory(NULL) { @@ -89,7 +91,17 @@ BOOL LLNearbyChat::postBuild() setCanResize(true); - return LLFloater::postBuild(); + if(!LLDockableFloater::postBuild()) + return false; + + if (getDockControl() == NULL) + { + setDockControl(new LLDockControl( + LLBottomTray::getInstance()->getNearbyChatBar(), this, + getDockTongue(), LLDockControl::LEFT, boost::bind(&LLNearbyChat::getAllowedRect, this, _1))); + } + + return true; } @@ -255,13 +267,25 @@ void LLNearbyChat::onOpen(const LLSD& key ) void LLNearbyChat::setDocked (bool docked, bool pop_on_undock) { - LLFloater::setDocked(docked, pop_on_undock); + LLDockableFloater::setDocked(docked, pop_on_undock); - if(docked) - { - //move nearby_chat to right bottom - LLRect rect = gFloaterView->getRect(); - setRect(LLRect(rect.mLeft,getRect().getHeight(),rect.mLeft+getRect().getWidth(),0)); - } + setCanResize(!docked); +} + +void LLNearbyChat::setRect (const LLRect &rect) +{ + LLDockableFloater::setRect(rect); +} + +void LLNearbyChat::getAllowedRect(LLRect& rect) +{ + rect = gViewerWindow->getWorldViewRect(); +} +void LLNearbyChat::setVisible (BOOL visible) +{ + LLDockableFloater::setVisible(visible); +} +void LLNearbyChat::toggleWindow() +{ } |