* 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 914f0bc5b81a0928a43993f0c6cca6488331dac1..3b32fca247e6e35c443630db4857472d123d7ecc 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 dace14abb5364e5ba33fba2f9742e6624f4ae501..8a9a76e1ecc72a9464ba7f2c5644369f5fd1fecb 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 c879dfad027e0d7337ab5df03bb7813002f0c651..6d824bfed27c046c161e238cc3073456486dee9c 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)