diff options
-rw-r--r-- | indra/newview/llfloatermyenvironment.cpp | 16 | ||||
-rw-r--r-- | indra/newview/llfloatermyenvironment.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_my_environments.xml | 16 |
3 files changed, 34 insertions, 0 deletions
diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp index 8c2772a87d..af71329607 100644 --- a/indra/newview/llfloatermyenvironment.cpp +++ b/indra/newview/llfloatermyenvironment.cpp @@ -49,6 +49,7 @@ namespace const std::string CHECK_WATER("chk_water"); const std::string FLT_SEARCH("flt_search"); const std::string PANEL_SETTINGS("pnl_settings"); + const std::string CHECK_SHOWFOLDERS("chk_showfolders"); const std::string BUTTON_NEWSETTINGS("btn_gear"); const std::string BUTTON_GEAR("btn_newsettings"); const std::string BUTTON_DELETE("btn_del"); @@ -76,6 +77,7 @@ namespace LLFloaterMyEnvironment::LLFloaterMyEnvironment(const LLSD& key) : LLFloater(key), mInventoryList(nullptr), + mShowFolders(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS), mTypeFilter((0x01 << static_cast<U64>(LLSettingsType::ST_DAYCYCLE)) | (0x01 << static_cast<U64>(LLSettingsType::ST_SKY)) | (0x01 << static_cast<U64>(LLSettingsType::ST_WATER))), mSelectedAsset() { @@ -107,12 +109,14 @@ BOOL LLFloaterMyEnvironment::postBuild() mInventoryList->setFilterTypes(filter_types); mInventoryList->setSelectCallback([this](const std::deque<LLFolderViewItem*>&, BOOL) { onSelectionChange(); }); + mInventoryList->setShowFolderState(mShowFolders); mInventoryList->setFilterSettingsTypes(mTypeFilter); } childSetCommitCallback(CHECK_DAYS, [this](LLUICtrl*, void*) { onFilterCheckChange(); }, nullptr); childSetCommitCallback(CHECK_SKIES, [this](LLUICtrl*, void*) { onFilterCheckChange(); }, nullptr); childSetCommitCallback(CHECK_WATER, [this](LLUICtrl*, void*) { onFilterCheckChange(); }, nullptr); + childSetCommitCallback(CHECK_SHOWFOLDERS, [this](LLUICtrl*, void*) { onShowFoldersChange(); }, nullptr); mFilterEdit = getChild<LLFilterEditor>(FLT_SEARCH); mFilterEdit->setCommitCallback([this](LLUICtrl*, const LLSD& param){ onFilterEdit(param.asString()); }); @@ -124,6 +128,8 @@ BOOL LLFloaterMyEnvironment::postBuild() void LLFloaterMyEnvironment::refresh() { + getChild<LLCheckBoxCtrl>(CHECK_SHOWFOLDERS)->setValue(LLSD::Boolean(mShowFolders == LLInventoryFilter::SHOW_ALL_FOLDERS)); + getChild<LLCheckBoxCtrl>(CHECK_DAYS)->setValue(LLSD::Boolean(mTypeFilter & (0x01 << static_cast<U64>(LLSettingsType::ST_DAYCYCLE)))); getChild<LLCheckBoxCtrl>(CHECK_SKIES)->setValue(LLSD::Boolean(mTypeFilter & (0x01 << static_cast<U64>(LLSettingsType::ST_SKY)))); getChild<LLCheckBoxCtrl>(CHECK_WATER)->setValue(LLSD::Boolean(mTypeFilter & (0x01 << static_cast<U64>(LLSettingsType::ST_WATER)))); @@ -156,6 +162,16 @@ void LLFloaterMyEnvironment::onOpen(const LLSD& key) } //------------------------------------------------------------------------- +void LLFloaterMyEnvironment::onShowFoldersChange()
+{
+ bool show_check(getChild<LLCheckBoxCtrl>(CHECK_SHOWFOLDERS)->getValue().asBoolean());
+
+ mShowFolders = (show_check) ? LLInventoryFilter::SHOW_ALL_FOLDERS : LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS;
+
+ if (mInventoryList)
+ mInventoryList->setShowFolderState(mShowFolders);
+} + void LLFloaterMyEnvironment::onFilterCheckChange() { mTypeFilter = 0x0; diff --git a/indra/newview/llfloatermyenvironment.h b/indra/newview/llfloatermyenvironment.h index 67e35343da..fea0981590 100644 --- a/indra/newview/llfloatermyenvironment.h +++ b/indra/newview/llfloatermyenvironment.h @@ -52,9 +52,11 @@ private: LLInventoryPanel * mInventoryList; LLFilterEditor * mFilterEdit; U64 mTypeFilter; + LLInventoryFilter::EFolderShow mShowFolders; LLUUID mSelectedAsset; LLSaveFolderState mSavedFolderState; + void onShowFoldersChange(); void onFilterCheckChange(); void onFilterEdit(const std::string& search_string); void onSelectionChange(); diff --git a/indra/newview/skins/default/xui/en/floater_my_environments.xml b/indra/newview/skins/default/xui/en/floater_my_environments.xml index 7e65e5d69c..46894ded80 100644 --- a/indra/newview/skins/default/xui/en/floater_my_environments.xml +++ b/indra/newview/skins/default/xui/en/floater_my_environments.xml @@ -124,6 +124,22 @@ </layout_panel> <layout_panel auto_resize="false" + user_resize="false"
+ tab_group="1"
+ height="15">
+ <check_box
+ follows="left|bottom"
+ height="14"
+ initial_value="false"
+ label="Show All Folders"
+ layout="topleft"
+ name="chk_showfolders"
+ top="2"
+ left_delta="-1"
+ width="200" />
+ </layout_panel>
+ <layout_panel
+ auto_resize="false" tab_group="1" height="31" name="pnl_control" |