From 982aec721f7177c59ea411506f65241983cbcffc Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Mar 2010 14:18:38 -0500 Subject: EXT-5296 : Inventory folders revert to defort "sort" with each login Not my code, but ended up being a simple enough XML fix. Inventory sorting settings have changed in viewer2 from viewer1.23, this seems to be causing at least a couple of bugs. Fixed one, filing the other. --- indra/newview/skins/default/xui/en/panel_main_inventory.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') 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" /> Date: Thu, 4 Mar 2010 11:36:29 -0800 Subject: Fix for EXT-5935 Decrease PluginInstancesCPULimit default value from 1.0 to 0.9. --- indra/newview/app_settings/settings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') 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 @@ Type F32 Value - 1.0 + 0.9 PlainTextChatHistory -- cgit v1.2.3 From 2a60fdb1978de9dbe5b18ea3be9009ffc907eedd Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Mar 2010 15:29:49 -0500 Subject: EXT-5296 : Inventory folders revert to defort "sort" with each login Minor cleanup to start using DEFAULT_SORT_ORDER versus plain text "InventorySortOrder" in a few plaecs in the code. Makes this sorting code a lot easier to debug. --- indra/newview/llinventorymodel.cpp | 2 +- indra/newview/llinventorypanel.h | 21 ++++++++++++++------- indra/newview/llpanelmaininventory.cpp | 4 ++-- indra/newview/llviewerinventory.cpp | 3 ++- 4 files changed, 19 insertions(+), 11 deletions(-) (limited to 'indra/newview') 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 { Optional 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 -- cgit v1.2.3