From caa00482619b50e3d43c2b027184130bf0152c41 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 8 Nov 2008 19:04:16 -0600 Subject: Added commit callback for Quick Filter. --- ChangeLog.txt | 6 ++++++ linden/indra/newview/llinventoryview.cpp | 16 ++++++++++++++++ linden/indra/newview/llinventoryview.h | 3 +++ 3 files changed, 25 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 9b5bacc..c3f90bd 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,5 +1,11 @@ 2008-11-08 Jacek Antonelli + * linden/indra/newview/llinventoryview.cpp: + Added commit callback for Quick Filter. + * linden/indra/newview/llinventoryview.h: + Ditto. + + * linden/indra/newview/skins/default/xui/en-us/floater_inventory.xml: Added XUI for the Quick Filter combo box. diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index f9dd70d..edc1ca7 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp @@ -44,6 +44,7 @@ #include "llradiogroup.h" #include "llspinctrl.h" #include "lltextbox.h" +#include "llcombobox.h" #include "llui.h" #include "llfirstuse.h" @@ -549,6 +550,12 @@ void LLInventoryView::init(LLInventoryModel* inventory) mSearchEditor->setSearchCallback(onSearchEdit, this); } + mQuickFilterCombo = getChild("Quick Filter"); + if (mQuickFilterCombo) + { + mQuickFilterCombo->setCommitCallback(onQuickFilterCommit); + } + sActiveViews.put(this); gInventory.addObserver(this); @@ -981,6 +988,15 @@ void LLInventoryView::onSearchEdit(const std::string& search_string, void* user_ } +//static +void LLInventoryView::onQuickFilterCommit(LLUICtrl* ctrl, void* user_data) +{ + LLComboBox* quickfilter = (LLComboBox*)ctrl; + + llinfos << "Quick Filter: " << quickfilter->getSimple() << llendl; +} + + // static // BOOL LLInventoryView::incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward) // { diff --git a/linden/indra/newview/llinventoryview.h b/linden/indra/newview/llinventoryview.h index a37d370..ec621ec 100644 --- a/linden/indra/newview/llinventoryview.h +++ b/linden/indra/newview/llinventoryview.h @@ -58,6 +58,7 @@ class LLCheckBoxCtrl; class LLSpinCtrl; class LLScrollableContainerView; class LLTextBox; +class LLComboBox; class LLIconCtrl; class LLSaveFolderState; class LLSearchEditor; @@ -239,6 +240,7 @@ public: static void onFoldersByName(void *user_data); static BOOL checkFoldersByName(void *user_data); static void onSearchEdit(const std::string& search_string, void* user_data ); + static void onQuickFilterCommit(LLUICtrl* ctrl, void* user_data); static void onFilterSelected(void* userdata, bool from_click); static void onSelectionChange(const std::deque &items, BOOL user_action, void* data); @@ -259,6 +261,7 @@ protected: protected: LLSearchEditor* mSearchEditor; + LLComboBox* mQuickFilterCombo; LLTabContainer* mFilterTabs; LLHandle mFinderHandle; LLInventoryPanel* mActivePanel; -- cgit v1.1