[nautilus/revert-f3bc6634] Revert "window-slot: Move object cleanup to finalize"
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/revert-f3bc6634] Revert "window-slot: Move object cleanup to finalize"
- Date: Thu, 15 Mar 2018 20:13:36 +0000 (UTC)
commit b669bf5fd88ea290e5721540734d364ba165c89a
Author: Ernestas Kulik <ernestas kulik gmail com>
Date: Thu Mar 15 20:11:50 2018 +0000
Revert "window-slot: Move object cleanup to finalize"
This reverts commit f3bc66340ce4c67ddf9c5717714f2e97e6ab12fb
src/nautilus-window-slot.c | 37 ++++++++++++++++++-------------------
1 file changed, 18 insertions(+), 19 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index f76e7580f..01c48ac1c 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -2768,18 +2768,6 @@ change_view (NautilusWindowSlot *self)
static void
nautilus_window_slot_dispose (GObject *object)
-{
- NautilusWindowSlot *self;
-
- self = NAUTILUS_WINDOW_SLOT (object);
-
- g_signal_handlers_disconnect_by_data (nautilus_trash_monitor_get (), self);
-
- G_OBJECT_CLASS (nautilus_window_slot_parent_class)->dispose (object);
-}
-
-static void
-nautilus_window_slot_finalize (GObject *object)
{
NautilusWindowSlot *self;
GtkWidget *widget;
@@ -2793,31 +2781,41 @@ nautilus_window_slot_finalize (GObject *object)
nautilus_window_slot_remove_extra_location_widgets (self);
+ g_signal_handlers_disconnect_by_data (nautilus_trash_monitor_get (), self);
+
if (priv->content_view)
{
widget = GTK_WIDGET (priv->content_view);
gtk_widget_destroy (widget);
- g_clear_object (&priv->content_view);
+ g_object_unref (priv->content_view);
+ priv->content_view = NULL;
}
if (priv->new_content_view)
{
widget = GTK_WIDGET (priv->new_content_view);
gtk_widget_destroy (widget);
- g_clear_object (&priv->new_content_view);
+ g_object_unref (priv->new_content_view);
+ priv->new_content_view = NULL;
}
nautilus_window_slot_set_viewed_file (self, NULL);
g_clear_object (&priv->location);
g_clear_object (&priv->pending_file_to_activate);
- g_clear_pointer (&priv->pending_selection, nautilus_file_list_free);
+
+ nautilus_file_list_free (priv->pending_selection);
+ priv->pending_selection = NULL;
g_clear_object (&priv->current_location_bookmark);
g_clear_object (&priv->last_location_bookmark);
g_clear_object (&priv->slot_action_group);
- g_clear_pointer (&priv->find_mount_cancellable, g_cancellable_cancel);
+ if (priv->find_mount_cancellable != NULL)
+ {
+ g_cancellable_cancel (priv->find_mount_cancellable);
+ priv->find_mount_cancellable = NULL;
+ }
if (priv->window)
{
@@ -2825,10 +2823,12 @@ nautilus_window_slot_finalize (GObject *object)
priv->window = NULL;
}
- g_clear_pointer (&priv->title, g_free);
+ g_free (priv->title);
+ priv->title = NULL;
+
free_location_change (self);
- G_OBJECT_CLASS (nautilus_window_slot_parent_class)->finalize (object);
+ G_OBJECT_CLASS (nautilus_window_slot_parent_class)->dispose (object);
}
static void
@@ -2868,7 +2868,6 @@ nautilus_window_slot_class_init (NautilusWindowSlotClass *klass)
klass->handles_location = real_handles_location;
oclass->dispose = nautilus_window_slot_dispose;
- oclass->finalize = nautilus_window_slot_finalize;
oclass->constructed = nautilus_window_slot_constructed;
oclass->set_property = nautilus_window_slot_set_property;
oclass->get_property = nautilus_window_slot_get_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]