diff options
| author | Merov Linden <merov@lindenlab.com> | 2013-05-02 16:36:02 -0700 | 
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2013-05-02 16:36:02 -0700 | 
| commit | cc7440d0853d269a5b955ab021db729ed5b6a92c (patch) | |
| tree | 12139acedc8bf22f95d4da0507ef84fb870590cd /indra | |
| parent | a73305c41d058fc755b824e5a9243afe43b424e1 (diff) | |
| parent | f849606399b902e71f4389ad1d7e0fc15f10d8b5 (diff) | |
Pull merge from viewer-fbc
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llpanelpeople.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llpersonfolderview.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llpersontabview.cpp | 36 | ||||
| -rw-r--r-- | indra/newview/llpersontabview.h | 1 | 
4 files changed, 46 insertions, 5 deletions
| diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 9daf441ab3..03135ce580 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -111,12 +111,11 @@ public:  					{  						mPanelPeople->connectToFacebook(query_map["code"]);  						mPanelPeople = NULL; -						return true;  					}  				} +				return true;  			}  		} -  		return false;  	}  }; @@ -1688,12 +1687,12 @@ void LLPanelPeople::showFacebookFriends(const LLSD& friends)  void LLPanelPeople::addTestParticipant()  {      std::string suffix("Aa"); -    std::string prefix("EastBayGuy"); +    std::string prefix("Test Name");  	for(int i = 0; i < 300; ++i)  	{  		LLPersonTabModel * person_folder_model = dynamic_cast<LLPersonTabModel *>(mPersonFolderView->mPersonFolderModelMap.begin()->second);          std::string name = prefix + " " + suffix; -		addParticipantToModel(person_folder_model, LLUUID().generateNewID(), name); +		addParticipantToModel(person_folder_model, gAgent.getID(), name);          // Next suffix : Aa, Ab, Ac ... Az, Ba, Bb, Bc ... Bz, Ca, Cb ...          suffix[1]+=1;          if (suffix[1]=='{') diff --git a/indra/newview/llpersonfolderview.cpp b/indra/newview/llpersonfolderview.cpp index 636d093e0e..ba1e9d20eb 100644 --- a/indra/newview/llpersonfolderview.cpp +++ b/indra/newview/llpersonfolderview.cpp @@ -64,7 +64,12 @@ BOOL LLPersonFolderView::handleMouseDown( S32 x, S32 y, MASK mask )  		}  	} -	return LLFolderView::handleMouseDown(x, y, mask); +	mKeyboardSelection = FALSE;  +	mSearchString.clear(); + +	LLEditMenuHandler::gEditMenuHandler = this; + +	return LLView::handleMouseDown( x, y, mask );  }  bool LLPersonFolderView::onConversationModelEvent(const LLSD &event) diff --git a/indra/newview/llpersontabview.cpp b/indra/newview/llpersontabview.cpp index 76f3151777..fdc024beb8 100644 --- a/indra/newview/llpersontabview.cpp +++ b/indra/newview/llpersontabview.cpp @@ -65,6 +65,7 @@ BOOL LLPersonTabView::handleMouseDown( S32 x, S32 y, MASK mask )  	if(selected_item)  	{ +		gFocusMgr.setKeyboardFocus( this );  		highlight = true;  	} @@ -204,6 +205,41 @@ void LLPersonView::onMouseLeave(S32 x, S32 y, MASK mask)  	LLFolderViewItem::onMouseLeave(x, y, mask);  } +BOOL LLPersonView::handleMouseDown( S32 x, S32 y, MASK mask) +{ +	if(!LLView::childrenHandleMouseDown(x, y, mask)) +	{ +		gFocusMgr.setMouseCapture( this ); +	} + +	if (!mIsSelected) +	{ +		if(mask & MASK_CONTROL) +		{ +			getRoot()->changeSelection(this, !mIsSelected); +		} +		else if (mask & MASK_SHIFT) +		{ +			getParentFolder()->extendSelectionTo(this); +		} +		else +		{ +			getRoot()->setSelection(this, FALSE); +		} +		make_ui_sound("UISndClick"); +	} +	else +	{ +		// If selected, we reserve the decision of deselecting/reselecting to the mouse up moment. +		// This is necessary so we maintain selection consistent when starting a drag. +		mSelectPending = TRUE; +	} + +	mDragStartX = x; +	mDragStartY = y; +	return TRUE; +} +  void LLPersonView::draw()  {  	static LLUIColor sFgColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", DEFAULT_WHITE); diff --git a/indra/newview/llpersontabview.h b/indra/newview/llpersontabview.h index 80020073d7..9cce615167 100644 --- a/indra/newview/llpersontabview.h +++ b/indra/newview/llpersontabview.h @@ -95,6 +95,7 @@ public:  	BOOL postBuild();  	void onMouseEnter(S32 x, S32 y, MASK mask);  	void onMouseLeave(S32 x, S32 y, MASK mask); +	BOOL handleMouseDown( S32 x, S32 y, MASK mask);  protected:	 | 
