summaryrefslogtreecommitdiff
path: root/indra/newview/llbottomtray.cpp
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@lindenlab.com>2009-09-09 17:10:06 -0700
committerBryan O'Sullivan <bos@lindenlab.com>2009-09-09 17:10:06 -0700
commita997e131d4262f0a18a6f4f8c305c73edbfea6b6 (patch)
tree5b7f8595e7911f4fd7ba6f2824c6b92f8478a9ef /indra/newview/llbottomtray.cpp
parentcab31b572d1a3b717b7f8b9fdf2a49f0b2eb6995 (diff)
parentbbf497469c4d71d5308421f1ef06d0a2098772c8 (diff)
Merge with SVN viewer-2.0.0-3 branch
Diffstat (limited to 'indra/newview/llbottomtray.cpp')
-rw-r--r--indra/newview/llbottomtray.cpp42
1 files changed, 23 insertions, 19 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 861f23abb7..d166715038 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -37,12 +37,12 @@
#include "llchiclet.h"
#include "llfloaterreg.h"
#include "llflyoutbutton.h"
+#include "llimpanel.h" // for LLIMFloater
#include "lllayoutstack.h"
#include "llnearbychatbar.h"
#include "llsplitbutton.h"
#include "llsyswellwindow.h"
#include "llfloatercamera.h"
-#include "llimpanel.h"
LLBottomTray::LLBottomTray(const LLSD&)
: mChicletPanel(NULL),
@@ -119,6 +119,7 @@ void LLBottomTray::onChicletClick(LLUICtrl* ctrl)
}
}
+// *TODO Vadim: why void* ?
void* LLBottomTray::createNearbyChatBar(void* userdata)
{
return new LLNearbyChatBar();
@@ -126,30 +127,19 @@ void* LLBottomTray::createNearbyChatBar(void* userdata)
LLIMChiclet* LLBottomTray::createIMChiclet(const LLUUID& session_id)
{
- if(session_id.isNull())
- {
- return NULL;
- }
+ LLIMChiclet::EType im_chiclet_type = LLIMChiclet::getIMSessionType(session_id);
- LLFloaterIMPanel* im = LLIMMgr::getInstance()->findFloaterBySession(session_id);
- if (!im)
+ switch (im_chiclet_type)
{
- return NULL; //should never happen
- }
-
- switch(im->getDialogType())
- {
- case IM_NOTHING_SPECIAL:
+ case LLIMChiclet::TYPE_IM:
return getChicletPanel()->createChiclet<LLIMP2PChiclet>(session_id);
- break;
- case IM_SESSION_GROUP_START:
- case IM_SESSION_INVITE:
+ case LLIMChiclet::TYPE_GROUP:
return getChicletPanel()->createChiclet<LLIMGroupChiclet>(session_id);
- break;
- default:
- return NULL;
+ case LLIMChiclet::TYPE_UNKNOWN:
break;
}
+
+ return NULL;
}
//virtual
@@ -182,6 +172,14 @@ void LLBottomTray::sessionRemoved(const LLUUID& session_id)
{
if(getChicletPanel())
{
+ // IM floater should be closed when session removed and associated chiclet closed
+ LLIMFloater* iMfloater = LLFloaterReg::findTypedInstance<LLIMFloater>(
+ "impanel", session_id);
+ if (iMfloater != NULL)
+ {
+ iMfloater->closeFloater();
+ }
+
getChicletPanel()->removeChiclet(session_id);
}
}
@@ -265,4 +263,10 @@ void LLBottomTray::showCameraAndMoveControls(BOOL visible)
{
mCamPanel->setVisible(visible);
mMovementPanel->setVisible(visible);
+
+ if (!visible)
+ {
+ LLFloaterReg::hideFloaterInstance("moveview");
+ LLFloaterReg::hideFloaterInstance("camera");
+ }
}