diff options
Diffstat (limited to 'indra/newview/llpanelgrouproles.cpp')
| -rw-r--r-- | indra/newview/llpanelgrouproles.cpp | 61 | 
1 files changed, 32 insertions, 29 deletions
| diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index 29b647415c..0e55ff3214 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -460,17 +460,8 @@ LLPanelGroupSubTab::~LLPanelGroupSubTab()  {  } -BOOL LLPanelGroupSubTab::postBuild() -{ -	// Hook up the search widgets. -	bool recurse = true; -	mSearchEditor = getChild<LLFilterEditor>("filter_input", recurse); - -	if (!mSearchEditor)  -		return FALSE; - -	mSearchEditor->setCommitCallback(boost::bind(&LLPanelGroupSubTab::setSearchFilter, this, _2)); -	 +BOOL LLPanelGroupSubTab::postBuildSubTab(LLView* root)  +{   	// Get icons for later use.  	mActionIcons.clear(); @@ -488,6 +479,19 @@ BOOL LLPanelGroupSubTab::postBuild()  	{  		mActionIcons["partial"] = getString("power_partial_icon");  	} +	return TRUE;  +} + +BOOL LLPanelGroupSubTab::postBuild() +{ +	// Hook up the search widgets. +	bool recurse = true; +	mSearchEditor = getChild<LLFilterEditor>("filter_input", recurse); + +	if (!mSearchEditor)  +		return FALSE; + +	mSearchEditor->setCommitCallback(boost::bind(&LLPanelGroupSubTab::setSearchFilter, this, _2));  	return LLPanelGroupTab::postBuild();  } @@ -567,7 +571,6 @@ bool LLPanelGroupSubTab::matchesActionSearchFilter(std::string action)  void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl,   										  U64 allowed_by_some,   										  U64 allowed_by_all, -										  icon_map_t& icons,  										  LLUICtrl::commit_callback_t commit_callback,  										  BOOL show_all,  										  BOOL filter, @@ -588,7 +591,6 @@ void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl,  							allowed_by_some,  							allowed_by_all,  							(*ras_it), -							icons,   							commit_callback,  							show_all,  							filter, @@ -600,7 +602,6 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,  											 U64 allowed_by_some,  											 U64 allowed_by_all,  											 LLRoleActionSet* action_set, -											 icon_map_t& icons,  											 LLUICtrl::commit_callback_t commit_callback,  											 BOOL show_all,  											 BOOL filter, @@ -614,26 +615,26 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,  		LLSD row;  		row["columns"][0]["column"] = "icon"; -		icon_map_t::iterator iter = icons.find("folder"); -		if (iter != icons.end()) +		row["columns"][0]["type"] = "icon"; +		 +		icon_map_t::iterator iter = mActionIcons.find("folder"); +		if (iter != mActionIcons.end())  		{ -			row["columns"][0]["type"] = "icon";  			row["columns"][0]["value"] = (*iter).second;  		}  		row["columns"][1]["column"] = "action"; +		row["columns"][1]["type"] = "text";  		row["columns"][1]["value"] = action_set->mActionSetData->mName;  		row["columns"][1]["font"]["name"] = "SANSSERIF_SMALL"; -		row["columns"][1]["font"]["style"] = "BOLD"; +		  		LLScrollListItem* title_row = ctrl->addElement(row, ADD_BOTTOM, action_set->mActionSetData); -		LLScrollListText* name_textp = dynamic_cast<LLScrollListText*>(title_row->getColumn(1)); +		LLScrollListText* name_textp = dynamic_cast<LLScrollListText*>(title_row->getColumn(2)); //?? I have no idea fix getColumn(1) return column spacer...  		if (name_textp)  			name_textp->setFontStyle(LLFontGL::BOLD); - -  		bool category_matches_filter = (filter) ? matchesActionSearchFilter(action_set->mActionSetData->mName) : true;  		std::vector<LLRoleAction*>::iterator ra_it = action_set->mActions.begin(); @@ -686,8 +687,8 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,  			{  				if (show_full_strength)  				{ -					icon_map_t::iterator iter = icons.find("full"); -					if (iter != icons.end()) +					icon_map_t::iterator iter = mActionIcons.find("full"); +					if (iter != mActionIcons.end())  					{  						row["columns"][column_index]["column"] = "checkbox";  						row["columns"][column_index]["type"] = "icon"; @@ -697,8 +698,8 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,  				}  				else  				{ -					icon_map_t::iterator iter = icons.find("partial"); -					if (iter != icons.end()) +					icon_map_t::iterator iter = mActionIcons.find("partial"); +					if (iter != mActionIcons.end())  					{  						row["columns"][column_index]["column"] = "checkbox";  						row["columns"][column_index]["type"] = "icon"; @@ -792,6 +793,8 @@ LLPanelGroupMembersSubTab::~LLPanelGroupMembersSubTab()  BOOL LLPanelGroupMembersSubTab::postBuildSubTab(LLView* root)  { +	LLPanelGroupSubTab::postBuildSubTab(root); +	  	// Upcast parent so we can ask it for sibling controls.  	LLPanelGroupRoles* parent = (LLPanelGroupRoles*) root; @@ -888,7 +891,6 @@ void LLPanelGroupMembersSubTab::handleMemberSelect()  	buildActionsList(mAllowedActionsList,  					 allowed_by_some,  					 allowed_by_all, -					 mActionIcons,  					 NULL,  					 FALSE,  					 FALSE, @@ -1211,7 +1213,6 @@ void LLPanelGroupMembersSubTab::handleRoleCheck(const LLUUID& role_id,  	buildActionsList(mAllowedActionsList,  					 powers_some_have,  					 powers_all_have, -					 mActionIcons,  					 NULL,  					 FALSE,  					 FALSE, @@ -1684,6 +1685,8 @@ LLPanelGroupRolesSubTab::~LLPanelGroupRolesSubTab()  BOOL LLPanelGroupRolesSubTab::postBuildSubTab(LLView* root)  { +	LLPanelGroupSubTab::postBuildSubTab(root); +  	// Upcast parent so we can ask it for sibling controls.  	LLPanelGroupRoles* parent = (LLPanelGroupRoles*) root; @@ -1994,7 +1997,6 @@ void LLPanelGroupRolesSubTab::handleRoleSelect()  		buildActionsList(mAllowedActionsList,  						 rd.mRolePowers,  						 0LL, -						 mActionIcons,  						 boost::bind(&LLPanelGroupRolesSubTab::handleActionCheck, this, _1, false),  						 TRUE,  						 FALSE, @@ -2381,6 +2383,8 @@ LLPanelGroupActionsSubTab::~LLPanelGroupActionsSubTab()  BOOL LLPanelGroupActionsSubTab::postBuildSubTab(LLView* root)  { +	LLPanelGroupSubTab::postBuildSubTab(root); +  	// Upcast parent so we can ask it for sibling controls.  	LLPanelGroupRoles* parent = (LLPanelGroupRoles*) root; @@ -2448,7 +2452,6 @@ void LLPanelGroupActionsSubTab::update(LLGroupChange gc)  	buildActionsList(mActionList,  					 GP_ALL_POWERS,  					 GP_ALL_POWERS, -					 mActionIcons,  					 NULL,  					 FALSE,  					 TRUE, | 
