[nautilus/wip/antoniof/reimplement-search-tags: 17/22] query-editor: Drop inner boxes
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/reimplement-search-tags: 17/22] query-editor: Drop inner boxes
- Date: Thu, 30 Jun 2022 17:47:09 +0000 (UTC)
commit 06d110ac5ac98a97cfaf6bd087c891e39ba2563c
Author: António Fernandes <antoniof gnome org>
Date: Thu Apr 21 11:49:19 2022 +0100
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.
src/nautilus-query-editor.c | 19 +++----------------
1 file 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]