Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] Re: (PR#10889) xaw: no confirmation dialog for targeted re
Home

[Freeciv-Dev] Re: (PR#10889) xaw: no confirmation dialog for targeted re

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: (PR#10889) xaw: no confirmation dialog for targeted revolutions
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 20 Nov 2004 10:22:26 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10889 >

Egor Vyscrebentsov wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=10889 >
> 
>>[jdorje - Nov 05 15:40:59 2004]:
>>
>>If you choose "revolution" you get a confirmation dialog.
>>
>>But if you choose a particular government to change to there is
>>no dialog.
> 
> 
> Attached patch shows confirmation dialog when player has no
> revolution.
> 
> One problem - next turn after revolution finished it does not
> show this dialog. Two (or more) turns ater finish it does.
> Civserver debug log shows that revolution_finishes is -1, however...
> 
> vasc used `if (game.player_ptr->revolution_finishes < game.turn)'
> instead of `if (game.player_ptr->revolution_finishes != -1)'
> It fixes this problem but shows the dialog when player should
> just choose a government after revolution finished.

I think you're doing the wrong thing.  There isn't supposed to be a 
popup at the end of the revolution.  There's just supposed to be a 
confirmation popup at the beginning of the revolution.  The "Really 
start revolution?" popup should be shown whether the player chooses a 
government or not.

So the popup should be a direct result of selecting the menu item, not 
something that happens some turns later.  However the popup should only 
be called if (I think) revolution_finishes == -1.  So it will only give 
you a popup when you _start_ a revolution.  These dialogs may also turn 
up in the middle of a revolution (game.revolution_finishes < game.turn) 
or at the end of a revolution before a government is chosen 
(game.revolution_finishes >= game.turn) and you don't want a popup in 
either of those cases.  So, both you and Vasco are wrong.

jason





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