[Commits] [SCM] claws branch, master, updated. 3.14.1-49-gea40116

ticho at claws-mail.org ticho at claws-mail.org
Tue Dec 13 00:56:21 CET 2016


The branch, master has been updated
       via  ea4011632f33c8ccc5929ffc157e3f6255fe9d95 (commit)
      from  4b9f6e2b6316a1efff97dc3f41836cfeeb04e220 (commit)

Summary of changes:
 src/compose.c |   21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)


- Log -----------------------------------------------------------------
commit ea4011632f33c8ccc5929ffc157e3f6255fe9d95
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Tue Dec 13 00:55:24 2016 +0100

    Honor autosave_encrypted preference when using external editor.
    
    Patch by Ashish Gupta <ashmew2 at gmail.com>.

diff --git a/src/compose.c b/src/compose.c
index ae84883..a4e4881 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -9493,6 +9493,14 @@ static gboolean compose_ext_editor_kill(Compose *compose)
 	return TRUE;
 }
 
+static gboolean compose_can_autosave(Compose *compose)
+{
+	if (compose->privacy_system && compose->use_encryption)
+		return prefs_common.autosave && prefs_common.autosave_encrypted;
+	else
+		return prefs_common.autosave;
+}
+
 static gboolean compose_input_cb(GIOChannel *source, GIOCondition condition,
 				 gpointer data)
 {
@@ -9521,7 +9529,10 @@ static gboolean compose_input_cb(GIOChannel *source, GIOCondition condition,
 		gtk_text_buffer_set_text(buffer, "", -1);
 		compose_insert_file(compose, compose->exteditor_file);
 		compose_changed_cb(NULL, compose);
-		compose_draft((gpointer)compose, COMPOSE_AUTO_SAVE);
+
+		/* Check if we should save the draft or not */
+		if (compose_can_autosave(compose))
+		  compose_draft((gpointer)compose, COMPOSE_AUTO_SAVE);
 
 		if (claws_unlink(compose->exteditor_file) < 0)
 			FILE_OP_ERROR(compose->exteditor_file, "unlink");
@@ -10382,14 +10393,6 @@ void compose_close_toolbar(Compose *compose)
 	compose_close_cb(NULL, compose);
 }
 
-static gboolean compose_can_autosave(Compose *compose)
-{
-	if (compose->privacy_system && compose->use_encryption)
-		return prefs_common.autosave && prefs_common.autosave_encrypted;
-	else
-		return prefs_common.autosave;
-}
-
 static void compose_close_cb(GtkAction *action, gpointer data)
 {
 	Compose *compose = (Compose *)data;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list