[epiphany/wip/exalm/esc] find-toolbar: Stop handling Escape key




commit acc025cac1162adbca826732ec1d41ec17f739c7
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Mar 9 01:15:03 2021 +0500

    find-toolbar: Stop handling Escape key
    
    It's already handled by HdySearchBar.

 embed/ephy-find-toolbar.c | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)
---
diff --git a/embed/ephy-find-toolbar.c b/embed/ephy-find-toolbar.c
index ff640b28b..f8c36bbba 100644
--- a/embed/ephy-find-toolbar.c
+++ b/embed/ephy-find-toolbar.c
@@ -240,21 +240,10 @@ entry_key_press_event_cb (GtkEntry        *entry,
   guint mask = gtk_accelerator_get_default_mod_mask ();
   gboolean handled = FALSE;
 
-  if ((event->state & mask) == 0) {
-    handled = TRUE;
-    switch (event->keyval) {
-      case GDK_KEY_Escape:
-        /* Hide the toolbar when ESC is pressed */
-        ephy_find_toolbar_request_close (toolbar);
-        break;
-      default:
-        handled = FALSE;
-        break;
-    }
-  } else if ((event->state & mask) == GDK_CONTROL_MASK &&
-             (event->keyval == GDK_KEY_Return ||
-              event->keyval == GDK_KEY_KP_Enter ||
-              event->keyval == GDK_KEY_ISO_Enter)) {
+  if ((event->state & mask) == GDK_CONTROL_MASK &&
+      (event->keyval == GDK_KEY_Return ||
+       event->keyval == GDK_KEY_KP_Enter ||
+       event->keyval == GDK_KEY_ISO_Enter)) {
     handled = ephy_find_toolbar_activate_link (toolbar, event->state);
   } else if ((event->state & mask) == GDK_CONTROL_MASK &&
              (gdk_keyval_to_lower (event->keyval) == GDK_KEY_g)) {


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