From 8138561e4a3c4932354b4741f02a40eb1ac4e881 Mon Sep 17 00:00:00 2001 From: Iain Holmes Date: Fri, 15 Sep 2000 00:43:18 +0000 Subject: Made a nicer dialog for the "You have not configured the mail client" error svn path=/trunk/; revision=5440 --- mail/mail-callbacks.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'mail/mail-callbacks.c') diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 6ebc7a3627..78e69a2154 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -65,7 +65,24 @@ check_configured (FolderBrowser *fb) return TRUE; if (fb) { - mail_config_druid (fb->shell); + GtkWidget *dialog; + + dialog = gnome_message_box_new (_("You have not configured the mail client.\nYou need to do this before you can send,\nreceive or compose mail.\nWould 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: + mail_config_druid (fb->shell); + break; + case 1: + default: + break; + } + return mail_config_is_configured (); } else return FALSE; @@ -79,13 +96,6 @@ check_send_configuration (FolderBrowser *fb) /* Check general */ if (!check_configured (fb)) { - GtkWidget *message; - - message = gnome_warning_dialog_parented (_("You need to configure the mail client\n" - "before you can compose mail."), - GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (fb), - GTK_TYPE_WINDOW))); - gnome_dialog_run_and_close (GNOME_DIALOG (message)); return FALSE; } @@ -183,11 +193,6 @@ send_queued_mail (GtkWidget *widget, gpointer user_data) MailConfigService *transport; if (!mail_config_is_configured ()) { - GtkWidget *win = gtk_widget_get_ancestor (GTK_WIDGET (user_data), - GTK_TYPE_WINDOW); - - gnome_error_dialog_parented ("You have not set any configuration settings", - GTK_WINDOW (win)); return; } -- cgit v1.2.3