case A_SEND:
compose_send_cb(NULL, compose);
break;
- case A_SENDL:
+ case A_SEND_LATER:
compose_send_later_cb(NULL, compose);
break;
case A_DRAFT:
cm_return_val_if_fail(account != NULL, NULL);
+ gtkut_convert_int_to_gdk_color(prefs_common.default_header_bgcolor,
+ &default_header_bgcolor);
+ gtkut_convert_int_to_gdk_color(prefs_common.default_header_color,
+ &default_header_color);
+
debug_print("Creating compose window...\n");
compose = g_new0(Compose, 1);
gtk_widget_show(window);
}
- gtkut_convert_int_to_gdk_color(prefs_common.default_header_bgcolor,
- &default_header_bgcolor);
- gtkut_convert_int_to_gdk_color(prefs_common.default_header_color,
- &default_header_color);
-
return 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)
{
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");
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;