diff options
| author | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-06-27 16:11:04 +0300 | 
|---|---|---|
| committer | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-06-27 16:11:04 +0300 | 
| commit | 3385a6398951bc94b3dc5da6224e285d85e606ab (patch) | |
| tree | 6df82be34df2bf61c9ade5a24bba14ba0256a99d | |
| parent | 0eda1f9a4d909870b15c6d7243e47838540598e8 (diff) | |
CHUI-162 FIXED Opening a nearby chat when text entered
| -rw-r--r-- | indra/newview/llnearbychat.cpp | 22 | ||||
| -rw-r--r-- | indra/newview/llnearbychat.h | 1 | 
2 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 369ca699c5..ee7169b1c3 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -131,6 +131,7 @@ LLNearbyChat::LLNearbyChat(const LLSD& key)  	mSpeakerMgr(NULL),  	mExpandedHeight(COLLAPSED_HEIGHT + EXPANDED_HEIGHT)  { +	setIsChrome(TRUE);  	mKey = LLSD();  	mIsNearbyChat = true;  	mSpeakerMgr = LLLocalSpeakerMgr::getInstance(); @@ -394,6 +395,26 @@ LLNearbyChat* LLNearbyChat::getInstance()  	return LLFloaterReg::getTypedInstance<LLNearbyChat>("chat_bar");  } +void LLNearbyChat::show() +{ +	// Get the floater +	LLNearbyChat* floater = LLNearbyChat::getInstance(); +	if (floater) +	{ +		if(isChatMultiTab()) +		{ +			LLIMFloaterContainer* floater_container = LLIMFloaterContainer::getInstance(); + +			// Add a conversation list item in the left pane: nothing will be done if already in there +			// but relevant clean up will be done to ensure consistency of the conversation list +			floater_container->addConversationListItem(floater->getTitle(), LLUUID(), floater); + +			floater->openFloater(floater->getKey()); +		} + +		floater->setVisible(TRUE); +	} +}  void LLNearbyChat::showHistory()  { @@ -773,6 +794,7 @@ void LLNearbyChat::startChat(const char* line)  	if (cb )  	{ +		cb->show();  		cb->setVisible(TRUE);  		cb->setFocus(TRUE);  		cb->mChatBox->setFocus(TRUE); diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index db367f0b59..61404df942 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -65,6 +65,7 @@ public:  	static LLNearbyChat* getInstance();  	void addToHost(); +	void show();  	/** @param archive true - to save a message to the chat history log */  	void	addMessage			(const LLChat& message,bool archive = true, const LLSD &args = LLSD());  | 
