summaryrefslogtreecommitdiff
path: root/indra/newview/llbottomtray.cpp
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-08-04 15:34:34 -0700
committerbrad kittenbrink <brad@lindenlab.com>2009-08-04 15:34:34 -0700
commit33cc363a6813bf6c1268fa85747d1d403e00f8e5 (patch)
treed30696b245c4b5eb70575582d0dd9ddc4b20e5c7 /indra/newview/llbottomtray.cpp
parentdc62495da6e5c153c0df57fdbce6b0f40c0208f2 (diff)
parent89434ef6e64462041368ab26e049011fc84ae1e3 (diff)
Merged in latest viewer-2.0.0-3 up through svn r129410. LLFloaterTOS needs some post-merge cleanup.
Diffstat (limited to 'indra/newview/llbottomtray.cpp')
-rw-r--r--indra/newview/llbottomtray.cpp85
1 files changed, 25 insertions, 60 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 1781e6b3f1..9eb8369c4c 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -38,18 +38,16 @@
#include "llfloaterreg.h"
#include "llflyoutbutton.h"
#include "llnearbychatbar.h"
-
-//FIXME: temporary, for stand up proto
-#include "llselectmgr.h"
-#include "llvoavatarself.h"
+#include "llsplitbutton.h"
+#include "llfloatercamera.h"
+#include "llimpanel.h"
LLBottomTray::LLBottomTray(const LLSD&)
- : mChicletPanel(NULL)
- , mIMWell(NULL)
- , mSysWell(NULL)
- , mTalkBtn(NULL)
- , mStandUpBtn(NULL) ////FIXME: temporary, for stand up proto
- , mNearbyChatBar(NULL)
+: mChicletPanel(NULL),
+ mIMWell(NULL),
+ mSysWell(NULL),
+ mTalkBtn(NULL),
+ mNearbyChatBar(NULL)
{
mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL);
@@ -61,13 +59,9 @@ LLBottomTray::LLBottomTray(const LLSD&)
mChicletPanel->setChicletClickedCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1));
- ////FIXME: temporary, for stand up proto
- mStandUpBtn = getChild<LLButton> ("stand", TRUE, FALSE);
- if (mStandUpBtn)
- {
- mStandUpBtn->setCommitCallback(boost::bind(&LLBottomTray::onCommitStandUp, this, _1));
- }
-
+ LLSplitButton* presets = getChild<LLSplitButton>("presets", TRUE, FALSE);
+ if (presets) presets->setSelectionCallback(LLFloaterCamera::onClickCameraPresets);
+
LLIMMgr::getInstance()->addSessionObserver(this);
//this is to fix a crash that occurs because LLBottomTray is a singleton
@@ -79,6 +73,13 @@ LLBottomTray::LLBottomTray(const LLSD&)
setFocusRoot(TRUE);
}
+BOOL LLBottomTray::postBuild()
+{
+ mNearbyChatBar = getChild<LLNearbyChatBar>("chat_bar");
+
+ return TRUE;
+}
+
LLBottomTray::~LLBottomTray()
{
if (!LLSingleton<LLIMMgr>::destroyed())
@@ -94,54 +95,18 @@ void LLBottomTray::onChicletClick(LLUICtrl* ctrl)
{
// Until you can type into an IM Window and have a conversation,
// still show the old communicate window
- LLFloaterReg::showInstance("communicate", chiclet->getSessionId());
- // DISABLED IN VIEWER-2 BRANCH UNTIL FEATURE IS DONE -- James
- //// Show after comm window so it is frontmost (and hence will not
- //// auto-hide)
- //LLIMFloater::show(chiclet->getSessionId());
- }
-}
-
-void* LLBottomTray::createNearbyChatBar(void* userdata)
-{
- LLBottomTray *bt = LLBottomTray::getInstance();
- if (!bt)
- return NULL;
+ //LLFloaterReg::showInstance("communicate", chiclet->getSessionId());
- bt->mNearbyChatBar = new LLNearbyChatBar();
-
- return bt->mNearbyChatBar;
-}
-
-//virtual
-void LLBottomTray::draw()
-{
- refreshStandUp();
- LLPanel::draw();
-}
-
-void LLBottomTray::refreshStandUp()
-{
- //FIXME: temporary, for stand up proto
- BOOL sitting = FALSE;
- if (gAgent.getAvatarObject())
- {
- sitting = gAgent.getAvatarObject()->mIsSitting;
- }
-
- if (mStandUpBtn && mStandUpBtn->getVisible() != sitting)
- {
- mStandUpBtn->setVisible(sitting);
- sendChildToFront(mStandUpBtn);
- moveChildToBackOfTabGroup(mStandUpBtn);
+ // Show after comm window so it is frontmost (and hence will not
+ // auto-hide)
+ LLIMFloater::show(chiclet->getSessionId());
+ chiclet->setCounter(0);
}
}
-//FIXME: temporary, for stand up proto
-void LLBottomTray::onCommitStandUp(LLUICtrl* ctrl)
+void* LLBottomTray::createNearbyChatBar(void* userdata)
{
- LLSelectMgr::getInstance()->deselectAllForStandingUp();
- gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
+ return new LLNearbyChatBar();
}
//virtual