[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]
[patch attached]
On Fri, 3 Jan 2003, Jason Short via RT wrote:
> > - 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.
Citation:
"And perhaps this function is overkill to begin with - it should be left
up to the GUI code to generate the string (or do whatever layout it wants
with the data), and all the client-common code should do is provide a
helper function to find the nearest city."
So I provided only get_nearest_city*() functions and distributed
unit_description() in other GUIs. Moved to climisc.[hc] now.
> > - 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.
I know, I'm Czech. That's why there is _("in %s") (and similar) so others
may translate whole sentence in some neutral way (necause city name must
be intact).
> > 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.
Sure.
> 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.
Sure. I don't want to rewrite whole gui code I just want one tiny useful
feature :-) What about two my other patches (2680, 2692)?
Have a nice day.
Stepan Roh
unit_location_info.diff
Description: Text document
[Freeciv-Dev] Re: (PR#2690) [PATCH] Show unit location in its description, Stepan Roh via RT, 2003/01/04
[Freeciv-Dev] Re: (PR#2690) [PATCH] Show unit location in its description, Štěpán Roh via RT, 2003/01/04
[Freeciv-Dev] Re: (PR#2690) [PATCH] Show unit location in its description, Stepan Roh via RT, 2003/01/04
|
|