diff options
author | António Fernandes <antoniof@gnome.org> | 2021-12-23 17:35:23 +0000 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2022-01-02 12:48:43 +0000 |
commit | 998af677de1501b4b2bd4d95deca4fac619b0c4f (patch) | |
tree | 2dce60a52a2d115198a4b1971cbf061cde3ccbb3 | |
parent | b21feda789b55389ec1e9e961d4e7c67711e984d (diff) | |
download | nautilus-998af677de1501b4b2bd4d95deca4fac619b0c4f.tar.gz |
query-editor: HACK for search entry event forward
We should build our own custom entry instead of doing this.
-rw-r--r-- | src/nautilus-query-editor.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c index 727240a7c..ef15f11cf 100644 --- a/src/nautilus-query-editor.c +++ b/src/nautilus-query-editor.c @@ -804,6 +804,7 @@ nautilus_query_editor_handle_event (NautilusQueryEditor *self, guint keyval, GdkModifierType state) { + GtkWidget *text; g_return_val_if_fail (NAUTILUS_IS_QUERY_EDITOR (self), GDK_EVENT_PROPAGATE); g_return_val_if_fail (controller != NULL, GDK_EVENT_PROPAGATE); @@ -815,5 +816,19 @@ nautilus_query_editor_handle_event (NautilusQueryEditor *self, return GDK_EVENT_PROPAGATE; } - return gtk_event_controller_key_forward (controller, GTK_WIDGET (self->entry)); + text = gtk_widget_get_first_child (GTK_WIDGET (self->entry)); + while (text != NULL) + { + if (GTK_IS_TEXT (text)) + { + break; + } + text = gtk_widget_get_next_sibling (text); + } + + if (text == NULL) + { + return FALSE; + } + return gtk_event_controller_key_forward (controller, text); } |