From efca808b0c95aa2406960cb60a25ab90b14bde90 Mon Sep 17 00:00:00 2001
From: Richard Linden <none@none>
Date: Wed, 4 May 2011 18:04:09 -0700
Subject: [PATCH] EXP-584 FIXED View button on bottom bar is hidden when
 launching Basic Viewer with Voice options added back in corrected order in
 which buttons are collapsed so that they collapse right to left

---
 indra/newview/llbottomtray.cpp                | 16 ++++++-
 indra/newview/llbottomtray.h                  | 42 +++++++++++--------
 .../skins/minimal/xui/en/panel_bottomtray.xml |  8 ++--
 3 files changed, 44 insertions(+), 22 deletions(-)

diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp
index 0371b7be713..0c34261f747 100644
--- a/indra/newview/llbottomtray.cpp
+++ b/indra/newview/llbottomtray.cpp
@@ -218,7 +218,7 @@ LLBottomTray::LLBottomTray(const LLSD&)
 	mLandingTab(NULL),
 	mCheckForDrag(false)
 {
-	// Firstly add ourself to IMSession observers, so we catch session events
+	// Firstly add our self to IMSession observers, so we catch session events
 	// before chiclets do that.
 	LLIMMgr::getInstance()->addSessionObserver(this);
 
@@ -1539,21 +1539,35 @@ void LLBottomTray::initResizeStateContainers()
 	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_DESTINATIONS, getChild<LLPanel>("destinations_panel")));
+	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_AVATARS, getChild<LLPanel>("avatar_panel")));
 	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, getChild<LLPanel>("snapshot_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")));
 	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_MINI_MAP, getChild<LLPanel>("mini_map_btn_panel")));
+	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPLITTER_1, getChild<LLPanel>("splitter_panel_1")));
+	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_PEOPLE, getChild<LLPanel>("people_panel")));
+	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_PROFILE, getChild<LLPanel>("profile_panel")));
+	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SPLITTER_2, getChild<LLPanel>("splitter_panel_2")));
+	mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_HOWTO, getChild<LLPanel>("howto_panel")));
 
 	// init an order of processed buttons
 	mButtonsProcessOrder.push_back(RS_BUTTON_GESTURES);
 	mButtonsProcessOrder.push_back(RS_BUTTON_MOVEMENT);
 	mButtonsProcessOrder.push_back(RS_BUTTON_CAMERA);
+	mButtonsProcessOrder.push_back(RS_BUTTON_DESTINATIONS);
+	mButtonsProcessOrder.push_back(RS_BUTTON_AVATARS);
 	mButtonsProcessOrder.push_back(RS_BUTTON_SNAPSHOT);
 	mButtonsProcessOrder.push_back(RS_BUTTON_BUILD);
 	mButtonsProcessOrder.push_back(RS_BUTTON_SEARCH);
 	mButtonsProcessOrder.push_back(RS_BUTTON_WORLD_MAP);
 	mButtonsProcessOrder.push_back(RS_BUTTON_MINI_MAP);
+	mButtonsProcessOrder.push_back(RS_BUTTON_SPLITTER_1);
+	mButtonsProcessOrder.push_back(RS_BUTTON_PEOPLE);
+	mButtonsProcessOrder.push_back(RS_BUTTON_PROFILE);
+	mButtonsProcessOrder.push_back(RS_BUTTON_SPLITTER_2);
+	mButtonsProcessOrder.push_back(RS_BUTTON_HOWTO);
 
 	mButtonsOrder.push_back(RS_BUTTON_SPEAK);
 	mButtonsOrder.insert(mButtonsOrder.end(), mButtonsProcessOrder.begin(), mButtonsProcessOrder.end());
diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h
index 04e5f5e9e07..da7f0772a96 100644
--- a/indra/newview/llbottomtray.h
+++ b/indra/newview/llbottomtray.h
@@ -144,22 +144,29 @@ class LLBottomTray
 
 
 private:
