Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2003:
[Freeciv-Dev] Re: (PR#6074) Numeric sorting in city report
Home

[Freeciv-Dev] Re: (PR#6074) Numeric sorting in city report

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdwheeler42@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#6074) Numeric sorting in city report
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Mon, 8 Sep 2003 07:39:25 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, 8 Sep 2003, John Wheeler wrote:

>
> I think the sorting issues in PR#2607 have been resolved, but I do have
> a very similiar issue: sorting appears to be text based, even for
> numeric fields.  So, for example after sorting the food stock column,
> you can easily have:
>
> 124/130
> 47/50
> 5/20
> 64/80

Now I remember... Didn't someone change the GTK+ 1.2 client to make this
differently? Please check if this is so and which client you are using.
If this is a GTK+ 2.0 specific issue I can try to make it more like the
GTK+ 1.2 client.

> The simplest solution I can think of is padding short numbers with
> spaces, so the output becomes:
>
>   5/20
>  47/50
>  64/80
> 124/130
>
> This also would have the side benefit of improving the appearance.

No it wouldn't. You assume everyone uses a monospaced font. The GTK+
clients do not use monospaced fonts hence ' ' is less wide than, say,
'8'.
The way we solve this in the GTK+ 2.0 client is to use the built-in widget
column alignment attribute. The problem here is that you have the data of
two columns stuck into one column.

I always wanted to turn the food box data into a progress bar. But there
is no progress bar cell renderer in the GTK+ 2.0 API to use in the cities
report. Oh well.

---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa




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