diff options
| author | Richard Linden <none@none> | 2010-09-29 15:11:39 -0700 | 
|---|---|---|
| committer | Richard Linden <none@none> | 2010-09-29 15:11:39 -0700 | 
| commit | 2fd5b397ad886d7f8a8792382374cd8c678abc0d (patch) | |
| tree | 1965ae14b77ec838dc5e78e99dd5a8dca4464388 | |
| parent | 3bab3fc66183f124d173b4ec192c03a9205788d9 (diff) | |
turn off get more and view all options in gesture combo list
| -rw-r--r-- | indra/newview/llnearbychatbar.cpp | 30 | ||||
| -rw-r--r-- | indra/newview/llnearbychatbar.h | 4 | 
2 files changed, 23 insertions, 11 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 932ad75f29..836ae9a0cf 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -94,15 +94,19 @@ public:  LLGestureComboList::Params::Params()  :	combo_button("combo_button"), -	combo_list("combo_list") +	combo_list("combo_list"), +	get_more("get_more", true), +	view_all("view_all", true)  {  }  LLGestureComboList::LLGestureComboList(const LLGestureComboList::Params& p) -:	LLUICtrl(p) -	, mLabel(p.label) -	, mViewAllItemIndex(0) -	, mGetMoreItemIndex(0) +:	LLUICtrl(p), +	mLabel(p.label), +	mViewAllItemIndex(-1), +	mGetMoreItemIndex(-1), +	mShowViewAll(p.view_all), +	mShowGetMore(p.get_more)  {  	LLBottomtrayButton::Params button_params = p.combo_button;  	button_params.follows.flags(FOLLOWS_LEFT|FOLLOWS_BOTTOM|FOLLOWS_RIGHT); @@ -286,12 +290,16 @@ void LLGestureComboList::refreshGestures()  	sortByName();  	// store indices for Get More and View All items (idx is the index followed by the last added Gesture) -	mGetMoreItemIndex = idx; -	mViewAllItemIndex = idx + 1; - -	// add Get More and View All items at the bottom -	mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex)); -	mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex)); +	if (mShowGetMore) +	{ +		mGetMoreItemIndex = idx; +		mList->addSimpleElement(LLTrans::getString("GetMoreGestures"), ADD_BOTTOM, LLSD(mGetMoreItemIndex)); +	} +	if (mShowViewAll) +	{ +		mViewAllItemIndex = idx + 1; +		mList->addSimpleElement(LLTrans::getString("ViewAllGestures"), ADD_BOTTOM, LLSD(mViewAllItemIndex)); +	}  	// Insert label after sorting, at top, with separator below it  	mList->addSeparator(ADD_TOP);	 diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index cc905736fd..033d1dd5a2 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -46,6 +46,8 @@ public:  	{  		Optional<LLBottomtrayButton::Params>			combo_button;  		Optional<LLScrollListCtrl::Params>	combo_list; +		Optional<bool>						get_more, +											view_all;  		Params();  	}; @@ -56,6 +58,8 @@ protected:  	LLGestureComboList(const Params&);  	std::vector<LLMultiGesture*> mGestures;  	std::string mLabel; +	bool			mShowViewAll; +	bool			mShowGetMore;  	LLSD::Integer mViewAllItemIndex;  	LLSD::Integer mGetMoreItemIndex;  | 
