summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloater.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-22 15:18:08 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-22 15:18:08 -0800
commit9e0920df2c8ada63397ea6e439b02ee5b40d1bf6 (patch)
tree26f6af13d1dcd9d02c48bd7897b3604481f3734c /indra/newview/llimfloater.cpp
parentb96e52b72ab598a57d981c850b5f14b1ac406325 (diff)
parent4cf79224d099c4fc8bdfd9617e95a776d5a028d4 (diff)
Merge from v2 trunk.
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r--indra/newview/llimfloater.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index d7c60ff34e..73597e7de3 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -58,6 +58,7 @@
#include "llinventorymodel.h"
#include "llrootview.h"
+#include "llspeakers.h"
LLIMFloater::LLIMFloater(const LLUUID& session_id)
@@ -109,6 +110,8 @@ LLIMFloater::LLIMFloater(const LLUUID& session_id)
}
}
setOverlapsScreenChannel(true);
+
+ LLTransientFloaterMgr::getInstance()->addControlView(LLTransientFloaterMgr::IM, this);
}
void LLIMFloater::onFocusLost()
@@ -227,6 +230,7 @@ void LLIMFloater::sendMsg()
LLIMFloater::~LLIMFloater()
{
+ LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this);
}
//virtual
@@ -350,13 +354,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 +516,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);