[Freeciv-Dev] Re: (PR#4426) Adding append command to gui-gtk-2.0
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Sep 09, 2003 at 03:20:05PM -0700, Vasco Alexandre da Silva Costa wrote:
>
> I like the idea, but I will not apply any wide changes to the worklist
> code in the client until the common worklist code stops being braindead.
>
> i.e. it makes no sense current production is a separate struct field.
> The current production should simply be the first element in the
> worklist queue.
It does make a bit of sense, since the current production is unique.
The current production actually is usually partially done. If you
made the first item on the worklist the current production, it would
complicate the code to do something like say swap the first and the
second items, since the code would have to remember to change the
number of shields stored (if say you switched from settlers to
temple). Since there are these special cases when dealing with the
current production, I am not certain that making the first element in
the current production will actually significantly simplify code. I
am on the other hand certain that making this change will be a fair
amount of work.
It might be better than the current situation, but I think it needs more
justification than merely eliminating one variable in the city structure.
> Regarding worklist manipulating commands for the city report, I propose
> the following names and commands:
>
> * prepend (add to the beggining of the worklist).
> * append (add to the end of the worklist).
> * pop first.
> * pop last.
>
> These could be submenus of the "Change" menu in the city report. Thus:
>
> Change
> +- Prepend to Worklist
> | +- Units
> | +- Improvements
> | +- Wonders
> |
> +- Append to Worklist
> | +- Units
> | +- Improvements
> | +- Wonders
> |
> +- Pop First in Worklist
> +- Pop Last in Worklist
> +- CMA
I am not sure why you would want a pop last option especially considering
that you cannot see the last item in the worklist from the city report
dialog presently. I suppose you could add a new column for the last
item in the worklist. (A column for the next item to be built wouldn't
hurt either). I am also not sure why you don't want the change or the
next options. The change could be done by a pop first followed by a
prepend, but the next item insert could not be done with the commands
that you give.
--
Josh Cogliati
|
|