diff options
author | Mike Antipov <mantipov@productengine.com> | 2010-05-25 11:13:30 +0300 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2010-05-25 11:13:30 +0300 |
commit | 88820c843beb4a068eb6f34bda2b35d9f8869efe (patch) | |
tree | 5b2a19b9319034fe9a576a0168561b1f36a497ae | |
parent | fa9d0e4a6c04cc3d6c76588099ccc36c7bfdbdd5 (diff) |
EXT-7104 FIXED Removed bottom separator in the context menu over bottomtray buttons. Task implementation is already completed.
Also minor refactoring:
* updated removing of chatbar menu items
* removed useless instance members
Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/424/
--HG--
branch : product-engine
-rw-r--r-- | indra/newview/llbottomtray.cpp | 43 | ||||
-rw-r--r-- | indra/newview/llbottomtray.h | 4 |
2 files changed, 12 insertions, 35 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index caf43f5ddc..ae97460468 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -156,10 +156,6 @@ LLBottomTray::LLBottomTray(const LLSD&) , mMovementButton(NULL) , mResizeState(RS_NORESIZE) , mBottomTrayContextMenu(NULL) -, mMovementPanel(NULL) -, mCamPanel(NULL) -, mSnapshotPanel(NULL) -, mGesturePanel(NULL) , mCamButton(NULL) , mBottomTrayLite(NULL) , mIsInLiteMode(false) @@ -421,22 +417,12 @@ void LLBottomTray::updateContextMenu(S32 x, S32 y, MASK mask) bool in_edit_box = edit_box->pointInView(local_x, local_y); - LLMenuItemGL* menu_item; - menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Cut"); - if(menu_item) - menu_item->setVisible(in_edit_box); - menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Copy"); - if(menu_item) - menu_item->setVisible(in_edit_box); - menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Paste"); - if(menu_item) - menu_item->setVisible(in_edit_box); - menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Delete"); - if(menu_item) - menu_item->setVisible(in_edit_box); - menu_item = mBottomTrayContextMenu->findChild<LLMenuItemGL>("NearbyChatBar_Select_All"); - if(menu_item) - menu_item->setVisible(in_edit_box); + mBottomTrayContextMenu->setItemVisible("Separator", in_edit_box); + mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Cut", in_edit_box); + mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Copy", in_edit_box); + mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Paste", in_edit_box); + mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Delete", in_edit_box); + mBottomTrayContextMenu->setItemVisible("NearbyChatBar_Select_All", in_edit_box); } void LLBottomTray::showGestureButton(BOOL visible) @@ -483,12 +469,8 @@ BOOL LLBottomTray::postBuild() mNearbyChatBar = getChild<LLNearbyChatBar>("chat_bar"); mToolbarStack = getChild<LLLayoutStack>("toolbar_stack"); - mMovementPanel = getChild<LLPanel>("movement_panel"); - mMovementButton = mMovementPanel->getChild<LLButton>("movement_btn"); - mGesturePanel = getChild<LLPanel>("gesture_panel"); - mCamPanel = getChild<LLPanel>("cam_panel"); - mCamButton = mCamPanel->getChild<LLButton>("camera_btn"); - mSnapshotPanel = getChild<LLPanel>("snapshot_panel"); + mMovementButton = getChild<LLButton>("movement_btn"); + mCamButton = getChild<LLButton>("camera_btn"); setRightMouseDownCallback(boost::bind(&LLBottomTray::showBottomTrayContextMenu,this, _2, _3,_4)); mSpeakPanel = getChild<LLPanel>("speak_panel"); @@ -1177,12 +1159,11 @@ bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const void LLBottomTray::initResizeStateContainers() { - // *TODO: get rid of mGesturePanel, mMovementPanel, mCamPanel, mSnapshotPanel instance members // init map with objects should be processed for each type - mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, mGesturePanel)); - mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, mMovementPanel)); - mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, mCamPanel)); - mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, mSnapshotPanel)); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_GESTURES, getChild<LLPanel>("gesture_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MOVEMENT, getChild<LLPanel>("movement_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, getChild<LLPanel>("cam_panel"))); + mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, getChild<LLPanel>("snapshot_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SIDEBAR, getChild<LLPanel>("sidebar_btn_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_BUILD, getChild<LLPanel>("build_btn_panel"))); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SEARCH, getChild<LLPanel>("search_btn_panel"))); diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 889dc42097..c0887df39a 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -385,10 +385,6 @@ protected: LLNearbyChatBar* mNearbyChatBar; LLLayoutStack* mToolbarStack; LLMenuGL* mBottomTrayContextMenu; - LLPanel* mMovementPanel; - LLPanel* mCamPanel; - LLPanel* mSnapshotPanel; - LLPanel* mGesturePanel; LLButton* mCamButton; LLButton* mMovementButton; LLBottomTrayLite* mBottomTrayLite; |