-	typedef enum e_resize_status_type
+	typedef enum e_resize_state
 	{
-		  RS_NORESIZE			= 0x0000
-		, RS_CHICLET_PANEL		= 0x0001
-		, RS_CHATBAR_INPUT		= 0x0002
-		, RS_BUTTON_SNAPSHOT	= 0x0004
-		, RS_BUTTON_CAMERA		= 0x0008
-		, RS_BUTTON_MOVEMENT	= 0x0010
-		, RS_BUTTON_GESTURES	= 0x0020
-		, RS_BUTTON_SPEAK		= 0x0040
-		, RS_IM_WELL			= 0x0080
-		, RS_NOTIFICATION_WELL	= 0x0100
-		, RS_BUTTON_BUILD		= 0x0200
-		, RS_BUTTON_SEARCH		= 0x0400
-		, RS_BUTTON_WORLD_MAP	= 0x0800
-		, RS_BUTTON_MINI_MAP	= 0x1000
+		RS_NORESIZE				= 0x0000,
+		RS_CHICLET_PANEL		= 0x0001,
+		RS_CHATBAR_INPUT		= 0x0002,
+		RS_BUTTON_SNAPSHOT		= 0x0004,
+		RS_BUTTON_CAMERA		= 0x0008,
+		RS_BUTTON_MOVEMENT		= 0x0010,
+		RS_BUTTON_GESTURES		= 0x0020,
+		RS_BUTTON_SPEAK			= 0x0040,
+		RS_IM_WELL				= 0x0080,
+		RS_NOTIFICATION_WELL	= 0x0100,
+		RS_BUTTON_BUILD			= 0x0200,
+		RS_BUTTON_SEARCH		= 0x0400,
+		RS_BUTTON_WORLD_MAP		= 0x0800,
+		RS_BUTTON_MINI_MAP		= 0x1000,
+		RS_BUTTON_DESTINATIONS	= 0x2000,
+		RS_BUTTON_AVATARS		= 0x4000,
+		RS_BUTTON_PEOPLE		= 0x8000,
+		RS_BUTTON_PROFILE		= 0x10000,
+		RS_BUTTON_HOWTO			= 0x20000,
+		RS_BUTTON_SPLITTER_1	= 0x40000,
+		RS_BUTTON_SPLITTER_2	= 0x80000,
 
 		/*
 		Once new button that can be hidden on resize is added don't forget to update related places:
@@ -170,10 +177,11 @@ class LLBottomTray
 		/**
 		 * Specifies buttons which can be hidden when bottom tray is shrunk.
 		 * They are: Gestures, Movement (Move), Camera (View), Snapshot
-		 *		new: Build, Search, Map, World Map, Mini-Map.
+		 *		new: Build, Search, Map, World Map, Mini-Map, destinations, avatars
 		 */
-		, RS_BUTTONS_CAN_BE_HIDDEN = RS_BUTTON_SNAPSHOT | RS_BUTTON_CAMERA | RS_BUTTON_MOVEMENT | RS_BUTTON_GESTURES
+		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_DESTINATIONS | RS_BUTTON_AVATARS
 	}EResizeState;
 
 	// Below are three methods that were introduced to handle drag'n'drop
diff --git a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml
index a250f95e4fb..afd20187c65 100644
--- a/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml
+++ b/indra/newview/skins/minimal/xui/en/panel_bottomtray.xml
@@ -129,7 +129,7 @@
          height="28"
          layout="topleft"
          min_width="17"
-         name="splitter_panel"
+         name="splitter_panel_1"
          user_resize="false"
          width="17">
 			<icon
@@ -149,7 +149,7 @@
 		  min_height="28"
 		  min_width="83"
 		  mouse_opaque="false"
-		  name="avatar_and_destinations_panel"
+		  name="destinations_panel"
 		  user_resize="false"
 		  width="103">
 			<bottomtray_button
@@ -180,7 +180,7 @@
 		  min_height="28"
 		  min_width="73"
 		  mouse_opaque="false"
-		  name="avatar_and_destinations_panel"
+		  name="avatar_panel"
 		  user_resize="false"
 		  width="103">
 			<bottomtray_button
@@ -208,7 +208,7 @@
 		  height="28"
 		  layout="topleft"
 		  min_width="17"
-		  name="splitter_panel"
+		  name="splitter_panel_2"
 		  user_resize="false"
 		  width="17">
 			<icon
-- 
GitLab