From bf25f3fd00c836a1ac3e6d160aa3d97634da084f Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 25 Feb 2010 16:37:31 +0200 Subject: Work on normal bug EXT-4518 (movement & camera floaters should have window titles) -- done for Move floater. -- deprecated comments cleaned up --HG-- branch : product-engine --- indra/newview/llmoveview.cpp | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'indra/newview/llmoveview.cpp') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index 97e2b5b86e..ac4b98734b 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -87,6 +87,7 @@ LLFloaterMove::LLFloaterMove(const LLSD& key) BOOL LLFloaterMove::postBuild() { setIsChrome(TRUE); + setTitleVisible(TRUE); // restore title visibility after chrome applying LLDockableFloater::postBuild(); @@ -353,6 +354,7 @@ void LLFloaterMove::updateButtonsWithMovementMode(const EMovementMode newMode) showFlyControls(MM_FLY == newMode); setModeTooltip(newMode); setModeButtonToggleState(newMode); + setModeTitle(newMode); } void LLFloaterMove::showFlyControls(bool bShow) @@ -420,11 +422,30 @@ void LLFloaterMove::setModeTooltip(const EMovementMode mode) } } +void LLFloaterMove::setModeTitle(const EMovementMode mode) +{ + std::string title; + switch(mode) + { + case MM_WALK: + title = getString("walk_title"); + break; + case MM_RUN: + title = getString("run_title"); + break; + case MM_FLY: + title = getString("fly_title"); + break; + default: + // title should be provided for all modes + llassert(false); + break; + } + setTitle(title); +} + /** * Updates position of the floater to be center aligned with Move button. - * - * Because Tip floater created as dependent floater this method - * must be called before "showQuickTips()" to get Tip floater be positioned at the right side of the floater */ void LLFloaterMove::updatePosition() { -- cgit v1.2.3 From 4d978eaf0a5f09e4758956cf41f4dcf2bafb9b42 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 25 Feb 2010 17:53:45 +0200 Subject: No ticket. Code cleanup: remove deprecated StopFlying button from the Move Floater. It uses separate button from Stand/Stop Flying panel --HG-- branch : product-engine --- indra/newview/llmoveview.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'indra/newview/llmoveview.cpp') diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp index ac4b98734b..1853b511be 100644 --- a/indra/newview/llmoveview.cpp +++ b/indra/newview/llmoveview.cpp @@ -77,7 +77,6 @@ LLFloaterMove::LLFloaterMove(const LLSD& key) mTurnRightButton(NULL), mMoveUpButton(NULL), mMoveDownButton(NULL), - mStopFlyingButton(NULL), mModeActionsPanel(NULL), mCurrentMode(MM_WALK) { @@ -113,8 +112,6 @@ BOOL LLFloaterMove::postBuild() mMoveDownButton->setHeldDownCallback(boost::bind(&LLFloaterMove::moveDown, this)); - mStopFlyingButton = getChild("stop_fly_btn"); - mModeActionsPanel = getChild("panel_modes"); LLButton* btn; @@ -127,11 +124,6 @@ BOOL LLFloaterMove::postBuild() btn = getChild("mode_fly_btn"); btn->setCommitCallback(boost::bind(&LLFloaterMove::onFlyButtonClick, this)); - btn = getChild("stop_fly_btn"); - btn->setCommitCallback(boost::bind(&LLFloaterMove::onStopFlyingButtonClick, this)); - - - showFlyControls(false); initModeTooltips(); @@ -305,10 +297,6 @@ void LLFloaterMove::onFlyButtonClick() { setMovementMode(MM_FLY); } -void LLFloaterMove::onStopFlyingButtonClick() -{ - setMovementMode(gAgent.getAlwaysRun() ? MM_RUN : MM_WALK); -} void LLFloaterMove::setMovementMode(const EMovementMode mode) { @@ -361,10 +349,6 @@ void LLFloaterMove::showFlyControls(bool bShow) { mMoveUpButton->setVisible(bShow); mMoveDownButton->setVisible(bShow); - - // *TODO: mantipov: mStopFlyingButton from the FloaterMove is not used now. - // It was not completly removed until functionality is reviewed by LL - mStopFlyingButton->setVisible(FALSE); } void LLFloaterMove::initModeTooltips() -- cgit v1.2.3