EXT-7516 FIXED Completely removed bottomtray's "Sidebar" button and related settings/functionality

Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/474/

--HG--
branch : product-engine
meow-7.2.2
Mike Antipov 2010-06-01 13:24:40 +03:00
parent 4cc5c7d2a4
commit 785abfcf41
7 changed files with 0 additions and 136 deletions

View File

@ -8294,17 +8294,6 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>ShowSidebarButton</key>
<map>
<key>Comment</key>
<string>Shows/hides Sidebar button in the bottom tray.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>ShowSnapshotButton</key>
<map>
<key>Comment</key>
@ -8847,17 +8836,6 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>SidebarWithButtonsVisibility</key>
<map>
<key>Comment</key>
<string>Sets visibility of sidebar with its tabs' buttons</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>SkinCurrent</key>
<map>
<key>Comment</key>

View File

@ -1170,7 +1170,6 @@ void LLBottomTray::initResizeStateContainers()
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")));
mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_WORLD_MAP, getChild<LLPanel>("world_map_btn_panel")));
@ -1181,7 +1180,6 @@ void LLBottomTray::initResizeStateContainers()
mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT);
mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA);
mButtonsProcessOrder.push_back(RS_BUTTON_SNAPSHOT);
mButtonsProcessOrder.push_back(RS_BUTTON_SIDEBAR);
mButtonsProcessOrder.push_back(RS_BUTTON_BUILD);
mButtonsProcessOrder.push_back(RS_BUTTON_SEARCH);
mButtonsProcessOrder.push_back(RS_BUTTON_WORLD_MAP);
@ -1217,7 +1215,6 @@ void LLBottomTray::initButtonsVisibility()
setVisibleAndFitWidths(RS_BUTTON_MOVEMENT, gSavedSettings.getBOOL("ShowMoveButton"));
setVisibleAndFitWidths(RS_BUTTON_CAMERA, gSavedSettings.getBOOL("ShowCameraButton"));
setVisibleAndFitWidths(RS_BUTTON_SNAPSHOT, gSavedSettings.getBOOL("ShowSnapshotButton"));
setVisibleAndFitWidths(RS_BUTTON_SIDEBAR, gSavedSettings.getBOOL("ShowSidebarButton"));
setVisibleAndFitWidths(RS_BUTTON_BUILD, gSavedSettings.getBOOL("ShowBuildButton"));
setVisibleAndFitWidths(RS_BUTTON_SEARCH, gSavedSettings.getBOOL("ShowSearchButton"));
setVisibleAndFitWidths(RS_BUTTON_WORLD_MAP, gSavedSettings.getBOOL("ShowWorldMapButton"));
@ -1230,7 +1227,6 @@ void LLBottomTray::setButtonsControlsAndListeners()
gSavedSettings.getControl("ShowMoveButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_MOVEMENT, _2));
gSavedSettings.getControl("ShowCameraButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_CAMERA, _2));
gSavedSettings.getControl("ShowSnapshotButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SNAPSHOT, _2));
gSavedSettings.getControl("ShowSidebarButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SIDEBAR, _2));
gSavedSettings.getControl("ShowBuildButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_BUILD, _2));
gSavedSettings.getControl("ShowSearchButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_SEARCH, _2));
gSavedSettings.getControl("ShowWorldMapButton")->getSignal()->connect(boost::bind(&LLBottomTray::toggleShowButton, RS_BUTTON_WORLD_MAP, _2));

View File

@ -124,7 +124,6 @@ private:
, RS_BUTTON_SEARCH = 0x0400
, RS_BUTTON_WORLD_MAP = 0x0800
, RS_BUTTON_MINI_MAP = 0x1000
, RS_BUTTON_SIDEBAR = 0x2000
/*
Once new button that can be hidden on resize is added don't forget to update related places:
@ -139,7 +138,6 @@ private:
*/
, RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES
| RS_BUTTON_BUILD | RS_BUTTON_SEARCH | RS_BUTTON_WORLD_MAP | RS_BUTTON_MINI_MAP
| RS_BUTTON_SIDEBAR
}EResizeState;
/**

View File

@ -66,21 +66,6 @@ static const std::string TAB_PANEL_CAPTION_TITLE_BOX = "sidetray_tab_title";
LLSideTray* LLSideTray::sInstance = 0;
/**
* Updates visibility of sidetray tabs buttons according to "SidebarWithButtonsVisibility" setting
*
* @param force_set_visible if true method ignores setting value and set buttons visible.
*/
static void update_tabs_buttons_visibility(bool force_set_visible = false)
{
LLView* side_bar_tabs = gViewerWindow->getRootView()->getChildView("side_bar_tabs");
if (side_bar_tabs)
{
BOOL visible = LLUI::sSettingGroups["config"]->getBOOL("SidebarWithButtonsVisibility");
side_bar_tabs->setVisible(force_set_visible || visible);
}
}
LLSideTray* LLSideTray::getInstance()
{
if (!sInstance)
@ -273,8 +258,6 @@ LLSideTray::LLSideTray(Params& params)
p.name = "buttons_panel";
p.mouse_opaque = false;
mButtonsPanel = LLUICtrlFactory::create<LLPanel>(p);
initControlSettings();
}
@ -563,8 +546,6 @@ void LLSideTray::collapseSideBar()
//mActiveTab->setVisible(FALSE);
reflectCollapseChange();
setFocus( FALSE );
update_tabs_buttons_visibility();
}
void LLSideTray::expandSideBar()
@ -589,8 +570,6 @@ void LLSideTray::expandSideBar()
LLButton* btn = btn_it->second;
btn->setImageOverlay( mActiveTab->mImageSelected );
}
update_tabs_buttons_visibility(true);
}
void LLSideTray::highlightFocused()
@ -658,8 +637,6 @@ LLPanel* LLSideTray::showPanel (const std::string& panel_name, const LLSD& para
panel->onOpen(params);
}
update_tabs_buttons_visibility(true);
return panel;
}
}
@ -751,35 +728,3 @@ void LLSideTray::updateSidetrayVisibility()
}
}
void LLSideTray::initControlSettings()
{
// set listeners to process runtime setting changes
LLUI::sSettingGroups["config"]->getControl("SidebarWithButtonsVisibility")->getSignal()->connect(boost::bind(&LLSideTray::toggleSidetrayAndTabButtonsVisibility, this, _2));
// update visibility according to current value
toggleSidetrayAndTabButtonsVisibility(LLUI::sSettingGroups["config"]->getBOOL("SidebarWithButtonsVisibility"));
}
// sidebar visibility is implemented via its expanding/collapsing
void LLSideTray::toggleSidetrayAndTabButtonsVisibility(const LLSD::Boolean& new_visibility)
{
// If new_visibility==FALSE it gets invisible but still can be expanded in other ways (Ctrl+I to see My Inventory)
// store collapsed state to restore it properly on next call
static bool was_collapsed = false;
if (!new_visibility && !mCollapsed)
{
collapseSideBar();
was_collapsed = true;
}
// should be visible: expand only if it was expanded when has been collapsed on previous call
else if (new_visibility && was_collapsed)
{
if (mCollapsed) expandSideBar();
was_collapsed = false;
}
update_tabs_buttons_visibility(new_visibility);
}

