From 8fa45941b6ce99c462f19628a17d4db2396286b9 Mon Sep 17 00:00:00 2001
From: leyla_linden <none@none>
Date: Fri, 30 Sep 2011 10:00:49 -0700
Subject: [PATCH] EXP-1264 Chat log shows as blank if closing viewer with chat
 log open and then opening chat floater on next login EXP-1271 Remove UI hints

---
 indra/llui/llfloater.h                  |  2 +-
 indra/newview/app_settings/settings.xml |  2 +-
 indra/newview/llnearbychatbar.cpp       | 17 ++++++++++++++---
 indra/newview/llnearbychatbar.h         |  4 ++++
 4 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index 58c2d342530..fba59e82e1e 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -293,7 +293,7 @@ friend class LLMultiFloater;
 protected:
 	virtual void    applySavedVariables();
 
-	void			applyRectControl();
+	virtual void	applyRectControl();
 	void			applyDockState();
 	void			storeRectControl();
 	void			storeVisibilityControl();
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 148b80e817c..1abea6c8839 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -3190,7 +3190,7 @@
       <key>Type</key>
       <string>Boolean</string>
       <key>Value</key>
-      <integer>1</integer>
+      <integer>0</integer>
     </map>
     <key>EnableVoiceChat</key>
     <map>
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 258aa9a8bf6..dbe30e18472 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -451,6 +451,16 @@ BOOL LLNearbyChatBar::postBuild()
 	return TRUE;
 }
 
+void LLNearbyChatBar::applyRectControl()
+{
+	LLFloater::applyRectControl();
+	if (getRect().getHeight() > getMinHeight())
+	{
+		getChildView("nearby_chat")->setVisible(true);
+		mExpandedHeight = getRect().getHeight();
+	}
+}
+
 void LLNearbyChatBar::onChatFontChange(LLFontGL* fontp)
 {
 	// Update things with the new font whohoo
@@ -690,14 +700,15 @@ void LLNearbyChatBar::onToggleNearbyChatPanel()
 
 	if (nearby_chat->getVisible())
 	{
+		mExpandedHeight = getRect().getHeight();
 		nearby_chat->setVisible(FALSE);
-		reshape(getRect().getWidth(), 60);
-		mResizeHandle[0]->setMaxHeight(60);
+		reshape(getRect().getWidth(), getMinHeight());
+		mResizeHandle[0]->setMaxHeight(getMinHeight());
 	}
 	else
 	{
 		nearby_chat->setVisible(TRUE);
-		reshape(getRect().getWidth(), 360);
+		reshape(getRect().getWidth(), mExpandedHeight);
 		mResizeHandle[0]->setMaxHeight(S32_MAX);
 	}
 }
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h
index 1d28a21ef3c..0415f12a0d0 100644
--- a/indra/newview/llnearbychatbar.h
+++ b/indra/newview/llnearbychatbar.h
@@ -127,6 +127,8 @@ class LLNearbyChatBar
 	void onChatBoxCommit();
 	void onChatFontChange(LLFontGL* fontp);
 
+	/* virtual */ void applyRectControl();
+
 	void onToggleNearbyChatPanel();
 
 	static LLWString stripChannelNumber(const LLWString &mesg, S32* channel);
@@ -140,6 +142,8 @@ class LLNearbyChatBar
 	LLLineEditor*		mChatBox;
 	LLOutputMonitorCtrl* mOutputMonitor;
 	LLLocalSpeakerMgr*  mSpeakerMgr;
+
+	S32 mExpandedHeight;
 };
 
 #endif
-- 
GitLab