diff options
| author | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-25 11:43:18 -0700 | 
|---|---|---|
| committer | Gilbert Gonzales <gilbert@lindenlab.com> | 2012-10-25 11:43:18 -0700 | 
| commit | 63548b973e6de392f2bf209b3405b1dde78bda03 (patch) | |
| tree | 2d8b97e395f5bb39a4b4e83108e8af319b77b9b7 | |
| parent | b77e2f17aa9755120032ee977d34e9e923cba0be (diff) | |
CHUI-449: Got rid of a function called setItemSelect(), I wrote this code and it doesn't have a purpose anymore since I can use setConvItemSelect() instead. Also now torn off, minimized conversations are selected when clicking a toast for that conversation. Resolution: Adjusted setConvItemSelect() to be less strict when trying to select an item, now as long as the function is called it will attempt to select the conversation line item.
| -rwxr-xr-x | indra/newview/llconversationview.cpp | 8 | ||||
| -rw-r--r-- | indra/newview/llimfloatercontainer.cpp | 27 | ||||
| -rw-r--r-- | indra/newview/llimfloatercontainer.h | 1 | 
3 files changed, 5 insertions, 31 deletions
| diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 92493194b8..de0c65e24f 100755 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -448,11 +448,9 @@ void LLConversationViewParticipant::selectItem()              // Store the active session              container->setSelectedSession(vmi->getUUID());          } -        //Focus the current conversation floater (it is already visible so just focus it) -        else -        { -            session_floater->setFocus(TRUE); -        } + +        //Redirect focus to the conversation floater +        session_floater->setFocus(TRUE);      }      LLFolderViewItem::selectItem(); diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 0538a286ce..ebb732b995 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -104,7 +104,7 @@ void LLIMFloaterContainer::sessionAdded(const LLUUID& session_id, const std::str  void LLIMFloaterContainer::sessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)  { -    setItemSelect(session_id); +    setConvItemSelect(session_id);  }  void LLIMFloaterContainer::sessionVoiceOrIMStarted(const LLUUID& session_id) @@ -1099,35 +1099,12 @@ void LLIMFloaterContainer::showConversation(const LLUUID& session_id)  void LLIMFloaterContainer::setConvItemSelect(const LLUUID& session_id)  {  	LLFolderViewItem* widget = mConversationsWidgets[session_id]; -	if (widget && mSelectedSession != session_id) +	if (widget)  	{ -		mSelectedSession = session_id;  		(widget->getRoot())->setSelection(widget, FALSE, FALSE);  	}  } -//Will select the conversation/participant item -void LLIMFloaterContainer::setItemSelect(const LLUUID& session_id) -{ - -    if(mConversationsRoot->getCurSelectedItem() && mConversationsRoot->getCurSelectedItem()->getParentFolder()) -    { -        //Retreive the conversation id. When a participant is selected, then have to to get the converation id from the parent. -        LLConversationItem* vmi = dynamic_cast<LLConversationItem*>(mConversationsRoot->getCurSelectedItem()->getParentFolder()->getViewModelItem()); - -        //Will allow selection/highlighting of the conversation/participant -        if(session_id != vmi->getUUID()) -        { -            mSelectedSession = session_id; -            LLFolderViewItem* widget = mConversationsWidgets[session_id]; -            (widget->getRoot())->setSelection(widget, FALSE, FALSE); - -			// Scroll to selected item -			mConversationsRoot->scrollToShowSelection(); -        } -    } -} -  void LLIMFloaterContainer::setTimeNow(const LLUUID& session_id, const LLUUID& participant_id)  { diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index b884ad5d4b..e69359321a 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -68,7 +68,6 @@ public:      void showConversation(const LLUUID& session_id);      void setConvItemSelect(const LLUUID& session_id); -    void setItemSelect(const LLUUID& session_id);  	/*virtual*/ void tabClose();  	static LLFloater* getCurrentVoiceFloater(); | 
