summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2021-12-24 01:17:17 +0000
committerAntónio Fernandes <antoniojpfernandes@gmail.com>2021-12-24 11:50:30 +0000
commitf4ee5c43c0e6f226189fdf98c1eb47c59ac9d753 (patch)
tree9683d3143f892e714450fdd2b705d006f6930be0
parent9d07df3b816c2da4595600b14429fe081e19c512 (diff)
downloadnautilus-f4ee5c43c0e6f226189fdf98c1eb47c59ac9d753.tar.gz
Stop using gtk_widget_new()
Gone in GTK 4. Just use g_object_new() and cast as necessary.
-rw-r--r--src/nautilus-location-entry.c2
-rw-r--r--src/nautilus-properties-window.c4
-rw-r--r--src/nautilus-toolbar.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/nautilus-location-entry.c b/src/nautilus-location-entry.c
index 8c2e1155a..2e06e6012 100644
--- a/src/nautilus-location-entry.c
+++ b/src/nautilus-location-entry.c
@@ -957,7 +957,7 @@ nautilus_location_entry_new (void)
{
GtkWidget *entry;
- entry = gtk_widget_new (NAUTILUS_TYPE_LOCATION_ENTRY, NULL);
+ entry = GTK_WIDGET (g_object_new (NAUTILUS_TYPE_LOCATION_ENTRY, NULL));
return entry;
}
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 998c6da91..87e5b118c 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -4705,8 +4705,8 @@ create_properties_window (StartupData *startup_data)
NautilusPropertiesWindow *window;
GList *l;
- window = NAUTILUS_PROPERTIES_WINDOW (gtk_widget_new (NAUTILUS_TYPE_PROPERTIES_WINDOW,
- NULL));
+ window = NAUTILUS_PROPERTIES_WINDOW (g_object_new (NAUTILUS_TYPE_PROPERTIES_WINDOW,
+ NULL));
window->original_files = nautilus_file_list_copy (startup_data->original_files);
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index ca699e721..c6b927280 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -900,7 +900,7 @@ nautilus_toolbar_constructed (GObject *object)
{
NautilusToolbar *self = NAUTILUS_TOOLBAR (object);
- self->path_bar = g_object_new (NAUTILUS_TYPE_PATH_BAR, NULL);
+ self->path_bar = GTK_WIDGET (g_object_new (NAUTILUS_TYPE_PATH_BAR, NULL));
gtk_box_append (GTK_BOX (self->path_bar_container),
self->path_bar);