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 1e0a977..a266e15 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 76a3e11..ae65340 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 0b731e6..b58dab6 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 71cfb24..add9867 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: