[Freeciv-Dev] Re: Caravans don't work anymore (PR#1551)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Jun 12, 2002 at 01:22:16AM -0700, Christian Knoke wrote:
> On Mon, Jun 10, 2002 at 11:22:27AM +0200, Raimar Falke wrote:
> > On Sun, Jun 09, 2002 at 03:12:14AM -0700, kenn@xxxxxxxxxxxxxx wrote:
> > > Full_Name: Kenn Munro
> > > Version: 1.12.3-devel
> > > Distribution: Built from source
> > > Client: Gtk+
> > > OS: Red Hat 7.2
> > > Submission from: (NULL) (216.104.110.108)
> > >
> > >
> > > If you press the "close window button" (X) to close the "your caravan has
> > > arrived (what do you want to do with it)" box, the caravan moves into the
> > > city
> > > as if you chose the "keep moving" option.
> > >
> > > But, anytime you move a caravan/freight into a city after that, it
> > > doesn't popup
> > > the box asking what you want to do with it.. it just continues moving the
> > > caravan as if it was a normal unit. The client has to be restarted for
> > > it to
> > > work ok again.
> > >
> > > Solution: don't close the "your caravan has arrived" box if the user
> > > presses the
> > > X.
> >
> > Try attached patch.
>
> I think the X in the upper right corner should _always_ close the
> window. It's GUI style. Even Alt-F4 doesn't work any more with this
> patch.
>
> I don't know whether it is possible to correct the bug,
> but maybe you can make it so, that closing the window just gives
> "keep moving" as the default action.
Here is the patch. Changes:
- the dialog destroys itself (destroy_message_dialog can be removed)
- added a new close_callback which is called every time the dialog is
closed either by button click or by X button. This callback does the
cleanup which is common for all exists.
- these changes make the callback for the default button obsolete
- if close_callback is NULL the dialog can't be closed by the X
button (currently used by the government dialog)
- converting 3 variable sized dialogs (government, pillage, unit
connect) to the popup_message_dialog
- cleanup of input_dialog_create and co (why are the callbacks of
type void *?)
- various other changes: I remember the get_special_name one and
removing some conditions which are useless and the size_t change.
And because common code is removed the patch shrinks the code by 179
lines.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
(On the statement print "42 monkeys"+"1 snake"): BTW, both perl and Python
get this wrong. Perl gives 43 and Python gives "42 monkeys1 snake", when
the answer is clearly "41 monkeys and 1 fat snake".
-- Jim Fulton, 10 Aug 1999
proper_close_handling1.diff.gz
Description: GNU Zip compressed data
|
|