talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit ed86a604f218474a4606a2ea2447a6494aa9d31f
parent a821e42bdb6ab57efe1e793f28016b2fbb10a703
Author: Colin Leroy <colin@colino.net>
Date:   Mon, 20 Dec 2010 12:56:33 +0000

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).

Diffstat:
MChangeLog | 9+++++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/compose.c | 18+++++++++++-------
4 files changed, 22 insertions(+), 8 deletions(-)

diff --git 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 diff --git a/PATCHSETS b/PATCHSETS @@ -4087,3 +4087,4 @@ ( 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 diff --git a/configure.ac b/configure.ac @@ -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= diff --git a/src/compose.c b/src/compose.c @@ -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)