summaryrefslogtreecommitdiff
path: root/indra/newview/llbottomtray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llbottomtray.cpp')
-rw-r--r--indra/newview/llbottomtray.cpp34
1 files changed, 15 insertions, 19 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index b47787bd5f..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;
- }
-
- LLFloaterIMPanel* im = LLIMMgr::getInstance()->findFloaterBySession(session_id);
- if (!im)
- {
- return NULL; //should never happen
- }
+ LLIMChiclet::EType im_chiclet_type = LLIMChiclet::getIMSessionType(session_id);
- switch(im->getDialogType())
+ switch (im_chiclet_type)
{
- 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
@@ -273,4 +263,10 @@ void LLBottomTray::showCameraAndMoveControls(BOOL visible)
{
mCamPanel->setVisible(visible);
mMovementPanel->setVisible(visible);
+
+ if (!visible)
+ {
+ LLFloaterReg::hideFloaterInstance("moveview");
+ LLFloaterReg::hideFloaterInstance("camera");
+ }
}