From f8bde94b9f9c83202f32268b57539fbe5c7cf271 Mon Sep 17 00:00:00 2001
From: Igor Borovkov <iborovkov@productengine.com>
Date: Fri, 29 Jan 2010 15:41:41 +0200
Subject: [PATCH] completely got rid of Communicate floater and stuff

--HG--
branch : product-engine
---
 indra/newview/CMakeLists.txt         |  4 ----
 indra/newview/llgroupactions.cpp     |  3 ++-
 indra/newview/llimview.cpp           | 23 ++---------------------
 indra/newview/llimview.h             | 13 ++-----------
 indra/newview/llinventorypanel.cpp   |  4 +++-
 indra/newview/llviewerfloaterreg.cpp |  3 +--
 indra/newview/llviewermenu.cpp       |  1 -
 indra/newview/llviewerwindow.cpp     |  5 -----
 8 files changed, 10 insertions(+), 46 deletions(-)

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 3389ecbf4d0..1c32c690a83 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -156,13 +156,11 @@ set(viewer_SOURCE_FILES
     llfloaterbuycurrency.cpp
     llfloaterbuyland.cpp
     llfloatercamera.cpp
-    llfloaterchatterbox.cpp
     llfloatercolorpicker.cpp
     llfloatercustomize.cpp
     llfloaterdaycycle.cpp
     llfloaterenvsettings.cpp
     llfloaterfonttest.cpp
-    llfloaterfriends.cpp
     llfloatergesture.cpp
     llfloatergodtools.cpp
     llfloatergroupinvite.cpp
@@ -658,13 +656,11 @@ set(viewer_HEADER_FILES
     llfloaterbuycurrency.h
     llfloaterbuyland.h
     llfloatercamera.h
-    llfloaterchatterbox.h
     llfloatercolorpicker.h
     llfloatercustomize.h
     llfloaterdaycycle.h
     llfloaterenvsettings.h
     llfloaterfonttest.h
-    llfloaterfriends.h
     llfloatergesture.h
     llfloatergodtools.h
     llfloatergroupinvite.h
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index d6e2bb0445f..3653371d766 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -75,11 +75,12 @@ class LLGroupHandler : public LLCommandHandler
 			return false;
 		}
 
+		//*TODO by what to replace showing groups floater?
 		if (tokens[0].asString() == "list")
 		{
 			if (tokens[1].asString() == "show")
 			{
-				LLFloaterReg::showInstance("contacts", "groups");
+				//LLFloaterReg::showInstance("contacts", "groups");
 				return true;
 			}
             return false;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 213862df4ba..675f73d43e5 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -52,7 +52,6 @@
 #include "llbottomtray.h"
 #include "llcallingcard.h"
 #include "llchat.h"
-#include "llfloaterchatterbox.h"
 #include "llimfloater.h"
 #include "llgroupiconctrl.h"
 #include "llmd5.h"
@@ -64,6 +63,7 @@
 #include "llnotificationsutil.h"
 #include "llnearbychat.h"
 #include "llspeakers.h" //for LLIMSpeakerMgr
+#include "lltextbox.h"
 #include "lltextutil.h"
 #include "llviewercontrol.h"
 #include "llviewerparcelmgr.h"
@@ -2075,8 +2075,7 @@ bool inviteUserResponse(const LLSD& notification, const LLSD& response)
 // Member Functions
 //
 
-LLIMMgr::LLIMMgr() :
-	mIMReceived(FALSE)
+LLIMMgr::LLIMMgr()
 {
 	mPendingInvitations = LLSD::emptyMap();
 	mPendingAgentListUpdates = LLSD::emptyMap();
@@ -2183,14 +2182,6 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess
 	}
 }
 
-void LLIMMgr::notifyNewIM()
-{
-	if(!LLFloaterReg::instanceVisible("communicate"))
-	{
-		mIMReceived = TRUE;
-	}
-}
-
 S32 LLIMMgr::getNumberOfUnreadIM()
 {
 	std::map<LLUUID, LLIMModel::LLIMSession*>::iterator it;
@@ -2217,16 +2208,6 @@ S32 LLIMMgr::getNumberOfUnreadParticipantMessages()
 	return num;
 }
 
-void LLIMMgr::clearNewIMNotification()
-{
-	mIMReceived = FALSE;
-}
-
-BOOL LLIMMgr::getIMReceived() const
-{
-	return mIMReceived;
-}
-
 void LLIMMgr::autoStartCallOnStartup(const LLUUID& session_id)
 {
 	LLIMModel::LLIMSession *session = LLIMModel::getInstance()->findIMSession(session_id);
diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h
index 17406025f21..b573490fa3c 100644
--- a/indra/newview/llimview.h
+++ b/indra/newview/llimview.h
@@ -39,8 +39,8 @@
 #include "lllogchat.h"
 #include "llvoicechannel.h"
 
-class LLFloaterChatterBox;
-class LLUUID;
+
+
 class LLFriendObserver;
 class LLCallDialogManager;	
 class LLIMSpeakerMgr;
@@ -360,15 +360,9 @@ class LLIMMgr : public LLSingleton<LLIMMgr>
 	void processIMTypingStart(const LLIMInfo* im_info);
 	void processIMTypingStop(const LLIMInfo* im_info);
 
-	void notifyNewIM();
-	void clearNewIMNotification();
-
 	// automatically start a call once the session has initialized
 	void autoStartCallOnStartup(const LLUUID& session_id);
 
-	// IM received that you haven't seen yet
-	BOOL getIMReceived() const;
-
 	// Calc number of all unread IMs
 	S32 getNumberOfUnreadIM();
 
@@ -446,9 +440,6 @@ class LLIMMgr : public LLSingleton<LLIMMgr>
 	typedef std::list <LLIMSessionObserver *> session_observers_list_t;
 	session_observers_list_t mSessionObservers;
 
-	// An IM has been received that you haven't seen yet.
-	BOOL mIMReceived;
-
 	LLSD mPendingInvitations;
 	LLSD mPendingAgentListUpdates;
 };
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index 7e71ac90b45..12a2c370d2f 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -759,7 +759,9 @@ bool LLInventoryPanel::beginIMSession()
 				S32 count = item_array.count();
 				if(count > 0)
 				{
-					LLFloaterReg::showInstance("communicate");
+					//*TODO by what to replace that?
+					//LLFloaterReg::showInstance("communicate");
+
 					// create the session
 					LLAvatarTracker& at = LLAvatarTracker::instance();
 					LLUUID id;
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index f93d78bf338..658d1c9ddd4 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -54,7 +54,6 @@
 #include "llfloaterbulkpermission.h"
 #include "llfloaterbump.h"
 #include "llfloatercamera.h"
-#include "llfloaterchatterbox.h"
 #include "llfloaterdaycycle.h"
 #include "llfloatersearch.h"
 #include "llfloaterenvsettings.h"
@@ -153,7 +152,7 @@ void LLViewerFloaterReg::registerFloaters()
 	LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>);
 	//LLFloaterReg::add("chat", "floater_chat_history.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChat>);
 	LLFloaterReg::add("nearby_chat", "floater_nearby_chat.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLNearbyChat>);
-	LLFloaterReg::add("communicate", "floater_chatterbox.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChatterBox>);
+
 	LLFloaterReg::add("compile_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCompileQueue>);
 
 	LLFloaterReg::add("env_day_cycle", "floater_day_cycle_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDayCycle>);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 12e2fa51569..f7f30a51365 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -53,7 +53,6 @@
 #include "llfloaterbuycontents.h"
 #include "llfloaterbuycurrency.h"
 #include "llfloatercustomize.h"
-#include "llfloaterchatterbox.h"
 #include "llfloatergodtools.h"
 #include "llfloaterinventory.h"
 #include "llfloaterland.h"
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 03cc6e1262e..c70b8307822 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -101,7 +101,6 @@
 #include "llfloaterbuildoptions.h"
 #include "llfloaterbuyland.h"
 #include "llfloatercamera.h"
-#include "llfloaterchatterbox.h"
 #include "llfloatercustomize.h"
 #include "llfloaterland.h"
 #include "llfloaterinspect.h"
@@ -1461,10 +1460,6 @@ void LLViewerWindow::initWorldUI()
 	bottom_tray_container->addChild(bottom_tray);
 	bottom_tray_container->setVisible(TRUE);
 
-	// Pre initialize instance communicate instance;
-	//  currently needs to happen before initializing chat or IM
-	LLFloaterReg::getInstance("communicate");
-
 	LLRect morph_view_rect = full_window;
 	morph_view_rect.stretch( -STATUS_BAR_HEIGHT );
 	morph_view_rect.mTop = full_window.mTop - 32;
-- 
GitLab