summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorymodel.cpp2
-rw-r--r--indra/newview/llinventorypanel.h21
-rw-r--r--indra/newview/llpanelmaininventory.cpp4
-rw-r--r--indra/newview/llviewerinventory.cpp3
4 files changed, 19 insertions, 11 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 326f2a5577..83a466a243 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1542,7 +1542,7 @@ void LLInventoryModel::bulkFetch(std::string url)
U32 folder_count=0;
U32 max_batch_size=5;
- U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1;
+ U32 sort_order = gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER) & 0x1;
LLSD body;
LLSD body_lib;
diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h
index 37b03dbd7d..928a458b84 100644
--- a/indra/newview/llinventorypanel.h
+++ b/indra/newview/llinventorypanel.h
@@ -65,10 +65,6 @@ class LLInventoryPanel : public LLPanel
// Data
//--------------------------------------------------------------------
public:
- static const std::string DEFAULT_SORT_ORDER;
- static const std::string RECENTITEMS_SORT_ORDER;
- static const std::string INHERIT_SORT_ORDER;
-
struct Filter : public LLInitParam::Block<Filter>
{
Optional<U32> sort_order;
@@ -142,8 +138,6 @@ public:
U32 getFilterPermMask() const { return mFolders->getFilterPermissions(); }
void setFilterSubString(const std::string& string);
const std::string getFilterSubString() { return mFolders->getFilterSubString(); }
- void setSortOrder(U32 order);
- U32 getSortOrder() { return mFolders->getSortOrder(); }
void setSinceLogoff(BOOL sl);
void setHoursAgo(U32 hours);
BOOL getSinceLogoff();
@@ -182,7 +176,6 @@ protected:
LLInventoryModel* mInventory;
LLInventoryObserver* mInventoryObserver;
BOOL mAllowMultiSelect;
- std::string mSortOrderSetting;
LLFolderView* mFolders;
LLScrollContainer* mScroller;
@@ -196,6 +189,20 @@ protected:
*/
const LLInventoryFVBridgeBuilder* mInvFVBridgeBuilder;
+
+ //--------------------------------------------------------------------
+ // Sorting
+ //--------------------------------------------------------------------
+public:
+ static const std::string DEFAULT_SORT_ORDER;
+ static const std::string RECENTITEMS_SORT_ORDER;
+ static const std::string INHERIT_SORT_ORDER;
+
+ void setSortOrder(U32 order);
+ U32 getSortOrder() const { return mFolders->getSortOrder(); }
+private:
+ std::string mSortOrderSetting;
+
//--------------------------------------------------------------------
// Hidden folders
//--------------------------------------------------------------------
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 50cfc7d177..421c9df9a1 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -117,7 +117,7 @@ LLPanelMainInventory::LLPanelMainInventory()
// Controls
// *TODO: Just use persistant settings for each of these
- U32 sort_order = gSavedSettings.getU32("InventorySortOrder");
+ U32 sort_order = gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER);
BOOL sort_by_name = ! ( sort_order & LLInventoryFilter::SO_DATE );
BOOL sort_folders_by_name = ( sort_order & LLInventoryFilter::SO_FOLDERS_BY_NAME );
BOOL sort_system_folders_to_top = ( sort_order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP );
@@ -145,7 +145,7 @@ BOOL LLPanelMainInventory::postBuild()
if (mActivePanel)
{
// "All Items" is the previous only view, so it gets the InventorySortOrder
- mActivePanel->setSortOrder(gSavedSettings.getU32("InventorySortOrder"));
+ mActivePanel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER));
mActivePanel->getFilter()->markDefault();
mActivePanel->getRootFolder()->applyFunctorRecursively(*mSavedFolderState);
mActivePanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mActivePanel, _1, _2));
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index f02e854db6..80336e5c5a 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -48,6 +48,7 @@
#include "llsidetray.h"
#include "llinventorybridge.h"
+#include "llinventorypanel.h"
#include "llfloaterinventory.h"
#include "llviewerassettype.h"
@@ -525,7 +526,7 @@ bool LLViewerInventoryCategory::fetchDescendents()
// 2 = folders by date
// Need to mask off anything but the first bit.
// This comes from LLInventoryFilter from llfolderview.h
- U32 sort_order = gSavedSettings.getU32("InventorySortOrder") & 0x1;
+ U32 sort_order = gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER) & 0x1;
// *NOTE: For bug EXT-2879, originally commented out
// gAgent.getRegion()->getCapability in order to use the old