Re: [Nautilus-list] [PATCH] for bug 77174 (Nautilus sorts in opposite order when "sort in reverse order" chosen)



On Sun, 7 Apr 2002, David Emory Watson wrote:

> On Sun, 2002-04-07 at 14:38, Alex Larsson wrote:
> > 
> > Hmmm. It seems fm_list_model_add_file() has the same problem.
> > 
> > Also, it seems strange that SORT_ASCENDING means reverse sort. That 
> 
> Maybe (I also had a hard time deciding this). In any case the choice is
> dictated by the following code, in src/file-manager/fm-list-view.c,
> set_sort_order_from_metadata_and_preferences ():
> 
> 	gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE
> (list_view->details->model),
> 					      sort_column_id,
> 					      sort_reversed ? GTK_SORT_ASCENDING : GTK_SORT_DESCENDING);
> 
> --
> 
> This choice might be easier to justify if we think about the case of
> sorting by size.  By default we should put smaller files after bigger
> files, hence descending in the default case and ascending when the sort
> is reversed.
> 
> What do you think?

I don't think it's *obvious* that the non-reversed sort by size means 
smaller sizes last, both seem equally plausible.

But we have to decide something.

Clearly the meaning of the names ascending and descending are obvious for 
both size and names. So let's make them mean the right thing. And 
obviously the default sort order for names is ascending. So we should pick 
that as the default one.

As a side effect this determines the default sort order for sort by size 
as small files first. It's sort of unfortunate that behaviour is 
determined by internal naming, but since it's not obvious which default 
order to use for size, and it's easily changeable its probably ok.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an ungodly ninja farmboy possessed of the uncanny powers of an insect. 
She's a vivacious winged nun who dreams of becoming Elvis. They fight crime! 





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]