diff options
| author | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-06-02 18:19:41 +0300 | 
|---|---|---|
| committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2010-06-02 18:19:41 +0300 | 
| commit | 4ac34230c125e070ba4a78a76d875595e9f7054e (patch) | |
| tree | 45fc4acacaac885d22206766e6049d008ad19c4c | |
| parent | f8d2fa4ca818693177ddd866817882f5c56203fd (diff) | |
EXT-6744 FIX add settigns variable "LandmarksSortedByDate"
reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/489/
--HG--
branch : product-engine
| -rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
| -rw-r--r-- | indra/newview/llpanellandmarks.cpp | 18 | ||||
| -rw-r--r-- | indra/newview/llpanellandmarks.h | 1 | 
3 files changed, 21 insertions, 9 deletions
| diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 532ce69e41..e86f50ce20 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -11362,5 +11362,16 @@  	      <string>mini_map</string>        </array>      </map> +    <key>LandmarksSortedByDate</key> +    <map> +      <key>Comment</key> +      <string>Reflects landmarks panel sorting order.</string> +      <key>Persist</key> +      <integer>1</integer> +      <key>Type</key> +      <string>Boolean</string> +      <key>Value</key> +      <integer>1</integer> +    </map>  </map>  </llsd> diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 4bf4f9eac1..7fb46fc84f 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -221,8 +221,6 @@ BOOL LLLandmarksPanel::postBuild()  	// mast be called before any other initXXX methods to init Gear menu  	initListCommandsHandlers(); -	U32 sort_order = gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER); -	mSortByDate = sort_order & LLInventoryFilter::SO_DATE;  	initFavoritesInventoryPanel();  	initLandmarksInventoryPanel();  	initMyInventoryPanel(); @@ -607,7 +605,8 @@ void LLLandmarksPanel::initLandmarksPanel(LLPlacesInventoryPanel* inventory_list  	inventory_list->setSelectCallback(boost::bind(&LLLandmarksPanel::onSelectionChange, this, inventory_list, _1, _2));  	inventory_list->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); -	updateSortOrder(inventory_list, mSortByDate); +	bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate"); +	updateSortOrder(inventory_list, sorting_order);  	LLPlacesFolderView* root_folder = dynamic_cast<LLPlacesFolderView*>(inventory_list->getRootFolder());  	if (root_folder) @@ -875,10 +874,12 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata)  	}  	else if ("sort_by_date" == command_name)  	{ -		mSortByDate = !mSortByDate; -		updateSortOrder(mLandmarksInventoryPanel, mSortByDate); -		updateSortOrder(mMyInventoryPanel, mSortByDate); -		updateSortOrder(mLibraryInventoryPanel, mSortByDate); +		bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate"); +		sorting_order=!sorting_order; +		gSavedSettings.setBOOL("LandmarksSortedByDate",sorting_order); +		updateSortOrder(mLandmarksInventoryPanel, sorting_order); +		updateSortOrder(mMyInventoryPanel, sorting_order); +		updateSortOrder(mLibraryInventoryPanel, sorting_order);  	}  	else  	{ @@ -895,7 +896,8 @@ bool LLLandmarksPanel::isActionChecked(const LLSD& userdata) const  	if ( "sort_by_date" == command_name)  	{ -		return  mSortByDate; +		bool sorting_order = gSavedSettings.getBOOL("LandmarksSortedByDate"); +		return  sorting_order;  	}  	return false; diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 8f8d9c2708..0e70c72f11 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -167,7 +167,6 @@ private:  	LLInventoryObserver*		mInventoryObserver;  	LLPanel*					mListCommands; -	bool 						mSortByDate;  	typedef	std::vector<LLAccordionCtrlTab*> accordion_tabs_t;  	accordion_tabs_t			mAccordionTabs; | 
