commit 9a4782d3431dc10e92493b3b843cb30f7bed73e3
parent cc9790f565c708c7e75d65700ce9515d85502ffb
Author: Colin Leroy <colin@colino.net>
Date: Fri, 5 Sep 2008 09:42:05 +0000
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.
Diffstat:
4 files changed, 20 insertions(+), 3 deletions(-)
diff --git 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
diff --git a/PATCHSETS b/PATCHSETS
@@ -3501,3 +3501,4 @@
( 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
diff --git a/configure.ac b/configure.ac
@@ -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=
diff --git a/src/compose.c b/src/compose.c
@@ -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: