[gtk/file-chooser-fixes: 5/5] filechooser: Make / work as shortcut again
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/file-chooser-fixes: 5/5] filechooser: Make / work as shortcut again
- Date: Sat, 27 Mar 2021 13:58:02 +0000 (UTC)
commit 8ea4721d1e280f65fe68a7e578972a0a8fd10500
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Mar 27 09:57:00 2021 -0400
filechooser: Make / work as shortcut again
Typing / is meant to open the location entry, so
prevent search from capturing that key.
gtk/gtkfilechooserwidget.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 0349a4f6ca..751357d435 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -7729,6 +7729,9 @@ captured_key (GtkEventControllerKey *controller,
impl->location_mode == LOCATION_MODE_FILENAME_ENTRY))
return GDK_EVENT_PROPAGATE;
+ if (keyval == GDK_KEY_slash)
+ return GDK_EVENT_PROPAGATE;
+
handled = gtk_event_controller_key_forward (controller, GTK_WIDGET (impl->search_entry));
if (handled == GDK_EVENT_STOP)
operation_mode_set (impl, OPERATION_MODE_SEARCH);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]