Compare commits

...

1 Commits

Author SHA1 Message Date
Nelson Benítez León
b91474616b Fix open location entry when pressing '~' or '.'
Recent changes in GTK default input method
makes ~ char to start as dead key, that's
why filechooser stopped detecting it for the
keybinding to open location entry.

Filechooser also installs keybinding to open
location entry on period (.) character, that
was failing too, so we also fixed that.

Fixes #4911
2022-08-21 15:16:21 -04:00

View File

@@ -7618,6 +7618,10 @@ gtk_file_chooser_widget_class_init (GtkFileChooserWidgetClass *class)
GDK_KEY_asciitilde, 0,
trigger_location_entry,
"s", "~");
gtk_widget_class_add_binding (widget_class,
GDK_KEY_dead_tilde, 0,
trigger_location_entry,
"s", "~");
for (i = 0; i < G_N_ELEMENTS (quick_bookmark_keyvals); i++)
gtk_widget_class_add_binding_signal (widget_class,
@@ -7729,7 +7733,7 @@ captured_key (GtkEventControllerKey *controller,
impl->location_mode == LOCATION_MODE_FILENAME_ENTRY))
return GDK_EVENT_PROPAGATE;
if (keyval == GDK_KEY_slash)
if (keyval == GDK_KEY_slash || keyval == GDK_KEY_asciitilde || keyval == GDK_KEY_dead_tilde || keyval == GDK_KEY_period)
return GDK_EVENT_PROPAGATE;
handled = gtk_event_controller_key_forward (controller, GTK_WIDGET (impl->search_entry));