summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Linden <eli@lindenlab.com>2010-03-04 13:49:14 -0800
committerEli Linden <eli@lindenlab.com>2010-03-04 13:49:14 -0800
commit49bdfd7fbb6ad2d0c4dc1998d13ddf26bc69ceb7 (patch)
tree3f69e96b34e65f34cfae403f12daa351975db32a
parent4c342ea57c37f99f93d25c057feb034f2a980537 (diff)
parentf8916165f95606503b37eff7177674a57fe5d73e (diff)
Merge
-rw-r--r--indra/newview/app_settings/settings.xml2
-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
-rw-r--r--indra/newview/skins/default/xui/en/panel_main_inventory.xml1
6 files changed, 21 insertions, 12 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index f87cdbc43e..a64a1a395f 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5492,7 +5492,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <real>1.0</real>
+ <real>0.9</real>
</map>
<key>PlainTextChatHistory</key>
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
diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
index e6f67078d1..50983d2976 100644
--- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml
+++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml
@@ -415,6 +415,7 @@ halign="center"
layout="topleft"
left="0"
name="All Items"
+ sort_order_setting="InventorySortOrder"
top="16"
width="290" />
<inventory_panel