From 69a2843d5bfc3c5cb2706639eb3429369ded969b Mon Sep 17 00:00:00 2001
From: Sergey Borushevsky <sborushevsky@productengine.com>
Date: Wed, 2 Dec 2009 19:49:44 +0200
Subject: Implemented normal task EXT-2833 ("Close" button should hide bottom
 bar windows) When IM floater isn't torn off, "Close" button is disabled. It's
 not hidden, since there is a hack in LLFloater::updateButton.

--HG--
branch : product-engine
---
 indra/llui/llfloater.cpp      |  2 ++
 indra/llui/llfloater.h        |  2 ++
 indra/newview/llimfloater.cpp | 10 ++++++++++
 indra/newview/llimfloater.h   |  1 +
 4 files changed, 15 insertions(+)

diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 36a9e0a650..a63187678e 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1452,6 +1452,7 @@ void LLFloater::onClickTearOff(LLFloater* self)
 		gFloaterView->adjustToFitScreen(self, FALSE);
 		// give focus to new window to keep continuity for the user
 		self->setFocus(TRUE);
+		self->setTornOff(true);
 	}
 	else  //Attach to parent.
 	{
@@ -1463,6 +1464,7 @@ void LLFloater::onClickTearOff(LLFloater* self)
 			// make sure host is visible
 			new_host->openFloater(new_host->getKey());
 		}
+		self->setTornOff(false);
 	}
 }
 
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index d7ec0aac00..b5c835cb47 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -259,6 +259,8 @@ public:
 	bool            isDocked() const { return mDocked; }
 	virtual void    setDocked(bool docked, bool pop_on_undock = true);
 
+	virtual void    setTornOff(bool torn_off) {}
+
 	// Return a closeable floater, if any, given the current focus.
 	static LLFloater* getClosableFloaterFromFocus(); 
 
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 9b7df38c5e..9de0b1f827 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -419,6 +419,16 @@ void LLIMFloater::setDocked(bool docked, bool pop_on_undock)
 	}
 }
 
+void LLIMFloater::setTornOff(bool torn_off)
+{
+	// When IM Floater isn't torn off, "close" button should be hidden.
+	// This call will just disables it, since there is a hack in LLFloater::updateButton,
+	// which prevents hiding of close button in that case.
+	setCanClose(torn_off);
+
+	LLTransientDockableFloater::setTornOff(torn_off);
+}
+
 void LLIMFloater::setVisible(BOOL visible)
 {
 	LLNotificationsUI::LLScreenChannel* channel = dynamic_cast<LLNotificationsUI::LLScreenChannel*>
diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h
index 2c762c4d9a..f90bc35c34 100644
--- a/indra/newview/llimfloater.h
+++ b/indra/newview/llimfloater.h
@@ -63,6 +63,7 @@ public:
 	// LLFloater overrides
 	/*virtual*/ void onClose(bool app_quitting);
 	/*virtual*/ void setDocked(bool docked, bool pop_on_undock = true);
+	/*virtual*/ void setTornOff(bool torn_off);
 
 	// Make IM conversion visible and update the message history
 	static LLIMFloater* show(const LLUUID& session_id);
-- 
cgit v1.2.3


From 2b2178fe2535e27aadfaa94f70fce05b2f8d63ad Mon Sep 17 00:00:00 2001
From: Sergey Borushevsky <sborushevsky@productengine.com>
Date: Wed, 2 Dec 2009 19:52:28 +0200
Subject: Fix for normal task EXT-2640 (Create a tabbed IM multifloater)
 Minimize button is hidden. Removed redundant parameters.

--HG--
branch : product-engine
---
 indra/newview/skins/default/xui/en/floater_im_container.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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 cf6a4e45bd..cd297af99d 100644
--- a/indra/newview/skins/default/xui/en/floater_im_container.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_container.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <multi_floater
-background_visible="true"
-bg_color="yellow" 
+ can_minimize="false"
  can_resize="true"
  height="390"
  layout="topleft"
-- 
cgit v1.2.3