diff options
| author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-18 13:17:06 -0700 | 
|---|---|---|
| committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-18 13:17:06 -0700 | 
| commit | 18e5fa5bbd2f78b4fa6eee8b72666fa9aeb2100e (patch) | |
| tree | 2b18b184a4f6ea28db14ff796fb41ec300d8acd9 | |
| parent | 2301c7cff60eca879f605a3ee3f26b960597d8c3 (diff) | |
| parent | c43cfcdcbd243410e2f780f58f93100e96fc996c (diff) | |
merging in latest changes
| -rwxr-xr-x | indra/newview/llavataractions.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llchathistory.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llchathistory.h | 2 | ||||
| -rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 33 | ||||
| -rw-r--r-- | indra/newview/llspeakers.cpp | 100 | 
5 files changed, 89 insertions, 62 deletions
| diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 3326103d03..7322b3bb0b 100755 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -296,10 +296,14 @@ void LLAvatarActions::startConference(const uuid_vec_t& ids, const LLUUID& float  	}  	const std::string title = LLTrans::getString("conference-title");  	LLUUID session_id = gIMMgr->addSession(title, IM_SESSION_CONFERENCE_START, ids[0], id_array, false, floater_id); -	if (session_id != LLUUID::null) + +	if (session_id == LLUUID::null)  	{ -		LLIMFloater::show(session_id); +		return;  	} +	 +	LLIMFloater::show(session_id); +	  	make_ui_sound("UISndStartIM");  } diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 3636f9e9d2..c61a8c8562 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -596,6 +596,14 @@ LLChatHistory::LLChatHistory(const LLChatHistory::Params& p)  	mEditor = LLUICtrlFactory::create<LLTextEditor>(editor_params, this);  } +LLSD LLChatHistory::getValue() const +{ +  LLSD* text=new LLSD();  +  text->assign(mEditor->getText()); +  return *text; +     +} +  LLChatHistory::~LLChatHistory()  {  	this->clear(); diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index 990c52f31b..bb6d4fb59c 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -103,7 +103,7 @@ class LLChatHistory : public LLUICtrl  	public:  		~LLChatHistory(); - +		LLSD getValue() const;     		void initFromParams(const Params&);  		/** diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 5d328bb283..c4eeccecbe 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -286,32 +286,21 @@ void LLIMFloaterContainer::onCloseFloater(LLUUID& id)  // virtual  void LLIMFloaterContainer::computeResizeLimits(S32& new_min_width, S32& new_min_height)  { -	bool is_left_pane_expanded = !mConversationsPane->isCollapsed(); -	bool is_right_pane_expanded = !mMessagesPane->isCollapsed(); - -	S32 conversations_pane_min_dim = mConversationsPane->getMinDim(); - -	if (is_right_pane_expanded) +	// possibly increase floater's minimum height according to children's minimums +	for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx)  	{ -		S32 conversations_pane_width = -				(is_left_pane_expanded ? gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") : conversations_pane_min_dim); - -		// possibly increase minimum size constraint due to children's minimums. -		for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) +		LLFloater* floaterp = dynamic_cast<LLFloater*>(mTabContainer->getPanelByIndex(tab_idx)); +		if (floaterp)  		{ -			LLFloater* floaterp = dynamic_cast<LLFloater*>(mTabContainer->getPanelByIndex(tab_idx)); -			if (floaterp) -			{ -				new_min_width = llmax(new_min_width, -						floaterp->getMinWidth() + conversations_pane_width + LLPANEL_BORDER_WIDTH * 2); -				new_min_height = llmax(new_min_height, floaterp->getMinHeight()); -			} +			new_min_height = llmax(new_min_height, floaterp->getMinHeight());  		}  	} -	else -	{ -		new_min_width = conversations_pane_min_dim; -	} + +	S32 conversations_pane_min_dim = mConversationsPane->getRelevantMinDim(); +	S32 messages_pane_min_dim = mMessagesPane->getRelevantMinDim(); + +	// set floater's minimum width according to relevant minimal children's dimensionals +	new_min_width = conversations_pane_min_dim + messages_pane_min_dim + LLPANEL_BORDER_WIDTH*2;  }  void LLIMFloaterContainer::onNewMessageReceived(const LLSD& data) diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 2d2b5202e0..64477765e1 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -256,6 +256,47 @@ bool LLSpeakersDelayActionsStorage::onTimerActionCallback(const LLUUID& speaker_  // +// ModerationResponder +// + +class ModerationResponder : public LLHTTPClient::Responder +{ +public: +	ModerationResponder(const LLUUID& session_id) +	{ +		mSessionID = session_id; +	} +	 +	virtual void error(U32 status, const std::string& reason) +	{ +		llwarns << status << ": " << reason << llendl; +		 +		if ( gIMMgr ) +		{ +			//403 == you're not a mod +			//should be disabled if you're not a moderator +			if ( 403 == status ) +			{ +				gIMMgr->showSessionEventError( +											  "mute", +											  "not_a_mod_error", +											  mSessionID); +			} +			else +			{ +				gIMMgr->showSessionEventError( +											  "mute", +											  "generic_request_error", +											  mSessionID); +			} +		} +	} +	 +private: +	LLUUID mSessionID; +}; + +//  // LLSpeakerMgr  // @@ -480,6 +521,28 @@ void LLSpeakerMgr::updateSpeakerList()  		}  	} +	else  +	{ +		// Check if the list is empty, except if it's Nearby Chat (session_id NULL). +		LLUUID session_id = getSessionID(); +		if ((mSpeakers.size() == 0) && (!session_id.isNull())) +		{ +			// If the list is empty, we update it with whatever was used to initiate the call so that it doesn't stay empty too long. +			// *TODO: Fix the server side code that sometimes forgets to send back the list of agents after a chat started  +			// (IOW, fix why we get no ChatterBoxSessionAgentListUpdates message after the initial ChatterBoxSessionStartReply) +			LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); +			for (uuid_vec_t::iterator it = session->mInitialTargetIDs.begin();it!=session->mInitialTargetIDs.end();++it) +			{ +				// We only add avatars that are on line +				if (LLAvatarTracker::instance().isBuddyOnline(*it)) +				{ +					setSpeaker(*it, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); +				} +			} +			// Also add the current agent +			setSpeaker(gAgentID, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT); +		} +	}  }  void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp) @@ -733,43 +796,6 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)  	}  } -class ModerationResponder : public LLHTTPClient::Responder -{ -public: -	ModerationResponder(const LLUUID& session_id) -	{ -		mSessionID = session_id; -	} - -	virtual void error(U32 status, const std::string& reason) -	{ -		llwarns << status << ": " << reason << llendl; - -		if ( gIMMgr ) -		{ -			//403 == you're not a mod -			//should be disabled if you're not a moderator -			if ( 403 == status ) -			{ -				gIMMgr->showSessionEventError( -					"mute", -					"not_a_mod_error", -					mSessionID); -			} -			else -			{ -				gIMMgr->showSessionEventError( -					"mute", -					"generic_request_error", -					mSessionID); -			} -		} -	} - -private: -	LLUUID mSessionID; -}; -  void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id)  {  	LLPointer<LLSpeaker> speakerp = findSpeaker(speaker_id); | 
