Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: (PR#2690) [PATCH] Show unit location in its descriptio
Home

[Freeciv-Dev] Re: (PR#2690) [PATCH] Show unit location in its descriptio

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: stepan@xxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2690) [PATCH] Show unit location in its description
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Fri, 3 Jan 2003 18:53:44 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Fri, 2003-01-03 at 19:44, Stepan Roh via RT wrote:

> Patch attached.

Looks better, but there are still a few issues.

> - introduced methods get_nearest_city() and get_nearest_city_text()
> (located in client/climisc.[hc])

Nice.

> - moved unit_description() to client/gui-*/citydlg.c (if used by that gui
> = gtk, gtk-2.0, xaw, sdl, win32) and changed it to use new
> get_nearest_city*() methods

Don't put identical copies of the function into each GUI.  Just put one
copy into climisc; it's okay if not all GUIs use it.

For now I don't suggest changing the users of unit_description.  Later
some GUIs may want to do their own formatting, and some may wish to add
this information to the mapview panel information for the active unit. 
But these are separate issues.

> - added "from " in front of home city text

Seems good to me.  Other opinions?

> - text visible before nearest city name is now better translatable (I
> hope)

I don't see any problems with this, but I'd like to get a translator's
opinion.  Remember that some languages may follow entirely different
grammar rules.

> Index: client/gui-gtk/citydlg.c
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/citydlg.c,v
> retrieving revision 1.150
> diff -u -r1.150 citydlg.c

> +  static char buffer[512];
> +  static char buffer2[64];
> +  static char buffer3[64];

buffer2 and buffer3 need not be static.

As a side note, we could avoid the use of a static array here by passing
a buffer in to the function.  But that's probably a separate issue.

jason




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