[nautilus/wip/antoniof/gtk4-pre-switch-simplification] Stop using gtk_widget_new()
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gtk4-pre-switch-simplification] Stop using gtk_widget_new()
- Date: Fri, 24 Dec 2021 03:27:19 +0000 (UTC)
commit 68712321bf6966aff59a8f118830b5c72bdf73a6
Author: António Fernandes <antoniof gnome org>
Date: Fri Dec 24 01:17:17 2021 +0000
Stop using gtk_widget_new()
Gone in GTK 4. Just use g_object_new() and cast as necessary.
src/nautilus-location-entry.c | 2 +-
src/nautilus-properties-window.c | 4 ++--
src/nautilus-toolbar.c | 2 +-
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]