[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [TSVN] Sort order in commit / revert dialog

From: Martin Eckardt <Martin.Eckardt_at_micronova.de>
Date: 2004-11-15 15:31:48 CET

Martin Eckardt wrote:

> Martin Eckardt wrote:
>
>> Lübbe Onken wrote:
>>
>>> Hi Folks,
>>>
>>> There's a tiny annoyance in these dialog. The entries are sorted,
>>> but the
>>> case isn't ignored. Thus an entry like 'aaa' is near the end of a
>>> list where
>>> I wouldn't search for it, when the other entries start with capital
>>> letters.
>>>
>>> Currently we have:
>>>
>>> Aab
>>> Aac
>>> .
>>> . insert as many as you like so that 'aaa' scrolls off the screen
>>> .
>>> ZXYZZYX
>>> aaa <- Oh, that's where they are hiding!
>>> abc
>>>
>>> Should be:
>>> aaa
>>> Aab
>>> Aac
>>> abc
>>> .
>>> .
>>> .
>>> ZXYZZYX
>>>
>>> I haven't checked whether other dialogs sort like this as well. I
>>> checked
>>> commit and revert. Possibly add. Others?
>>>
>>>
>>>
>> Don't we use the sorting of the mfc controls? I just looked into
>> LogDlg.cpp and couldn't find anything about sorting.
>>
>> I searched the mailing and found a message from stefan 06.09.04:
>> Changed the resources in revision 1649 - the feature was implemented
>> already, but the resources had the "no sort headers" set to true.
>>
>> This has something to do with the check for update dialog, but I
>> think we use it in the commit dialog, too.
>>
>> Could we change the behaviour windows sorts the columns in the controls?
>>
> Found it!
> We do the sort ourself. The Svn/SVNStatusListCtrl.cpp is used in the
> commit dialog. There is a Funrction CSVNStatusListCtrl::Sort(), where
> qsort() is called (Line 764). ANSI-C defined in stdlib.h I think. But
> why this algorithm does non cases sensitive sorting, could probably
> only be answered by Steve.
>
I googled again:
In
http://heather.cs.ucdavis.edu/~matloff/UnixAndC/CLanguage/CLibQSort.html
is the C Function qsort() explained.
The qsort() uses SortCompare() some lines below.

If the column is a path, call FileEntry->path.Compare(). FileEntry->path
or FileEntry->url is a CString so the comparisation is done by CString.
And the CString::Compare function is case sensitive. So I really don't
know why this does happen.

-- 
____________________________________________________________
MicroNova electronic GmbH
Martin Eckardt
Kommunikation und Telekommunikation
Unterfeldring 17
D-85256 Vierkirchen
Tel.:	(08139) 93 00-41
Fax.:	(08139) 93 00-80
E-Mail:	Martin.Eckardt@micronova.de
WWW:	http://www.micronova.de
____________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Mon Nov 15 15:32:12 2004

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.