From 2c2e8b83d02efcdec9ccd3216e64073b4e8e1d57 Mon Sep 17 00:00:00 2001
From: AlexanderP ProductEngine <apaschenko@productengine.com>
Date: Mon, 19 Nov 2012 19:26:00 +0200
Subject: [PATCH] CHUI-362 ADD. FIX (When the "Bring back" panel is there, it
 is not possible to collapse the right side of the conversation dialog: the
 toolbar is completely missing and the "<<" chevrons are not there): This was
 because the button "<<" belonged session's floater and not the container.
 Therefore, when all the floaters in the stack becomes invisible, their
 buttons also become invisible. Solution: Added additional button "<<" in the
 stub_panel of the container.

---
 indra/newview/llfloaterimcontainer.cpp          |  7 +++++++
 indra/newview/llfloaterimcontainer.h            |  2 ++
 .../default/xui/en/floater_im_container.xml     | 17 +++++++++++++++--
 3 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 90ddeef5bbb..39cd16acfa3 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -205,6 +205,8 @@ BOOL LLFloaterIMContainer::postBuild()
 
 	mExpandCollapseBtn = getChild<LLButton>("expand_collapse_btn");
 	mExpandCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onExpandCollapseButtonClicked, this));
+	mStubCollapseBtn = getChild<LLButton>("stub_collapse_btn");
+	mStubCollapseBtn->setClickedCallback(boost::bind(&LLFloaterIMContainer::onStubCollapseButtonClicked, this));
 
 	childSetAction("add_btn", boost::bind(&LLFloaterIMContainer::onAddButtonClicked, this));
 
@@ -335,6 +337,11 @@ void LLFloaterIMContainer::onNewMessageReceived(const LLSD& data)
 	}
 }
 
+void LLFloaterIMContainer::onStubCollapseButtonClicked()
+{
+	collapseMessagesPane(true);
+}
+
 void LLFloaterIMContainer::onExpandCollapseButtonClicked()
 {
 	if (mConversationsPane->isCollapsed() && mMessagesPane->isCollapsed()
diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h
index 9112b540187..9cd6b9bc5d0 100644
--- a/indra/newview/llfloaterimcontainer.h
+++ b/indra/newview/llfloaterimcontainer.h
@@ -109,6 +109,7 @@ class LLFloaterIMContainer
 	void onNewMessageReceived(const LLSD& data);
 
 	void onExpandCollapseButtonClicked();
+	void onStubCollapseButtonClicked();
 	void processParticipantsStyleUpdate();
 
 	void collapseConversationsPane(bool collapse);
@@ -147,6 +148,7 @@ class LLFloaterIMContainer
 	void openNearbyChat();
 
 	LLButton* mExpandCollapseBtn;
+	LLButton* mStubCollapseBtn;
 	LLPanel* mStubPanel;
 	LLTextBox* mStubTextBox;
 	LLLayoutPanel* mMessagesPane;
diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml
index 1388b9e4746..4aa7c883124 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -134,6 +134,19 @@
                left="0"
                height="430"
                width="412">
+                 <button
+                 follows="right|top"
+                 height="25"
+                 image_hover_unselected="Toolbar_Middle_Over"
+                 image_overlay="Conv_toolbar_collapse"
+                 image_selected="Toolbar_Middle_Selected"
+                 image_unselected="Toolbar_Middle_Off"
+                 layout="topleft"
+                 top="5"
+                 right="-10"
+                 name="stub_collapse_btn"
+                 tool_tip="Collapse this pane"
+                 width="31" />
                  <text
                    type="string"
                    clip_partial="false"
@@ -142,7 +155,7 @@
                    left="20"
                    right="-20"
                    name="stub_textbox_1"
-                   top="10"
+                   top="30"
                    height="20"
                    valign="center"
                    wrap="true">
@@ -156,7 +169,7 @@
                    left="20"
                    right="-20"
                    name="stub_textbox_2"
-                   top="40"
+                   top="60"
                    height="20"
                    valign="center"
                    parse_urls="true"
-- 
GitLab