diff options
| -rw-r--r-- | indra/newview/llimfloater.cpp | 47 | ||||
| -rw-r--r-- | indra/newview/llimfloater.h | 3 | ||||
| -rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 4 | 
3 files changed, 20 insertions, 34 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 43adfdfd08..d11504d312 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -582,13 +582,14 @@ void LLIMFloater::onParticipantsListChanged(LLUICtrl* ctrl)  		build_names_string(temp_uuids, ui_title);  		updateSessionName(ui_title, ui_title);  	} -    } +} -//static -LLIMFloater* LLIMFloater::addToIMContainer(const LLUUID& session_id) +void LLIMFloater::addToHost(const LLUUID& session_id, const bool force)  { -	if (!gIMMgr->hasSession(session_id)) -		return NULL; +	if (!LLIMConversation::isChatMultiTab() || !gIMMgr->hasSession(session_id)) +	{ +		return; +	}  	// Test the existence of the floater before we try to create it  	bool exist = findInstance(session_id); @@ -612,19 +613,22 @@ LLIMFloater* LLIMFloater::addToIMContainer(const LLUUID& session_id)  			}  		} -		if (floater_container && floater_container->getVisible()) +		if (force)  		{ -			floater->openFloater(floater->getKey()); -			floater->setVisible(TRUE); -		} -		else -		{ -			floater->setVisible(FALSE); +			if (floater_container && floater_container->getVisible()) +			{ +				floater->openFloater(floater->getKey()); +				floater->setVisible(TRUE); +			} +			else +			{ +				floater->setVisible(FALSE); +			}  		}  	} -	return floater;  } +  //static  LLIMFloater* LLIMFloater::show(const LLUUID& session_id)  { @@ -1323,23 +1327,6 @@ void LLIMFloater::onIMChicletCreated( const LLUUID& session_id )  {  	LLIMFloater::addToHost(session_id);  } -void LLIMFloater::addToHost(const LLUUID& session_id) -	{ -	if (LLIMConversation::isChatMultiTab()) -{ -		LLIMFloaterContainer* im_box = LLIMFloaterContainer::findInstance(); -		if (!im_box) -	{ -			im_box = LLIMFloaterContainer::getInstance(); -	} - -		if (im_box && !LLIMFloater::findInstance(session_id)) -	{ -			LLIMFloater* new_tab = LLIMFloater::getInstance(session_id); -			im_box->addFloater(new_tab, FALSE, LLTabContainer::END); -	} -	} -}  boost::signals2::connection LLIMFloater::setIMFloaterShowedCallback(const floater_showed_signal_t::slot_type& cb)  { diff --git a/indra/newview/llimfloater.h b/indra/newview/llimfloater.h index e4a67a3d56..d444270716 100644 --- a/indra/newview/llimfloater.h +++ b/indra/newview/llimfloater.h @@ -71,14 +71,13 @@ public:  	static LLIMFloater* findInstance(const LLUUID& session_id);  	static LLIMFloater* getInstance(const LLUUID& session_id); -	static void addToHost(const LLUUID& session_id); +	static void addToHost(const LLUUID& session_id, const bool force = false);  	// LLFloater overrides  	/*virtual*/ void onClose(bool app_quitting);  	/*virtual*/ void setDocked(bool docked, bool pop_on_undock = true);  	// Make IM conversion visible and update the message history  	static LLIMFloater* show(const LLUUID& session_id); -	static LLIMFloater* addToIMContainer(const LLUUID& session_id);  	// Toggle panel specified by session_id  	// Returns true iff panel became visible diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index ffbdae305b..ca77f05545 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -86,13 +86,13 @@ LLIMFloaterContainer::~LLIMFloaterContainer()  void LLIMFloaterContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)  { -	LLIMFloater::addToIMContainer(session_id); +	LLIMFloater::addToHost(session_id, true);  	addConversationListItem(session_id);  }  void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id)  { -	LLIMFloater::addToIMContainer(session_id); +	LLIMFloater::addToHost(session_id, true);  	addConversationListItem(session_id);  }  | 
