summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloater.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-02-25 14:12:18 -0800
committerRoxie Linden <roxie@lindenlab.com>2010-02-25 14:12:18 -0800
commit0ac14158bcec40e65fb26d2fea7555ede1e2ca94 (patch)
treebacf3b28ac4de7f69da67d7616923dafe92b0d49 /indra/newview/llimfloater.cpp
parent92cef0426df15c0e661fa795e6b00214f381dd05 (diff)
parentab0c9c6754836cb26a520d0a9b2d7bbdd13a5f32 (diff)
automated merge from trunk
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r--indra/newview/llimfloater.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 5dc7f900e7..a39753aa55 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -109,6 +109,8 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id)
}
}
setOverlapsScreenChannel(true);
+
+ LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this);
}
void LLIMFloater::onFocusLost()
@@ -227,6 +229,7 @@ void LLIMFloater::sendMsg()
LLIMFloater::~LLIMFloater()
{
+ LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this);
}
//virtual
@@ -350,13 +353,15 @@ void* LLIMFloater::createPanelAdHocControl(void* userdata)
void LLIMFloater::onSlide()
{
- LLPanel* im_control_panel = getChild<LLPanel>("panel_im_control_panel");
- im_control_panel->setVisible(!im_control_panel->getVisible());
+ mControlPanel->setVisible(!mControlPanel->getVisible());
+
+ gSavedSettings.setBOOL("IMShowControlPanel", mControlPanel->getVisible());
- gSavedSettings.setBOOL("IMShowControlPanel", im_control_panel->getVisible());
+ getChild<LLButton>("slide_left_btn")->setVisible(mControlPanel->getVisible());
+ getChild<LLButton>("slide_right_btn")->setVisible(!mControlPanel->getVisible());
- getChild<LLButton>("slide_left_btn")->setVisible(im_control_panel->getVisible());
- getChild<LLButton>("slide_right_btn")->setVisible(!im_control_panel->getVisible());
+ LLLayoutStack* stack = getChild<LLLayoutStack>("im_panels");
+ if (stack) stack->setAnimate(true);
}
//static
@@ -510,14 +515,14 @@ bool LLIMFloater::toggle(const LLUUID& session_id)
if(!isChatMultiTab())
{
LLIMFloater* floater = LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id);
- if (floater && floater->getVisible())
+ if (floater && floater->getVisible() && floater->hasFocus())
{
// clicking on chiclet to close floater just hides it to maintain existing
// scroll/text entry state
floater->setVisible(false);
return false;
}
- else if(floater && !floater->isDocked())
+ else if(floater && (!floater->isDocked() || floater->getVisible() && !floater->hasFocus()))
{
floater->setVisible(TRUE);
floater->setFocus(TRUE);