* src/compose.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Wed, 30 Jul 2003 20:28:52 +0000 (20:28 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Wed, 30 Jul 2003 20:28:52 +0000 (20:28 +0000)
don't do auto-save-draft inside key press handler, but rather
schedule it half of a second later; should fix #67, "autosave
make re-rediting message crazy"

ChangeLog.claws
configure.ac
src/compose.c

index 914f0bc..3b32fca 100644 (file)
@@ -1,3 +1,10 @@
+2003-07-30 [alfons]    0.9.3claws83
+
+       * src/compose.c
+               don't do auto-save-draft inside key press handler, but rather
+               schedule it half of a second later; should fix #67, "autosave 
+               make re-rediting message crazy"
+
 2003-07-30 [christoph] 0.9.3claws82
 
        * src/plugins/trayicon/trayicon.c
index dace14a..8a9a76e 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=82
+EXTRA_VERSION=83
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index c879dfa..6d824bf 100644 (file)
@@ -484,6 +484,7 @@ static void compose_check_forwards_go          (Compose *compose);
 #endif
 
 static gboolean compose_send_control_enter     (Compose        *compose);
+static gint compose_defer_auto_save_draft      (Compose        *compose);
 
 static GtkItemFactoryEntry compose_popup_entries[] =
 {
@@ -7014,10 +7015,15 @@ static void text_inserted(GtkWidget *widget, const gchar *text,
                                           compose);
        gtk_signal_emit_stop_by_name(GTK_OBJECT(editable), "insert_text");
 
-       
        if (prefs_common.autosave && 
            gtk_stext_get_length(GTK_STEXT(widget)) % prefs_common.autosave_length == 0)
-               compose_draft_cb((gpointer)compose, 2, NULL);
+               gtk_timeout_add(500, (GtkFunction) compose_defer_auto_save_draft, compose);
+}
+
+static gint compose_defer_auto_save_draft(Compose *compose)
+{
+       compose_draft_cb((gpointer)compose, 2, NULL);
+       return FALSE;
 }
 
 static gboolean compose_send_control_enter(Compose *compose)