View File

@ -179,16 +179,6 @@ private:
LLSideTray::getInstance()->setEnabled(FALSE);
}
/**
* Initializes listener of SidebarWithButtonsVisibility setting and updates state according to it.
*/
void initControlSettings();
/**
* Updates Sidebar and its Tab Buttons visibility according to passed value.
*/
void toggleSidetrayAndTabButtonsVisibility(const LLSD::Boolean& new_visibility);
private:
LLPanel* mButtonsPanel;

View File

@ -52,17 +52,6 @@
function="CheckControl"
parameter="ShowSnapshotButton" />
</menu_item_check>
<menu_item_check
label="Sidebar button"
layout="topleft"
name="ShowSidebarButton">
<menu_item_check.on_click
function="ToggleControl"
parameter="ShowSidebarButton" />
<menu_item_check.on_check
function="CheckControl"
parameter="ShowSidebarButton" />
</menu_item_check>
<menu_item_check
label="Build button"
layout="topleft"

View File

@ -214,38 +214,6 @@
parameter="snapshot" />
</button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"
height="28"
layout="topleft"
min_height="28"
min_width="52"
mouse_opaque="false"
name="sidebar_btn_panel"
user_resize="false"
width="83">
<!--*TODO: Implement toggle of sidebar with buttons
Disabled for now.
-->
<button
control_name="SidebarWithButtonsVisibility"
follows="left|right"
height="23"
image_pressed="PushButton_Press"
image_pressed_selected="PushButton_Selected_Press"
image_selected="PushButton_Selected_Press"
is_toggle="true"
label="Sidebar"
layout="topleft"
left="0"
name="sidebar_btn"
tool_tip="Shows/hides Sidebar"
top="5"
use_ellipses="true"
width="80">
</button>
</layout_panel>
<layout_panel
auto_resize="false"
follows="left|right"