[nautilus/wip/antoniof/new-list-view-continuation: 5/5] query-editor: Fix focus grab
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/new-list-view-continuation: 5/5] query-editor: Fix focus grab
- Date: Thu, 21 Apr 2022 09:56:50 +0000 (UTC)
commit ac1d86b3cd812697f1d0af0fc01d6fba28b6cca6
Author: António Fernandes <antoniof gnome org>
Date: Thu Apr 21 09:25:28 2022 +0100
query-editor: Fix focus grab
We have been calling gtk_entry_grab_focus_without_selecting(), but
GtkSearchEntry is not a GtkEntry subclass in GTK 4, so it fails.
GtkSearchEntry doesn't have an equivalent method because that's its
default focus behavior. So, gtk_widget_grab_focus() just works.
Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2094
src/nautilus-query-editor.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index 98d69f3b0..109022a07 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -154,8 +154,7 @@ nautilus_query_editor_grab_focus (GtkWidget *widget)
if (gtk_widget_get_visible (widget) && !gtk_widget_is_focus (editor->entry))
{
- /* avoid selecting the entry text */
- return gtk_entry_grab_focus_without_selecting (GTK_ENTRY (editor->entry));
+ return gtk_widget_grab_focus (editor->entry);
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]