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: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#6074) Numeric sorting in city report
From: "John Wheeler" <jdwheeler42@xxxxxxxxx>
Date: Mon, 8 Sep 2003 08:38:30 -0700
Reply-to: rt@xxxxxxxxxxxxxx


--- Vasco Alexandre da Silva Costa
<vasc@xxxxxxxxxxxxxx> wrote:
> 
> 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.

Whoops, I'm sorry, I should have said I'm using the
GTK+ 2.0 client.  I'm not quite sure how to change
clients in CVS.

> 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. 

Okay, my bad.

> 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.

The food box is just an easier example.  Where it is
most annoying is when I want to buy as many of a
certain building etc. as possible, I sort the
Currently Building column and select the ones with
that building.  Then I have to deselect the ones that
are out of order because they don't have as many
digits.

Also, for columns that can negative values, you can
get strange results because of nonnumeric sorting. 
For example, in a sorted Economy : Gold column, you
can have:

0
-1
-2
+1
+2

when I'd really want

-2
-1
0
+1
+2

I just realized this negates my suggestion for padding
spaces. :-(  So, the sort really does need to be done
numerically.

--JohnWheeler

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



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