diff options
author | Ychebotarev ProductEngine <ychebotarev@productengine.com> | 2010-01-13 19:36:23 +0200 |
---|---|---|
committer | Ychebotarev ProductEngine <ychebotarev@productengine.com> | 2010-01-13 19:36:23 +0200 |
commit | 70de93ce10528595012a43aa9c68633069e5406e (patch) | |
tree | e71ac8ca5a66d727f1aceba2279f6b7661aef2ea /indra/newview | |
parent | 1219a439df265645700d8f2c1b7d9d93810b167b (diff) |
fix for normal EXT-4139 Group Abilities: No distinction between abilities and categories of ability
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelgrouproles.cpp | 61 | ||||
-rw-r--r-- | indra/newview/llpanelgrouproles.h | 13 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_group_roles.xml | 55 |
3 files changed, 77 insertions, 52 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, diff --git a/indra/newview/llpanelgrouproles.h b/indra/newview/llpanelgrouproles.h index bb3c9096cf..2f81900e60 100644 --- a/indra/newview/llpanelgrouproles.h +++ b/indra/newview/llpanelgrouproles.h @@ -108,7 +108,7 @@ public: virtual BOOL postBuild(); // This allows sub-tabs to collect child widgets from a higher level in the view hierarchy. - virtual BOOL postBuildSubTab(LLView* root) { return TRUE; } + virtual BOOL postBuildSubTab(LLView* root); virtual void setSearchFilter( const std::string& filter ); @@ -117,10 +117,15 @@ public: // Helper functions bool matchesActionSearchFilter(std::string action); + + + void setFooterEnabled(BOOL enable); + + virtual void setGroupID(const LLUUID& id); +protected: void 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, @@ -129,15 +134,11 @@ public: 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, BOOL is_owner_role); - void setFooterEnabled(BOOL enable); - - virtual void setGroupID(const LLUUID& id); protected: LLPanel* mHeader; LLPanel* mFooter; diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml index a5bab3232c..6b3fb04549 100644 --- a/indra/newview/skins/default/xui/en/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml @@ -210,6 +210,18 @@ including the Everyone and Owner Roles. Abilities allow Members in Roles to do specific things in this group. There's a broad variety of Abilities. </panel.string> + <panel.string + name="power_folder_icon"> + Inv_FolderClosed + </panel.string> + <panel.string + name="power_all_have_icon"> + Checkbox_On + </panel.string> + <panel.string + name="power_partial_icon"> + Checkbox_Off + </panel.string> <filter_editor layout="topleft" top="5" @@ -220,23 +232,32 @@ things in this group. There's a broad variety of Abilities. max_length="250" label="Filter Abilities" name="filter_input" /> - <scroll_list - column_padding="0" - draw_stripes="false" - follows="left|top" - height="200" - layout="topleft" - left="0" - multi_select="true" - name="action_list" - search_column="1" - tool_tip="Select an Ability to view more details" - top_pad="5" - width="300"> - <scroll_list.columns - name="action" - width="300" /> - </scroll_list> + + <scroll_list + column_padding="0" + draw_stripes="true" + height="200" + follows="left|top" + layout="topleft" + left="0" + name="action_list" + search_column="2" + tool_tip="Select an Ability to view more details" + top_pad="5" + width="300"> + <scroll_list.columns + label="" + name="icon" + width="2" /> + <scroll_list.columns + label="" + name="checkbox" + width="20" /> + <scroll_list.columns + label="" + name="action" + width="270" /> + </scroll_list> </panel> </tab_container> <panel |