diff options
| author | Merov Linden <merov@lindenlab.com> | 2013-01-15 14:27:01 -0800 | 
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2013-01-15 14:27:01 -0800 | 
| commit | 27a32d34baa20f54adc0719877f9ed89204c80ba (patch) | |
| tree | ae713b29a8af35e701670f7ef55b60d8bd786e05 | |
| parent | a49d3b14254fa5cfac3900e86b2287a016eaf9cc (diff) | |
| parent | 235a3477364c6747d7724a090ca61adbcbeac272 (diff) | |
Merge with lindenlab/viewer-chui
| -rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llfloaterimcontainer.h | 1 | ||||
| -rw-r--r-- | indra/newview/llfloaterimsession.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llfloaterimsession.h | 2 | 
4 files changed, 13 insertions, 2 deletions
| diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index f825e253d4..8264a90325 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -238,6 +238,9 @@ BOOL LLFloaterIMContainer::postBuild()  	// Init the sort order now that the root had been created  	setSortOrder(LLConversationSort(gSavedSettings.getU32("ConversationSortOrder"))); +	// Keep the xml set title around for when we have to overwrite it +	mGeneralTitle = getTitle(); +	  	mInitialized = true;  	// Add callbacks: @@ -502,10 +505,10 @@ void LLFloaterIMContainer::draw()  		collapseMessagesPane(true);  	} -	//Update moderator options visibility  	const LLConversationItem *current_session = getCurSelectedViewModelItem();  	if (current_session)  	{ +		// Update moderator options visibility  		LLFolderViewModelItemCommon::child_list_t::const_iterator current_participant_model = current_session->getChildrenBegin();  		LLFolderViewModelItemCommon::child_list_t::const_iterator end_participant_model = current_session->getChildrenEnd();  		while (current_participant_model != end_participant_model) @@ -515,6 +518,9 @@ void LLFloaterIMContainer::draw()  			current_participant_model++;  		} +		// Update floater's title as required by the currently selected session or use the default title +		LLFloaterIMSession * conversation_floaterp = LLFloaterIMSession::findInstance(current_session->getUUID()); +		setTitle(conversation_floaterp && conversation_floaterp->needsTitleOverwrite() ? conversation_floaterp->getTitle() : mGeneralTitle);  	}  	LLFloater::draw(); diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 85d950c58b..06af6c7b51 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -169,6 +169,7 @@ private:  	bool mInitialized;  	LLUUID mSelectedSession; +	std::string mGeneralTitle;  	// Conversation list implementation  public: diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index d36b138c21..a09dc1914f 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -70,6 +70,7 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id)  	mShouldSendTypingState(false),  	mMeTyping(false),  	mOtherTyping(false), +	mSessionNameUpdatedForTyping(false),  	mTypingTimer(),  	mTypingTimeoutTimer(),  	mPositioned(false), @@ -556,6 +557,7 @@ void LLFloaterIMSession::updateSessionName(const std::string& name)  		LLFloaterIMSessionTab::updateSessionName(name);  		mTypingStart.setArg("[NAME]", name);  		setTitle (mOtherTyping ? mTypingStart.getString() : name); +		mSessionNameUpdatedForTyping = mOtherTyping;  	}  } @@ -705,7 +707,7 @@ BOOL LLFloaterIMSession::getVisible()  		// getVisible() returns TRUE when Tabbed IM window is minimized.  			visible = is_active && !im_container->isMinimized()  						&& im_container->getVisible(); -	} +		}  	}  	else  	{ diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h index 6a2f4b29eb..2049cedfd7 100644 --- a/indra/newview/llfloaterimsession.h +++ b/indra/newview/llfloaterimsession.h @@ -132,6 +132,7 @@ public:  	static boost::signals2::connection setIMFloaterShowedCallback(const floater_showed_signal_t::slot_type& cb);  	static floater_showed_signal_t sIMFloaterShowedSignal; +	bool needsTitleOverwrite() { return mSessionNameUpdatedForTyping && mOtherTyping; }  private:  	/*virtual*/ void refresh(); @@ -182,6 +183,7 @@ private:  	bool mShouldSendTypingState;  	LLFrameTimer mTypingTimer;  	LLFrameTimer mTypingTimeoutTimer; +	bool mSessionNameUpdatedForTyping;  	bool mSessionInitialized;  	LLSD mQueuedMsgsForInit; | 
