[evince/dont_grab_focus_from_mouse: 3/3] Bookmarks: Dont let buttons grab focus from mouse click
- From: Nelson Ben <nbenitez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince/dont_grab_focus_from_mouse: 3/3] Bookmarks: Dont let buttons grab focus from mouse click
- Date: Sun, 16 Jan 2022 21:27:17 +0000 (UTC)
commit 968f99831342a89d4894cd766657eb803cf74397
Author: Nelson Benítez León <nbenitezl gmail com>
Date: Sun Jan 16 16:28:44 2022 -0400
Bookmarks: Dont let buttons grab focus from mouse click
Currently the '+' and '-' buttons in the Bookmarks sidebar
are grabbing focus when clicked with the mouse. That
should not happen and instead the focus be kept in the
previous widget (tipically the main EvView).
This fix is in same spirit as this one:
https://gitlab.gnome.org/GNOME/evince/-/commit/78b5ef0601cf4e9c56c5795b27399e6fcf2265e7
Part of issue #704
shell/ev-sidebar-bookmarks.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/shell/ev-sidebar-bookmarks.c b/shell/ev-sidebar-bookmarks.c
index b57c44401..f477125e6 100644
--- a/shell/ev-sidebar-bookmarks.c
+++ b/shell/ev-sidebar-bookmarks.c
@@ -494,6 +494,7 @@ ev_sidebar_bookmarks_init (EvSidebarBookmarks *sidebar_bookmarks)
atk_object_set_name (gtk_widget_get_accessible (priv->add_button), _("Add bookmark"));
gtk_actionable_set_action_name (GTK_ACTIONABLE (priv->add_button),
"win.add-bookmark");
+ gtk_widget_set_focus_on_click (priv->add_button, FALSE);
gtk_widget_set_sensitive (priv->add_button, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), priv->add_button, FALSE, FALSE, 0);
gtk_widget_show (priv->add_button);
@@ -504,6 +505,7 @@ ev_sidebar_bookmarks_init (EvSidebarBookmarks *sidebar_bookmarks)
g_signal_connect (priv->del_button, "clicked",
G_CALLBACK (ev_sidebar_bookmarks_del_clicked),
sidebar_bookmarks);
+ gtk_widget_set_focus_on_click (priv->del_button, FALSE);
gtk_widget_set_sensitive (priv->del_button, FALSE);
gtk_box_pack_start (GTK_BOX (hbox), priv->del_button, FALSE, FALSE, 0);
gtk_widget_show (priv->del_button);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]