Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] Re: closing dialog windows on server disconnect (PR#533)
Home

[Freeciv-Dev] Re: closing dialog windows on server disconnect (PR#533)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: closing dialog windows on server disconnect (PR#533)
From: Davide Pagnin <nightmare@xxxxxxxxxx>
Date: Thu, 3 Oct 2002 14:27:17 -0700 (PDT)

On Thu, 2002-10-03 at 19:30, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> When the client disconnects (or is disconnected) from the server, many 
> dialog windows are not closed.  This is clearly Wrong, and can lead to 
> segfaults - particularly in the case of the city report dialog.

When PR#1883 will be properly fixed, there wil be similar problem at the
end of the game. The change of status from game_running to game_over,
will change the commands and options available to the client, and
already opened dialogs may be in inconsistent status.

> 
> The dialogs that aren't closed include everything from the reports 
> dialog.  (Some of these are modal dialogs, so you can't *manually* 
> disconnect while they're open.)  Additionally some dialogs aren't 
> correctly updated if you disconnect and connect to a different game (for 
> instance the players dialog won't be updated until you close it).
> 
> The attached patch fixes this for the city dialog only.  It adds a new 
> GUI function, popdown_city_report_dialog, implements this for the stub, 
> gtk, gtk-2.0, xaw, and (untested) win32 GUIs.  The function is called on 
> server disconnect.  It will, unfortunately, break compilation of the 
> other guis (i.e. mui).

I will test this patch, as soon as I can.

> 
> Is this the correct fix?  Should a similar thing be done for the other 
> dialogs?

I think that closing, all dialogs that *ARE* not consistent or that
*CAN* be not consistent, are a proper fix.

I suggest to implement a method to close any one such dialog.

I suggest all to implement a method  that closes all such dialogs, and
that will call the single-closing method above.
(There are many point of the game where we have the necessity to close
one dialog or some dialogs, and some other moment where we have to close
*ALL* of them)

(On style or performance issue, I cannot say nothing)

> 
> jason
> ----
> 

        Davide




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: closing dialog windows on server disconnect (PR#533), Davide Pagnin <=