FIRE-18007: Chat in console not showing if floaters get minimized

Thu, 24 Mar 2016 01:53:55 +0100

author
Ansariel
date
Thu, 24 Mar 2016 01:53:55 +0100
changeset 48933
45a1ba4a9428
parent 48932
680ad57c187a
child 48934
c26d747aa223

FIRE-18007: Chat in console not showing if floaters get minimized

indra/newview/fsfloaterim.cpp file | annotate | diff | revisions
indra/newview/fsfloaterim.h file | annotate | diff | revisions
indra/newview/fsfloaterimcontainer.cpp file | annotate | diff | revisions
indra/newview/fsfloaterimcontainer.h file | annotate | diff | revisions
indra/newview/fsfloaternearbychat.cpp file | annotate | diff | revisions
indra/newview/fsfloaternearbychat.h file | annotate | diff | revisions
     1.1 --- a/indra/newview/fsfloaterim.cpp	Wed Mar 23 16:44:05 2016 +0100
     1.2 +++ b/indra/newview/fsfloaterim.cpp	Thu Mar 24 01:53:55 2016 +0100
     1.3 @@ -1239,6 +1239,13 @@
     1.4  	}
     1.5  }
     1.6  
     1.7 +void FSFloaterIM::setMinimized(BOOL b)
     1.8 +{
     1.9 +	handleMinimized(b);
    1.10 +
    1.11 +	LLTransientDockableFloater::setMinimized(b);
    1.12 +}
    1.13 +
    1.14  BOOL FSFloaterIM::getVisible()
    1.15  {
    1.16  	if(isChatMultiTab())
    1.17 @@ -2364,3 +2371,15 @@
    1.18  		session->mInitialInvitedIDs.clear();
    1.19  	}
    1.20  }
    1.21 +
    1.22 +void FSFloaterIM::handleMinimized(bool minimized)
    1.23 +{
    1.24 +	if (minimized)
    1.25 +	{
    1.26 +		gConsole->removeSession(mSessionID);
    1.27 +	}
    1.28 +	else
    1.29 +	{
    1.30 +		gConsole->addSession(mSessionID);
    1.31 +	}
    1.32 +}
     2.1 --- a/indra/newview/fsfloaterim.h	Wed Mar 23 16:44:05 2016 +0100
     2.2 +++ b/indra/newview/fsfloaterim.h	Thu Mar 24 01:53:55 2016 +0100
     2.3 @@ -69,6 +69,7 @@
     2.4  	/*virtual*/ BOOL getVisible();
     2.5  	// Check typing timeout timer.
     2.6  	/*virtual*/ void draw();
     2.7 +	/*virtual*/ void setMinimized(BOOL b);
     2.8  
     2.9  	// LLFloater overrides
    2.10  	/*virtual*/ void onClose(bool app_quitting);
    2.11 @@ -155,6 +156,8 @@
    2.12  
    2.13  	bool isP2PChat() const { return mIsP2PChat; }
    2.14  
    2.15 +	void handleMinimized(bool minimized);
    2.16 +
    2.17  protected:
    2.18  	/* virtual */
    2.19  	void	onClickCloseBtn(bool app_quitting = false);
     3.1 --- a/indra/newview/fsfloaterimcontainer.cpp	Wed Mar 23 16:44:05 2016 +0100
     3.2 +++ b/indra/newview/fsfloaterimcontainer.cpp	Thu Mar 24 01:53:55 2016 +0100
     3.3 @@ -362,6 +362,26 @@
     3.4  	}
     3.5  }
     3.6  
     3.7 +void FSFloaterIMContainer::setMinimized(BOOL b)
     3.8 +{
     3.9 +	if (mTabContainer)
    3.10 +	{
    3.11 +		FSFloaterNearbyChat* nearby_floater = dynamic_cast<FSFloaterNearbyChat*>(mTabContainer->getCurrentPanel());
    3.12 +		if (nearby_floater)
    3.13 +		{
    3.14 +			nearby_floater->handleMinimized(b);
    3.15 +		}
    3.16 +
    3.17 +		FSFloaterIM* im_floater = dynamic_cast<FSFloaterIM*>(mTabContainer->getCurrentPanel());
    3.18 +		if (im_floater)
    3.19 +		{
    3.20 +			im_floater->handleMinimized(b);
    3.21 +		}
    3.22 +	}
    3.23 +
    3.24 +	LLMultiFloater::setMinimized(b);
    3.25 +}
    3.26 +
    3.27  //virtual
    3.28  void FSFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg)
    3.29  {
     4.1 --- a/indra/newview/fsfloaterimcontainer.h	Wed Mar 23 16:44:05 2016 +0100
     4.2 +++ b/indra/newview/fsfloaterimcontainer.h	Thu Mar 24 01:53:55 2016 +0100
     4.3 @@ -59,7 +59,8 @@
     4.4  	static FSFloaterIMContainer* getInstance();
     4.5  
     4.6  	virtual void setVisible(BOOL b);
     4.7 -	
     4.8 +	/*virtual*/ void setMinimized(BOOL b);
     4.9 +
    4.10  	void onNewMessageReceived(const LLSD& data); // public so nearbychat can call it directly. TODO: handle via callback. -AO
    4.11  
    4.12  	virtual void sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg);
     5.1 --- a/indra/newview/fsfloaternearbychat.cpp	Wed Mar 23 16:44:05 2016 +0100
     5.2 +++ b/indra/newview/fsfloaternearbychat.cpp	Thu Mar 24 01:53:55 2016 +0100
     5.3 @@ -388,6 +388,13 @@
     5.4  	}
     5.5  }
     5.6  
     5.7 +void FSFloaterNearbyChat::setMinimized(BOOL b)
     5.8 +{
     5.9 +	handleMinimized(b);
    5.10 +
    5.11 +	LLFloater::setMinimized(b);
    5.12 +}
    5.13 +
    5.14  void FSFloaterNearbyChat::onOpen(const LLSD& key )
    5.15  {
    5.16  	FSFloaterIMContainer* floater_container = FSFloaterIMContainer::getInstance();
    5.17 @@ -906,3 +913,15 @@
    5.18  	bool show_muted = data.asBoolean();
    5.19  	updateUnreadMessageNotification((show_muted ? mUnreadMessagesMuted : mUnreadMessages), show_muted);
    5.20  }
    5.21 +
    5.22 +void FSFloaterNearbyChat::handleMinimized(bool minimized)
    5.23 +{
    5.24 +	if (minimized)
    5.25 +	{
    5.26 +		gConsole->removeSession(LLUUID::null);
    5.27 +	}
    5.28 +	else
    5.29 +	{
    5.30 +		gConsole->addSession(LLUUID::null);
    5.31 +	}
    5.32 +}
     6.1 --- a/indra/newview/fsfloaternearbychat.h	Wed Mar 23 16:44:05 2016 +0100
     6.2 +++ b/indra/newview/fsfloaternearbychat.h	Thu Mar 24 01:53:55 2016 +0100
     6.3 @@ -56,6 +56,7 @@
     6.4  
     6.5  	/*virtual*/ void onOpen(const LLSD& key);
     6.6  	/*virtual*/ void setVisible(BOOL visible);
     6.7 +	/*virtual*/ void setMinimized(BOOL b);
     6.8  
     6.9  	void	openFloater(const LLSD& key);
    6.10  
    6.11 @@ -97,6 +98,8 @@
    6.12  	void updateUnreadMessageNotification(S32 unread_messages, bool muted_history);
    6.13  	void updateShowMutedChatHistory(const LLSD &data);
    6.14  
    6.15 +	void handleMinimized(bool minimized);
    6.16 +
    6.17  protected:
    6.18  	void onChatBoxKeystroke();
    6.19  	void onChatBoxFocusLost();

mercurial