2010-12-20 [colin] 3.7.8cvs14
authorColin Leroy <colin@colino.net>
Mon, 20 Dec 2010 12:56:33 +0000 (12:56 +0000)
committerColin Leroy <colin@colino.net>
Mon, 20 Dec 2010 12:56:33 +0000 (12:56 +0000)
* src/compose.c
Don't flush events when adding an header entry. This
can mess up the keypresses in the previous header.
Instead, make the scroll happen later (doing it on the
spot without flushing events doesn't work as the new
requisitions aren't set yet).

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index bbee5eb..6f03a09 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-12-20 [colin]     3.7.8cvs14
+
+       * src/compose.c
+               Don't flush events when adding an header entry. This
+               can mess up the keypresses in the previous header.
+               Instead, make the scroll happen later (doing it on the
+               spot without flushing events doesn't work as the new
+               requisitions aren't set yet).
+
 2010-12-20 [colin]     3.7.8cvs13
 
        * src/mainwindow.c
index 066864c..04d1c06 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.4.2.21 -r 1.4.2.22 src/ldapserver.c;  ) > 3.7.8cvs11.patchset
 ( cvs diff -u -r 1.1.4.10 -r 1.1.4.11 src/common/base64.c;  ) > 3.7.8cvs12.patchset
 ( cvs diff -u -r 1.274.2.319 -r 1.274.2.320 src/mainwindow.c;  ) > 3.7.8cvs13.patchset
+( cvs diff -u -r 1.382.2.562 -r 1.382.2.563 src/compose.c;  ) > 3.7.8cvs14.patchset
index 3a47a6a..076f448 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=13
+EXTRA_VERSION=14
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 9dd9ae9..572b0de 100644 (file)
@@ -499,7 +499,7 @@ static Compose *compose_generic_reply(MsgInfo *msginfo,
                                  gboolean followup_and_reply_to,
                                  const gchar *body);
 
-static gboolean compose_headerentry_changed_cb    (GtkWidget          *entry,
+static void compose_headerentry_changed_cb        (GtkWidget          *entry,
                                            ComposeHeaderEntry *headerentry);
 static gboolean compose_headerentry_key_press_event_cb(GtkWidget              *entry,
                                            GdkEventKey        *event,
@@ -10767,7 +10767,15 @@ static gboolean compose_headerentry_key_press_event_cb(GtkWidget *entry,
        return FALSE;
 }
 
-static gboolean compose_headerentry_changed_cb(GtkWidget *entry,
+static gboolean scroll_postpone(gpointer data)
+{
+       Compose *compose = (Compose *)data;
+       GTK_EVENTS_FLUSH();
+       compose_show_first_last_header(compose, FALSE);
+       return FALSE;
+}
+
+static void compose_headerentry_changed_cb(GtkWidget *entry,
                                    ComposeHeaderEntry *headerentry)
 {
        if (strlen(gtk_entry_get_text(GTK_ENTRY(entry))) != 0) {
@@ -10776,12 +10784,8 @@ static gboolean compose_headerentry_changed_cb(GtkWidget *entry,
                        (G_OBJECT(entry), G_SIGNAL_MATCH_DATA,
                         0, 0, NULL, NULL, headerentry);
                
-               /* Automatically scroll down */
-               GTK_EVENTS_FLUSH();
-               compose_show_first_last_header(headerentry->compose, FALSE);
-               
+               g_timeout_add(0, scroll_postpone, headerentry->compose);
        }
-       return FALSE;
 }
 
 static void compose_show_first_last_header(Compose *compose, gboolean show_first)