aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-08-11 02:03:20 +0800
committerPeter Williams <peterw@src.gnome.org>2000-08-11 02:03:20 +0800
commit9eebb1486e027a709085bdd95b90805a7f38c303 (patch)
tree56a4e19739a61f09af456a014ab41b18aca0575f
parent7485cb99c423a89f2d22c3dc88876dd6fc2ff1e9 (diff)
downloadgsoc2013-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
-rw-r--r--composer/ChangeLog5
-rw-r--r--composer/e-msg-composer.c39
2 files changed, 40 insertions, 4 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 35cf9baae6..7fa568a8d2 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,8 @@
+2000-08-10 Peter Williams <peterw@helixcode.com>
+
+ * e-msg-composer.c (do_exit): Temporarily disable draft saving
+ while we figure out how to work around Zucchi's new append_message.
+
2000-08-10 Jeffrey Stedfast <fejj@helixcode.com>
* e-msg-composer-hdrs.c (e_msg_composer_hdrs_get_from): Return the
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