diff options
author | Peter Williams <peterw@src.gnome.org> | 2000-08-11 02:03:20 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2000-08-11 02:03:20 +0800 |
commit | 9eebb1486e027a709085bdd95b90805a7f38c303 (patch) | |
tree | 56a4e19739a61f09af456a014ab41b18aca0575f /composer/e-msg-composer.c | |
parent | 7485cb99c423a89f2d22c3dc88876dd6fc2ff1e9 (diff) | |
download | gsoc2013-evolution-9eebb1486e027a709085bdd95b90805a7f38c303.tar gsoc2013-evolution-9eebb1486e027a709085bdd95b90805a7f38c303.tar.gz gsoc2013-evolution-9eebb1486e027a709085bdd95b90805a7f38c303.tar.bz2 gsoc2013-evolution-9eebb1486e027a709085bdd95b90805a7f38c303.tar.lz gsoc2013-evolution-9eebb1486e027a709085bdd95b90805a7f38c303.tar.xz gsoc2013-evolution-9eebb1486e027a709085bdd95b90805a7f38c303.tar.zst gsoc2013-evolution-9eebb1486e027a709085bdd95b90805a7f38c303.zip |
Workaround Zucchi's new append_message
svn path=/trunk/; revision=4693
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index ac22995e28..c8e1764cab 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -42,7 +42,7 @@ #include <libgnorba/gnorba.h> #include <gtkhtml/gtkhtml.h> -#include <camel/camel.h> +#include "camel/camel.h" #include "../mail/mail.h" @@ -483,7 +483,7 @@ load (EMsgComposer *composer, CORBA_exception_free (&ev); } - +#if 0 /* Exit dialog. (Displays a "Save composition to 'Drafts' before exiting?" warning before actually exiting.) */ enum { REPLY_YES = 0, REPLY_NO, REPLY_CANCEL }; @@ -493,15 +493,20 @@ exit_dialog_cb (int reply, EMsgComposer *composer) { extern CamelFolder *drafts_folder; CamelMimeMessage *msg; + CamelMessageInfo *info; CamelException *ex; char *reason; switch (reply) { case REPLY_YES: + /* AIEEEEEEEEEEEE THIS IS ALL WRONG. SHOULD BE ASYNC. */ + info = g_new0 (CamelMessageInfo, 1); + info->flags = CAMEL_MESSAGE_DRAFT; msg = e_msg_composer_get_message (composer); ex = camel_exception_new (); - camel_folder_append_message (drafts_folder, msg, CAMEL_MESSAGE_DRAFT, ex); + camel_folder_append_message (drafts_folder, msg, info, ex); + g_free (info); if (camel_exception_is_set (ex)) goto error; @@ -547,7 +552,33 @@ do_exit (EMsgComposer *composer) exit_dialog_cb (button, composer); } - +#else + +static void +do_exit (EMsgComposer *composer) +{ + GtkWidget *dialog; + GtkWidget *label; + gint button; + + dialog = gnome_dialog_new (_("Evolution"), + GNOME_STOCK_BUTTON_YES, /* Save */ + GNOME_STOCK_BUTTON_NO, /* Don't save */ + NULL); + + label = gtk_label_new (_("This message has not been sent.\n\nDo you wish to exit the composer?")); + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, TRUE, TRUE, 0); + gtk_widget_show (label); + gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (composer)); + gnome_dialog_set_default (GNOME_DIALOG (dialog), 0); + button = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); + + if (button == 0) + gtk_widget_destroy (GTK_WIDGET (composer)); +} + +#endif + /* Menu callbacks. */ static void |