summaryrefslogtreecommitdiff
path: root/src/nautilus-query-editor.c
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2022-04-21 11:49:19 +0100
committerAntónio Fernandes <antoniof@gnome.org>2022-06-30 18:47:04 +0100
commit06d110ac5ac98a97cfaf6bd087c891e39ba2563c (patch)
tree2d5d18ee43054f38c8885867c96e86ba123a8289 /src/nautilus-query-editor.c
parentc21904c53fc7ce53d3ecc3b9cb6a500f506ca6db (diff)
downloadnautilus-06d110ac5ac98a97cfaf6bd087c891e39ba2563c.tar.gz
query-editor: Drop inner boxes
NautilusQueryEditor itself is a horizontal box. However, it has a single child which is a vertical box, which in turn has a single child which is a horizontal box. There vertical box used to have another child, but it doesn't anymore, so the current arrangement is just silly.
Diffstat (limited to 'src/nautilus-query-editor.c')
-rw-r--r--src/nautilus-query-editor.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index 109022a07..ee34c624a 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -566,17 +566,7 @@ entry_tag_close_button_clicked (NautilusQueryEditor *editor,
static void
setup_widgets (NautilusQueryEditor *editor)
{
- GtkWidget *hbox;
- GtkWidget *vbox;
-
- /* vertical box that holds the search entry and the label below */
- vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
- gtk_box_append (GTK_BOX (editor), vbox);
-
- /* horizontal box */
- hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_style_context_add_class (gtk_widget_get_style_context (hbox), "linked");
- gtk_box_append (GTK_BOX (vbox), hbox);
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (editor)), "linked");
/* create the search entry */
#if 0 && TAGGED_ENTRY_NEEDS_GTK4_REIMPLEMENTATION
@@ -586,7 +576,7 @@ setup_widgets (NautilusQueryEditor *editor)
#endif
gtk_widget_set_hexpand (editor->entry, TRUE);
- gtk_box_append (GTK_BOX (hbox), editor->entry);
+ gtk_box_append (GTK_BOX (editor), editor->entry);
#if 0 && TAGGED_ENTRY_NEEDS_GTK4_REIMPLEMENTATION
editor->mime_types_tag = gd_tagged_entry_tag_new (NULL);
@@ -617,7 +607,7 @@ setup_widgets (NautilusQueryEditor *editor)
/* setup the filter menu button */
editor->dropdown_button = gtk_menu_button_new ();
gtk_menu_button_set_popover (GTK_MENU_BUTTON (editor->dropdown_button), editor->popover);
- gtk_box_append (GTK_BOX (hbox), editor->dropdown_button);
+ gtk_box_append (GTK_BOX (editor), editor->dropdown_button);
g_signal_connect (editor->entry, "activate",
G_CALLBACK (entry_activate_cb), editor);
@@ -633,9 +623,6 @@ setup_widgets (NautilusQueryEditor *editor)
G_CALLBACK (search_popover_time_type_changed_cb), editor);
g_signal_connect (editor->popover, "notify::fts-enabled",
G_CALLBACK (search_popover_fts_changed_cb), editor);
-
- /* show everything */
- gtk_widget_show (vbox);
}
static void