[opensource-dev] Review Request: STORM-316 Add missing "sort by name" and "sort by recent" options for folders

Kitty Barnett sldev at catznip.com
Thu Dec 16 15:11:48 PST 2010



> On 2010-12-16 14:06:33, Seth ProductEngine wrote:
> > For me 'Sort Folders by Most Recent' works only when 'Sort Items by Most Recent' is checked. Though I can't figure out what's wrong with this patch.

I'm seeing it too...

I *think* (part of) the cause may be in LLFolderViewFolder::sortBy(U32 order):

	if (order & LLInventoryFilter::SO_DATE)
	{
		time_t latest = 0;

		if (!mItems.empty())
		{
			LLFolderViewItem* item = *(mItems.begin());
			latest = item->getCreationDate();
		}

		if (!mFolders.empty())
		{
			LLFolderViewFolder* folder = *(mFolders.begin());
			if (folder->getCreationDate() > latest)
			{
				latest = folder->getCreationDate();
			}
		}
		mSubtreeCreationDate = latest;
	}

It looks like in the case of a folder the creation date is always mSubtreeCreationDate and if the items aren't sorted by date, then mSubtreeCreationDate will never set for the folder.

I'll peek at it some more over the weekend, thankies for the feedback, Seth :).


- Kitty


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/27/#review44
-----------------------------------------------------------


On 2010-12-16 03:33:51, Kitty Barnett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/27/
> -----------------------------------------------------------
> 
> (Updated 2010-12-16 03:33:51)
> 
> 
> Review request for Viewer.
> 
> 
> Summary
> -------
> 
> Changes the UI (and needs additional translation), but it's a viewer 1 option that was missed by STORM-316.
> 
> Existing "Sort by (Name|Most Recent)" => "Sort Items by (Name|Most Recent)"
> 
> Split "Folders always by name" in two options to match what was done for inventory items and added "Sort Folders by (Name|Most Recent)" menu options.
> 
> 
> This addresses bug STORM-316.
>     http://jira.secondlife.com/browse/STORM-316
> 
> 
> Diffs
> -----
> 
>   indra/newview/llpanelmaininventory.cpp UNKNOWN 
>   indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml UNKNOWN 
> 
> Diff: http://codereview.secondlife.com/r/27/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Kitty
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.secondlife.com/pipermail/opensource-dev/attachments/20101216/2e6fd488/attachment.htm 


More information about the opensource-dev mailing list