[epiphany/gnome-3-34] find-toolbar: Add Ctrl+Shift+G for finding previous items



commit a19160cf12a85d352223d0405b1d969fc9811361
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Wed Sep 25 13:00:07 2019 +0000

    find-toolbar: Add Ctrl+Shift+G for finding previous items
    
    The ability to find the next item with Ctrl+G was restored in commit
    4f4dfb67a3b05c654912d6a136d260cc8b908478, but Ctrl+Shift+G was not
    restored. This commit restores it and fixes Ctrl+G when Caps Lock is on
    by converting the key value to lower case before comparing.
    
    Fixes: https://gitlab.gnome.org/GNOME/epiphany/issues/918
    
    
    (cherry picked from commit 33742f3913bca55ff86581c9e6d782ff6e0d71f3)

 embed/ephy-find-toolbar.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/embed/ephy-find-toolbar.c b/embed/ephy-find-toolbar.c
index c1aa21d2a..02a7df9a3 100644
--- a/embed/ephy-find-toolbar.c
+++ b/embed/ephy-find-toolbar.c
@@ -263,9 +263,13 @@ entry_key_press_event_cb (GtkEntry        *entry,
               event->keyval == GDK_KEY_ISO_Enter)) {
     handled = ephy_find_toolbar_activate_link (toolbar, event->state);
   } else if ((event->state & mask) == GDK_CONTROL_MASK &&
-             (event->keyval == GDK_KEY_g)) {
+             (gdk_keyval_to_lower (event->keyval) == GDK_KEY_g)) {
     handled = TRUE;
     ephy_find_toolbar_find_next (toolbar);
+  } else if ((event->state & mask) == (GDK_CONTROL_MASK | GDK_SHIFT_MASK) &&
+             (gdk_keyval_to_lower (event->keyval) == GDK_KEY_g)) {
+    handled = TRUE;
+    ephy_find_toolbar_find_previous (toolbar);
   } else if ((event->state & mask) == GDK_SHIFT_MASK &&
              (event->keyval == GDK_KEY_Return ||
               event->keyval == GDK_KEY_KP_Enter ||


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]