Added collapse all button to inventory window.

This commit is contained in:
TighMacFanatic
2011-10-06 12:55:30 -04:00
parent 4358e7d827
commit 76eacbdc43
3 changed files with 21 additions and 3 deletions

View File

@@ -588,6 +588,7 @@ BOOL LLInventoryView::postBuild()
childSetAction("Inventory.ResetAll",onResetAll,this);
childSetAction("Inventory.ExpandAll",onExpandAll,this);
childSetAction("collapse_btn", onCollapseAll, this);
//panel->getFilter()->markDefault();
return TRUE;
@@ -1354,6 +1355,19 @@ void LLInventoryView::onExpandAll(void* userdata)
}
//static
void LLInventoryView::onCollapseAll(void* userdata)
{
LLInventoryView* self = (LLInventoryView*) userdata;
self->mActivePanel = (LLInventoryPanel*)self->childGetVisibleTab("inventory filter tabs");
if (!self->mActivePanel)
{
return;
}
self->mActivePanel->closeAllFolders();
}
//static
void LLInventoryView::onFilterSelected(void* userdata, bool from_click)
{

View File

@@ -282,6 +282,7 @@ public:
static void onFilterSelected(void* userdata, bool from_click);
static void onResetAll(void* userdata);
static void onExpandAll(void* userdata);
static void onCollapseAll(void* userdata);
static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data);
const std::string getFilterSubString() { return mActivePanel->getFilterSubString(); }

View File

@@ -5,8 +5,11 @@
title="Inventory" width="467">
<search_editor bottom="-50" follows="left|top|right" height="16" label="Type here to search"
left="6" mouse_opaque="true" name="inventory search editor" width="455" />
<text name="group_titles_textbox" font="SansSerifSmall" follows="left|top"
height="16" left="10" bottom_delta="-24" width="120">Quick Filter:</text>
<button left="10" bottom_delta="-24" height="20" width="25" follows="left|top" halign="center"
label="--" name="collapse_btn" mouse_opaque="true" font="SansSerif"
tool_tip="Collapse All" />
<text name="group_titles_textbox" font="SansSerifSmall" follows="left|top"
height="16" left_delta="35" bottom_delta="0" width="120">Quick Filter:</text>
<!-- Inventory Type Filter Labels -->
<string name="filter_type_all">All Types</string>
<string name="filter_type_animation">Animations</string>
@@ -21,7 +24,7 @@
<string name="filter_type_texture">Textures</string>
<string name="filter_type_snapshot">Snapshots</string>
<string name="filter_type_custom">Custom...</string>
<combo_box name="Quick Filter" label="Quick Filter" follows="left|top" height="20" left="80" width="150" bottom_delta="0">
<combo_box name="Quick Filter" label="Quick Filter" follows="left|top" height="20" left_delta="60" width="150" bottom_delta="0">
<combo_item name="filter_type_all">All Types</combo_item>
<separator />
<combo_item name="filter_type_animation">Animations</combo_item>