diff options
author | Iain Holmes <iain@src.gnome.org> | 2000-09-15 08:43:18 +0800 |
---|---|---|
committer | Iain Holmes <iain@src.gnome.org> | 2000-09-15 08:43:18 +0800 |
commit | 8138561e4a3c4932354b4741f02a40eb1ac4e881 (patch) | |
tree | 9ca109ea1dca3c031c212c3e4d2bb73241ed9ea9 /mail/mail-callbacks.c | |
parent | ad1af78acff4090105bfe63da32fb418a4a22035 (diff) | |
download | gsoc2013-evolution-8138561e4a3c4932354b4741f02a40eb1ac4e881.tar gsoc2013-evolution-8138561e4a3c4932354b4741f02a40eb1ac4e881.tar.gz gsoc2013-evolution-8138561e4a3c4932354b4741f02a40eb1ac4e881.tar.bz2 gsoc2013-evolution-8138561e4a3c4932354b4741f02a40eb1ac4e881.tar.lz gsoc2013-evolution-8138561e4a3c4932354b4741f02a40eb1ac4e881.tar.xz gsoc2013-evolution-8138561e4a3c4932354b4741f02a40eb1ac4e881.tar.zst gsoc2013-evolution-8138561e4a3c4932354b4741f02a40eb1ac4e881.zip |
Made a nicer dialog for the "You have not configured the mail client" error
svn path=/trunk/; revision=5440
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r-- | mail/mail-callbacks.c | 31 |
1 files changed, 18 insertions, 13 deletions
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; } |