[balsa/wip/gmime3: 195/197] Fix the "scroll on click" issue
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gmime3: 195/197] Fix the "scroll on click" issue
- Date: Wed, 23 May 2018 21:28:46 +0000 (UTC)
commit 0d057891042f68ff128a2afe8ee7d7fb1db155d9
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Wed Apr 11 23:32:44 2018 -0400
Fix the "scroll on click" issue
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=795085
* src/balsa-message.c (balsa_message_init): wrap the
BalsaMimeWidget::widget in a GtkViewport; if we do not,
GtkContainer does it for us, but also sets it up to scroll when
first clicked, which leaves the wrong text under the pointer.
ChangeLog | 10 ++++++++++
src/balsa-message.c | 9 ++++++++-
2 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1b6d4bd..bb1449c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2018-04-11 Peter Bloomfield <pbloomfield bellsouth net>
+
+ Fix the "scroll on click" issue
+ (https://bugzilla.gnome.org/show_bug.cgi?id=795085)
+
+ * src/balsa-message.c (balsa_message_init): wrap the
+ BalsaMimeWidget::widget in a GtkViewport; if we do not,
+ GtkContainer does it for us, but also sets it up to scroll when
+ first clicked, which leaves the wrong text under the pointer.
+
2018-03-19 Peter Bloomfield <pbloomfield bellsouth net>
* libbalsa/imap/imap-commands.c (imap_mbox_handle_fetch_body):
diff --git a/src/balsa-message.c b/src/balsa-message.c
index 5508793..35e3a5f 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -691,6 +691,7 @@ balsa_message_init(BalsaMessage * bm)
GtkStack *stack;
GtkWidget *vbox;
GtkWidget *scroll;
+ GtkWidget *viewport;
GtkWidget **buttons;
GtkTreeStore *model;
GtkCellRenderer *renderer;
@@ -737,7 +738,13 @@ balsa_message_init(BalsaMessage * bm)
g_signal_connect(G_OBJECT(bm->bm_widget->widget), "focus_out_event",
G_CALLBACK(balsa_mime_widget_unlimit_focus),
(gpointer) bm);
- gtk_container_add(GTK_CONTAINER(bm->scroll), bm->bm_widget->widget);
+
+ /* If we do not add the widget to a viewport, GtkContainer would
+ * provide one, but it would also set it up to scroll on grab-focus,
+ * which has been really annoying for a long time :-( */
+ viewport = gtk_viewport_new(NULL, NULL);
+ gtk_container_add(GTK_CONTAINER(viewport), bm->bm_widget->widget);
+ gtk_container_add(GTK_CONTAINER(bm->scroll), viewport);
/* structure view */
model = gtk_tree_store_new (NUM_COLUMNS,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]