aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-06-04 05:54:54 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-06-04 05:54:54 +0800
commit17bd1b5a45d0236fe8e409450928c3b969cb3978 (patch)
tree49ffd36115f77c09791c812efcf3c6771521e556
parentccc7bafebeb202b0f7f7f19b23f76a2105bf2068 (diff)
downloadgsoc2013-evolution-17bd1b5a45d0236fe8e409450928c3b969cb3978.tar.gz
gsoc2013-evolution-17bd1b5a45d0236fe8e409450928c3b969cb3978.tar.zst
gsoc2013-evolution-17bd1b5a45d0236fe8e409450928c3b969cb3978.zip
Prompt the user to see if he really wants to quit when there are queued
2002-06-03 Jeffrey Stedfast <fejj@ximian.com> * component-factory.c (request_quit): Prompt the user to see if he really wants to quit when there are queued messages in the Outbox. svn path=/trunk/; revision=17089
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/component-factory.c21
-rw-r--r--mail/mail-ops.c4
3 files changed, 27 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 1cfa0ca1da..5b238f41c5 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2002-06-03 Jeffrey Stedfast <fejj@ximian.com>
+
+ * component-factory.c (request_quit): Prompt the user to see if he
+ really wants to quit when there are queued messages in the Outbox.
+
2002-06-01 Not Zed <NotZed@Ximian.com>
* mail-local.c (mlf_getv): Implement, return a text description of
diff --git a/mail/component-factory.c b/mail/component-factory.c
index 7de338cb95..668b1fef48 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -940,7 +940,26 @@ static gboolean
request_quit (EvolutionShellComponent *shell_component,
void *closure)
{
- return e_msg_composer_request_close_all ();
+ GtkWidget *dialog;
+
+ if (!e_msg_composer_request_close_all ())
+ return FALSE;
+
+ if (!camel_folder_get_message_count (outbox_folder))
+ return TRUE;
+
+ dialog = gnome_message_box_new (_("You have unsent messages, do you wish to quit anyway?"),
+ GNOME_MESSAGE_BOX_QUESTION,
+ GNOME_STOCK_BUTTON_YES, /* Quit */
+ GNOME_STOCK_BUTTON_NO, /* Don't quit */
+ NULL);
+
+ gtk_window_set_title (GTK_WINDOW (dialog), _("Warning: Unsent Messages"));
+ gnome_dialog_set_default (GNOME_DIALOG (dialog), 1);
+ if (gnome_dialog_run_and_close (GNOME_DIALOG (dialog)) == 0)
+ return TRUE;
+
+ return FALSE;
}
static BonoboObject *
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index ed7a876585..0572f1596d 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -582,7 +582,7 @@ struct _send_mail_msg {
CamelFilterDriver *driver;
char *destination;
CamelMimeMessage *message;
-
+
void (*done)(char *uri, CamelMimeMessage *message, gboolean sent, void *data);
void *data;
};
@@ -628,7 +628,7 @@ static void
send_mail_free (struct _mail_msg *mm)
{
struct _send_mail_msg *m = (struct _send_mail_msg *)mm;
-
+
camel_object_unref (CAMEL_OBJECT (m->driver));
camel_object_unref (CAMEL_OBJECT (m->message));
g_free (m->destination);