Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] Re: (PR#2607) city report fields still don't sort perfectl
Home

[Freeciv-Dev] Re: (PR#2607) city report fields still don't sort perfectl

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdwheeler42@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2607) city report fields still don't sort perfectly
From: "Christian Knoke" <chrisk@xxxxxxxxx>
Date: Tue, 23 Sep 2003 15:01:40 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Tue, Sep 09, 2003 at 08:56:26AM -0700, Jason Short wrote:
> 
> [jdorje - Tue Sep  9 15:39:33 2003]:
> 
> > Sorting is done numerically for numeric fields, and alphabetically for 
> > text fields.  The problem is some fields are combination fields 
> > (generally containing multiple numbers) that are sorted alphabetically.
> 
> OK, I take it back.
> 
> The combination field is the fundamental problem, but there's also a
> problem in that only gui-gtk implements numerical comparisons.  Also, I
> believe combination fields are sorted as numbers rather than text -
> which is better but still not a real solution.

Long time ago I have made a little patch which did combined alpha/numerical
sorting; it splitted the string into pieces at the slashes.

I still think this was an improvement of the current situation, which is
annoying IMHO.

If you think that to I might be able to do an update of that patch.

> For those interested in porting this functionality, the relevant
> function is cityrepfield_compare in client/cityrepdata.c.  This function
> needs to be called to compare the two fields.  Something like the
> attached patch might do it for gui-gtk-2.0 (although I cannot test this).
> 
> jason

Christian


-- 
Christian Knoke          * * *          http://www.cknoke.de
* * * * * * * * *  Ceterum censeo Microsoft esse dividendum.



[Prev in Thread] Current Thread [Next in Thread]