From 834325ad2b1b59d1e27dc20fe4922cb41c3717b5 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Fri, 12 Jan 2001 04:25:40 +0000 Subject: Force finalization of the function before returning fixing the FIXME that 2001-01-11 Miguel de Icaza * mail-callbacks.c (configure_mail): Force finalization of the function before returning fixing the FIXME that was there. svn path=/trunk/; revision=7429 --- mail/ChangeLog | 5 +++++ mail/mail-callbacks.c | 33 +++++++++++++++++++++++---------- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 670a739b5f..4341f962f8 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2001-01-11 Miguel de Icaza + + * mail-callbacks.c (configure_mail): Force finalization of the + function before returning fixing the FIXME that was there. + 2001-01-11 Jeffrey Stedfast * mail-config-druid.c (transport_next): If the service_check diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 7943e27443..b691fbe591 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -64,6 +64,12 @@ struct post_send_data { guint32 flags; }; +static void +druid_destroyed (void) +{ + gtk_main_quit (); +} + static void configure_mail (FolderBrowser *fb) { @@ -72,21 +78,28 @@ configure_mail (FolderBrowser *fb) if (fb) { GtkWidget *dialog; - dialog = gnome_message_box_new (_("You have not configured the mail client.\n" - "You need to do this before you can send,\n" - "receive or compose mail.\n" - "Would you like to configure it now?"), - GNOME_MESSAGE_BOX_QUESTION, - GNOME_STOCK_BUTTON_YES, - GNOME_STOCK_BUTTON_NO, NULL); - gnome_dialog_set_parent (GNOME_DIALOG (dialog), - GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (fb), GTK_TYPE_WINDOW))); + dialog = gnome_message_box_new ( + _("You have not configured the mail client.\n" + "You need to do this before you can send,\n" + "receive or compose mail.\n" + "Would you like to configure it now?"), + GNOME_MESSAGE_BOX_QUESTION, + GNOME_STOCK_BUTTON_YES, + GNOME_STOCK_BUTTON_NO, NULL); + + gnome_dialog_set_parent ( + GNOME_DIALOG (dialog), + GTK_WINDOW (gtk_widget_get_ancestor ( + GTK_WIDGET (fb), GTK_TYPE_WINDOW))); switch (gnome_dialog_run_and_close (GNOME_DIALOG (dialog))) { case 0: - /* FIXME: should we block until mail-config is done? */ druid = mail_config_druid_new (fb->shell); + gtk_signal_connect (GTK_OBJECT (druid), "destroy", + GTK_SIGNAL_FUNC (druid_destroyed), NULL); gtk_widget_show (GTK_WIDGET (druid)); + gtk_grab_add (GTK_WIDGET (druid)); + gtk_main (); break; case 1: default: -- cgit v1.2.3