commit a34523c61866032b23efd90390990c5e114db1df
parent 884055d3bd0e34da2ea6d74705ed5c2a0e9ef0a2
Author: wwp <wwp@free.fr>
Date: Tue, 13 Dec 2016 08:57:52 +0100
Merge branch 'master' of ssh+git://git.claws-mail.org/home/git/claws
Diffstat:
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/AUTHORS b/AUTHORS
@@ -310,3 +310,4 @@ contributors (in addition to the above; based on Changelog)
Ben Hutchings
Ralf Bormann
Darac Marjal
+ Ashish Gupta
diff --git 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;
diff --git a/src/gtk/authors.h b/src/gtk/authors.h
@@ -149,6 +149,7 @@ static char *CONTRIBS_LIST[] = {
"Michał Górny",
"Bodo Graumann",
"Yang Guilong",
+"Ashish Gupta",
"Daniel Gustafson",
"HIROSHIMA",
"Oliver Haertel",