[balsa] Fix the "scroll on click" issue
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] Fix the "scroll on click" issue
- Date: Thu, 12 Apr 2018 03:34:20 +0000 (UTC)
commit 97bf83fe23647c375d3733d6e9a31e0b87f0aac0
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 6ab5133..0344c62 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 fadaf61..b7af6ca 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]