Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2001:
[Freeciv-Dev] Re: client shared code?
Home

[Freeciv-Dev] Re: client shared code?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jason Short <jshort@xxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: client shared code?
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 1 May 2001 09:13:49 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, Apr 30, 2001 at 11:07:43PM -0400, Jason Short wrote:
> I'd never looked at the freeciv code before, but I didn't like the way
> production that would never be finished was displayed as "999 turns" to
> completion.  I went in and changed this so that it would display "never"
> instead of "999" or "999 turns".  I realized this code was duplicated
> over all of the different client gui's (almost line-for-line between gtk
> and xaw), so I separated it from them (making several client shared
> functions used by gtk, xaw, and mui*).
> 
> However, I have no idea where to put this shared code.  There are a
> number of files in client/, including a variety of shared code, but none
> of it seems to have any relation to this code.  What file would this
> best be put into?

As part of new gtk city dialog I needed a table in the worklist
similar to the change-production dialog. Since I don't like code
duplication the code was re factored. Please take a look at
common/city:id_to_info_row(). Since there are space constrains "---"
is used instead of "never".

Maybe we can merge our two efforts? You provide a method similar to
common/city:id_to_info_row(), get it comitted and I will update the
new city dialog?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Transported to a surreal landscape, a young girl kills the first woman
  she meets and then teams up with three complete strangers to kill again."
    -- TV listing for the Wizard of Oz in the Marin Independent Journal

Attachment: citydlg-raimar-2.diff.gz
Description: GNU Zip compressed data


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: client shared code?, Raimar Falke <=