From 30fbb126af61c72054b5794c0132c8223babb1f3 Mon Sep 17 00:00:00 2001
From: Dmitry Zaporozhan <dzaporozhan@productengine.com>
Date: Thu, 21 Jan 2010 13:52:05 +0200
Subject: [PATCH] Update for normal bug EXT-4297 - Voice Control Panel resizing
 behavior. Removed changes made in changeset 7982:97391caf89c3 (fixes
 EXT-4465(UI issue with scroll-bar in Voice Control panel)). It is not needed
 anymore because auto resizing was removed.

--HG--
branch : product-engine
---
 indra/newview/app_settings/settings.xml | 11 ------
 indra/newview/llcallfloater.cpp         | 48 +------------------------
 indra/newview/llcallfloater.h           | 15 --------
 3 files changed, 1 insertion(+), 73 deletions(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 8b66dcb2daf..9343246dc76 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1145,17 +1145,6 @@
       <key>Value</key>
       <integer>5</integer>
     </map>
-    <key>CallFloaterMaxItems</key>
-    <map>
-      <key>Comment</key>
-      <string>Max number of visible participants in voice controls window</string>
-      <key>Persist</key>
-      <integer>1</integer>
-      <key>Type</key>
-      <string>S32</string>
-      <key>Value</key>
-      <integer>5</integer>
-    </map>
     <key>CameraAngle</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp
index 5c4a02f0133..f346a4b8c2b 100644
--- a/indra/newview/llcallfloater.cpp
+++ b/indra/newview/llcallfloater.cpp
@@ -51,7 +51,6 @@
 #include "lltransientfloatermgr.h"
 #include "llviewerwindow.h"
 #include "llvoicechannel.h"
-#include "lllayoutstack.h"
 
 static void get_voice_participants_uuids(std::vector<LLUUID>& speakers_uuids);
 void reshape_floater(LLCallFloater* floater, S32 delta_height);
@@ -306,32 +305,7 @@ void LLCallFloater::updateSession()
 	
 	//hide "Leave Call" button for nearby chat
 	bool is_local_chat = mVoiceType == VC_LOCAL_CHAT;
-
-	LLPanel* leave_panel = findChild<LLPanel>("leave_call_btn_panel");
-	if (leave_panel)
-	{
-		S32 delta = 0;
-		bool visible = !is_local_chat;
-		if ((bool)leave_panel->getVisible() != visible)
-		{
-			delta = visible
-				? leave_panel->getRect().getHeight()
-				: -leave_panel->getRect().getHeight();
-		}
-		leave_panel->setVisible(visible);
-		if (delta)
-		{
-			LLLayoutStack* stack = getChild<LLLayoutStack>("my_call_stack");
-			BOOL animate = stack->getAnimate();
-			// Disable animation to prevent layout updating in several frames.
-			// We need this to get work reshapeToFitContent properly, otherwise
-			// the height of leave_call_btn_panel won't be completely included.
-			stack->setAnimate(FALSE);
-			reshape_floater(this, delta);
-			// Restore animate state.
-			stack->setAnimate(animate);
-		}
-	}
+	childSetVisible("leave_call_btn_panel", !is_local_chat);
 
 	refreshParticipantList();
 	updateAgentModeratorState();
@@ -814,24 +788,4 @@ void LLCallFloater::reset()
 	mSpeakerManager = NULL;
 }
 
-S32 LLCallFloater::getParticipantItemHeight()
-{
-	std::vector<LLPanel*> items;
-	mAvatarList->getItems(items);
-	if(items.size() > 0)
-	{
-		return items[0]->getRect().getHeight();
-	}
-	else
-	{
-		return getChild<LLPanel>("non_avatar_caller")->getRect().getHeight();
-	}
-}
-
-S32 LLCallFloater::getMaxVisibleItems()
-{
-	static LLCachedControl<S32> max_visible_items(*LLUI::sSettingGroups["config"],"CallFloaterMaxItems");
-	return max_visible_items;
-}
-
 //EOF
diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h
index 1d010839f1f..096594aaa20 100644
--- a/indra/newview/llcallfloater.h
+++ b/indra/newview/llcallfloater.h
@@ -216,21 +216,6 @@ class LLCallFloater : public LLTransientDockableFloater, LLVoiceClientParticipan
 	 */
 	void reset();
 
-	/**
-	* Reshapes floater to fit participant list height
-	*/
-	void reshapeToFitContent();
-
-	/**
-	* Returns height of participant list item
-	*/
-	S32 getParticipantItemHeight();
-
-	/**
-	* Returns predefined max visible participants.
-	*/
-	S32 getMaxVisibleItems();
-
 private:
 	speaker_state_map_t mSpeakerStateMap;
 	LLSpeakerMgr* mSpeakerManager;
-- 
GitLab