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 bbee5eb21f6dd09f28adc902309f95a6b89ac917..6f03a09cc92ea9a87c748de32e12364e853dbc1d 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 066864c9dbd1840a298612576f39186b40402aab..04d1c06befa838dc49b0702d3c62f36e897a43f1 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 3a47a6aa959083c0d087826ee48d162af4f675b9..076f44855918c0ea19fd281f0090d7de6ec06e45 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 9dd9ae99d1109df3ffa6ad276a7d2939c3a9cfab..572b0de6a54eac6bc62b988a6ea8ddda15d46be9 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)