summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2021-12-24 00:34:29 +0000
committerAntónio Fernandes <antoniof@gnome.org>2022-01-05 11:46:51 +0000
commitb7fb2d1022c9e92a78024e6a8cefb4174e2d38db (patch)
tree686e1faf5a296af148abb6afd05eafd6bf9f93c1
parent80b6f77d2bc1b9463dc0195f44c786f35478d826 (diff)
downloadnautilus-b7fb2d1022c9e92a78024e6a8cefb4174e2d38db.tar.gz
general: Stop using gtk_box_pack_start()
In preparation for a smoother GTK4 switch.
-rw-r--r--src/nautilus-floating-bar.c4
-rw-r--r--src/nautilus-list-view.c2
-rw-r--r--src/nautilus-notebook.c5
-rw-r--r--src/nautilus-properties-window.c3
-rw-r--r--src/nautilus-search-popover.c2
-rw-r--r--src/nautilus-window-slot.c5
-rw-r--r--src/nautilus-x-content-bar.c4
7 files changed, 13 insertions, 12 deletions
diff --git a/src/nautilus-floating-bar.c b/src/nautilus-floating-bar.c
index 88157a965..095e7288b 100644
--- a/src/nautilus-floating-bar.c
+++ b/src/nautilus-floating-bar.c
@@ -339,7 +339,7 @@ nautilus_floating_bar_constructed (GObject *obj)
box = GTK_WIDGET (obj);
w = gtk_spinner_new ();
- gtk_box_pack_start (GTK_BOX (box), w, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (box), w);
gtk_widget_set_visible (w, self->show_spinner);
/* As a workaround for https://gitlab.gnome.org/GNOME/gtk/-/issues/1025,
* ensure the spinner animates if and only if it's visible, to reduce CPU
@@ -353,7 +353,7 @@ nautilus_floating_bar_constructed (GObject *obj)
gtk_widget_set_margin_start (w, 8);
labels_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
- gtk_box_pack_start (GTK_BOX (box), labels_box, FALSE, TRUE, 0);
+ gtk_box_append (GTK_BOX (box), labels_box);
g_object_set (labels_box,
"hexpand", TRUE,
"margin-top", 2,
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 0647ba29f..74c8e6f4d 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -3299,7 +3299,7 @@ create_column_editor (NautilusListView *view)
column_chooser = nautilus_column_chooser_new (file);
gtk_widget_set_vexpand (column_chooser, TRUE);
- gtk_box_pack_start (GTK_BOX (box), column_chooser, FALSE, TRUE, 0);
+ gtk_box_append (GTK_BOX (box), column_chooser);
g_signal_connect (column_chooser, "changed",
G_CALLBACK (column_chooser_changed_callback),
diff --git a/src/nautilus-notebook.c b/src/nautilus-notebook.c
index d71e2f331..26e615430 100644
--- a/src/nautilus-notebook.c
+++ b/src/nautilus-notebook.c
@@ -29,6 +29,7 @@
#include "nautilus-window.h"
#include "nautilus-window-slot.h"
#include "nautilus-window-slot-dnd.h"
+#include "nautilus-gtk4-helpers.h"
#include <eel/eel-vfs-extensions.h>
#include <glib/gi18n.h>
@@ -250,11 +251,11 @@ build_tab_label (GtkNotebook *notebook,
/* Spinner to be shown as load feedback */
spinner = gtk_spinner_new ();
- gtk_box_pack_start (GTK_BOX (box), spinner, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (box), spinner);
/* Dummy icon to allocate space for spinner */
icon = gtk_image_new ();
- gtk_box_pack_start (GTK_BOX (box), icon, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (box), icon);
/* don't show the icon */
/* Tab title */
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index a9671c89f..c01c471ce 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -47,6 +47,7 @@
#include "nautilus-signaller.h"
#include "nautilus-ui-utilities.h"
#include "nautilus-signaller.h"
+#include "nautilus-gtk4-helpers.h"
static GHashTable *windows;
static GHashTable *pending_lists;
@@ -4624,7 +4625,7 @@ setup_app_chooser_area (NautilusPropertiesWindow *self)
self->app_chooser_widget = gtk_app_chooser_widget_new (self->content_type);
gtk_widget_set_vexpand (self->app_chooser_widget, TRUE);
- gtk_box_pack_start (GTK_BOX (self->app_chooser_widget_box), self->app_chooser_widget, FALSE, TRUE, 0);
+ gtk_box_append (GTK_BOX (self->app_chooser_widget_box), self->app_chooser_widget);
gtk_app_chooser_widget_set_show_default (GTK_APP_CHOOSER_WIDGET (self->app_chooser_widget), TRUE);
gtk_app_chooser_widget_set_show_fallback (GTK_APP_CHOOSER_WIDGET (self->app_chooser_widget), TRUE);
diff --git a/src/nautilus-search-popover.c b/src/nautilus-search-popover.c
index 48d248191..20fde2753 100644
--- a/src/nautilus-search-popover.c
+++ b/src/nautilus-search-popover.c
@@ -632,7 +632,7 @@ show_other_types_dialog (NautilusSearchPopover *popover)
gtk_widget_set_vexpand (scrolled, TRUE);
gtk_widget_show (scrolled);
- gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), scrolled, FALSE, TRUE, 0);
+ gtk_box_append (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), scrolled);
treeview = gtk_tree_view_new ();
gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (store));
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index e1d3ae810..16ae23a4a 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -669,8 +669,7 @@ static void
nautilus_window_slot_add_extra_location_widget (NautilusWindowSlot *self,
GtkWidget *widget)
{
- gtk_box_pack_start (GTK_BOX (self->extra_location_widgets),
- widget, FALSE, TRUE, 0);
+ gtk_box_append (GTK_BOX (self->extra_location_widgets), widget);
gtk_widget_show (self->extra_location_widgets);
}
@@ -900,7 +899,7 @@ nautilus_window_slot_constructed (GObject *object)
extras_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
self->extra_location_widgets = extras_vbox;
- gtk_box_pack_start (GTK_BOX (self), extras_vbox, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (self), extras_vbox);
gtk_widget_show (extras_vbox);
self->query_editor = NAUTILUS_QUERY_EDITOR (nautilus_query_editor_new ());
diff --git a/src/nautilus-x-content-bar.c b/src/nautilus-x-content-bar.c
index 8dec51f41..03fa0cade 100644
--- a/src/nautilus-x-content-bar.c
+++ b/src/nautilus-x-content-bar.c
@@ -196,9 +196,9 @@ nautilus_x_content_bar_set_x_content_types (NautilusXContentBar *bar,
if (image != NULL)
{
- gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (box), image);
}
- gtk_box_pack_start (GTK_BOX (box), gtk_label_new (name), FALSE, FALSE, 0);
+ gtk_box_append (GTK_BOX (box), gtk_label_new (name));
gtk_button_set_child (GTK_BUTTON (button), box);