summaryrefslogtreecommitdiff
path: root/indra/newview/llimpanel.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-09-09 04:12:50 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-09-09 04:12:50 +0000
commit579d8447d3269fc6ed747774f1b612a88d850781 (patch)
treedb741511a681ae711aecb665b5be1eb6fdd4e062 /indra/newview/llimpanel.cpp
parentbc022a04605c1e0f3c08dfc75c6f49fc9def02c7 (diff)
merge merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1581 https://svn.aws.productengine.com/secondlife/pe/stable-2@1585 -> viewer-2.0.0-3
* Bugs: EXT-838 EXT-815 EXT-872 * New Dev: IM Floater Docking
Diffstat (limited to 'indra/newview/llimpanel.cpp')
-rw-r--r--indra/newview/llimpanel.cpp51
1 files changed, 16 insertions, 35 deletions
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 020eff375b..0efe9b9849 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -1989,7 +1989,7 @@ bool LLFloaterIMPanel::onConfirmForceCloseError(const LLSD& notification, const
LLIMFloater::LLIMFloater(const LLUUID& session_id)
- : LLFloater(session_id),
+ : LLDockableFloater(NULL, session_id),
mControlPanel(NULL),
mSessionID(session_id),
mLastMessageIndex(-1),
@@ -2119,9 +2119,7 @@ BOOL LLIMFloater::postBuild()
setTitle(LLIMModel::instance().getName(mSessionID));
setDocked(true);
- mDockTongue = LLUI::getUIImage("windows/Flyout_Pointer.png");
-
- return TRUE;
+ return LLDockableFloater::postBuild();
}
@@ -2145,8 +2143,6 @@ void* LLIMFloater::createPanelGroupControl(void* userdata)
return self->mControlPanel;
}
-
-const U32 UNDOCK_LEAP_HEIGHT = 12;
const U32 DOCK_ICON_HEIGHT = 6;
//virtual
@@ -2164,20 +2160,6 @@ void LLIMFloater::onFocusLost()
}
}
-
-
-//virtual
-void LLIMFloater::setDocked(bool docked, bool pop_on_undock)
-{
- LLFloater::setDocked(docked);
-
- if (!docked && pop_on_undock)
- {
- // visually pop up a little bit to emphasize the undocking
- translate(0, UNDOCK_LEAP_HEIGHT);
- }
-}
-
void LLIMFloater::onSlide()
{
LLPanel* im_control_panel = getChild<LLPanel>("panel_im_control_panel");
@@ -2206,6 +2188,20 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id)
floater->updateMessages();
floater->mInputEditor->setFocus(TRUE);
+
+ if (floater->getDockControl() == NULL)
+ {
+ LLView* chiclet =
+ LLBottomTray::getInstance()->getChicletPanel()->findChiclet<LLView>(
+ session_id);
+ if (chiclet == NULL)
+ {
+ llerror("Dock chiclet for LLIMFloater doesn't exists", 0);
+ }
+ floater->setDockControl(new LLDockControl(chiclet, floater, floater->getDockTongue(),
+ LLDockControl::TOP, floater->isDocked()));
+ }
+
return floater;
}
@@ -2305,18 +2301,3 @@ void LLIMFloater::setTyping(BOOL typing)
{
}
-
-void LLIMFloater::draw()
-{
- //if we are docked, make sure we've been positioned by the chiclet
- if (!isDocked() || mPositioned)
- {
- LLFloater::draw();
-
- if (isDocked())
- {
- mDockTongue->draw( (getRect().getWidth()/2) - mDockTongue->getWidth()/2, -mDockTongue->getHeight());
- }
- }
-}
-