2008-09-05 [colin] 3.5.0cvs90
authorColin Leroy <colin@colino.net>
Fri, 5 Sep 2008 09:42:05 +0000 (09:42 +0000)
committerColin Leroy <colin@colino.net>
Fri, 5 Sep 2008 09:42:05 +0000 (09:42 +0000)
* src/compose.c
Fix bug 1710, 'User misreads "Discard Message"
as "Discard Changes"'. Propose to save or discard
only the latest changes when closing an existing
draft. Autosave may still have saved parts of the
edit session.

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index 1e0a9775a7bc9cdf270beda75f87486a1fb2b34d..a266e15c2ad225bfbc91f131f5b2faafb8037796 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-09-05 [colin]     3.5.0cvs90
+
+       * src/compose.c
+               Fix bug 1710, 'User misreads "Discard Message" 
+               as "Discard Changes"'. Propose to save or discard
+               only the latest changes when closing an existing
+               draft. Autosave may still have saved parts of the
+               edit session.
+
 2008-09-04 [colin]     3.5.0cvs89
 
        * src/summaryview.c
index 76a3e11cf3c61890998342a53f70dca4330a635a..ae65340af832a88546b021e28eeb920194168c94 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.396.2.2646 -r 1.396.2.2647 ChangeLog;  ) > 3.5.0cvs87.patchset
 ( cvs diff -u -r 1.179.2.226 -r 1.179.2.227 src/imap.c;  cvs diff -u -r 1.395.2.387 -r 1.395.2.388 src/summaryview.c;  cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/common/tags.c;  cvs diff -u -r 1.1.4.103 -r 1.1.4.104 src/etpan/imap-thread.c;  cvs diff -u -r 1.1.4.24 -r 1.1.4.25 src/etpan/imap-thread.h;  ) > 3.5.0cvs88.patchset
 ( cvs diff -u -r 1.395.2.388 -r 1.395.2.389 src/summaryview.c;  ) > 3.5.0cvs89.patchset
+( cvs diff -u -r 1.382.2.471 -r 1.382.2.472 src/compose.c;  ) > 3.5.0cvs90.patchset
index 0b731e6758c785f8dc2aecb77d214bdb0e1d37c8..b58dab6af0c10009521249169a955281d359720d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=89
+EXTRA_VERSION=90
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 71cfb2433d2ffb34a74dabe2bda2c74cf4495618..add9867770ccb004e1e5df7ba4514033985d2ddb 100644 (file)
@@ -9292,6 +9292,7 @@ static void compose_close_cb(GtkAction *action, gpointer data)
 #endif
 
        if (compose->modified) {
+               gboolean reedit = (compose->rmode == COMPOSE_REEDIT);
                if (!g_mutex_trylock(compose->mutex)) {
                        /* we don't want to lock the mutex once it's available,
                         * because as the only other part of compose.c locking
@@ -9300,13 +9301,19 @@ static void compose_close_cb(GtkAction *action, gpointer data)
                        debug_print("couldn't lock mutex, probably sending\n");
                        return;
                }
-               val = alertpanel(_("Discard message"),
+               if (!reedit) {
+                       val = alertpanel(_("Discard message"),
                                 _("This message has been modified. Discard it?"),
                                 _("_Discard"), _("_Save to Drafts"), GTK_STOCK_CANCEL);
+               } else {
+                       val = alertpanel(_("Save changes"),
+                                _("This message has been modified. Save the latest changes?"),
+                                _("_Don't save"), _("+_Save to Drafts"), GTK_STOCK_CANCEL);
+               }
                g_mutex_unlock(compose->mutex);
                switch (val) {
                case G_ALERTDEFAULT:
-                       if (prefs_common.autosave)
+                       if (prefs_common.autosave && !reedit)
                                compose_remove_draft(compose);                  
                        break;
                case G_ALERTALTERNATE: