[gtk/file-chooser-fixes: 3/5] filechooser: Make Ctrl-L work again




commit 06ab8f2167955283ab43b6d2b0089f0f1f41dda0
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 27 09:53:43 2021 -0400

    filechooser: Make Ctrl-L work again
    
    Prevent search from preempting the Ctrl-L shortcut
    that is meant to show the location entry.

 gtk/gtkfilechooserwidget.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 6f612c1c63..a666d55ca1 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -7719,7 +7719,10 @@ captured_key (GtkEventControllerKey *controller,
   GtkFileChooserWidget *impl = data;
   gboolean handled;
 
-  if (impl->operation_mode == OPERATION_MODE_SEARCH)
+  if (impl->operation_mode == OPERATION_MODE_SEARCH ||
+      impl->operation_mode == OPERATION_MODE_ENTER_LOCATION ||
+      (impl->operation_mode == OPERATION_MODE_BROWSE &&
+       impl->location_mode == LOCATION_MODE_FILENAME_ENTRY))
     return GDK_EVENT_PROPAGATE;
 
   handled = gtk_event_controller_key_forward (controller, GTK_WIDGET (impl->search_entry));


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