summaryrefslogtreecommitdiff
path: root/src/nautilus-location-entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nautilus-location-entry.c')
-rw-r--r--src/nautilus-location-entry.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/nautilus-location-entry.c b/src/nautilus-location-entry.c
index 91b9ec7cb..4e1043396 100644
--- a/src/nautilus-location-entry.c
+++ b/src/nautilus-location-entry.c
@@ -576,18 +576,14 @@ finalize (GObject *object)
entry = NAUTILUS_LOCATION_ENTRY (object);
priv = nautilus_location_entry_get_instance_private (entry);
- g_object_unref (priv->completer);
g_free (priv->special_text);
-
- g_clear_object (&priv->last_location);
- g_clear_object (&priv->completion);
- g_clear_object (&priv->completions_store);
+ g_free (priv->current_directory);
G_OBJECT_CLASS (nautilus_location_entry_parent_class)->finalize (object);
}
static void
-destroy (GtkWidget *object)
+nautilus_location_entry_dispose (GObject *object)
{
NautilusLocationEntry *entry;
NautilusLocationEntryPrivate *priv;
@@ -602,10 +598,12 @@ destroy (GtkWidget *object)
priv->idle_id = 0;
}
- g_free (priv->current_directory);
- priv->current_directory = NULL;
+ g_clear_object (&priv->completer);
+ g_clear_object (&priv->last_location);
+ g_clear_object (&priv->completion);
+ g_clear_object (&priv->completions_store);
- GTK_WIDGET_CLASS (nautilus_location_entry_parent_class)->destroy (object);
+ G_OBJECT_CLASS (nautilus_location_entry_parent_class)->dispose (object);
}
static void
@@ -851,10 +849,10 @@ nautilus_location_entry_class_init (NautilusLocationEntryClass *class)
GtkBindingSet *binding_set;
widget_class = GTK_WIDGET_CLASS (class);
- widget_class->destroy = destroy;
widget_class->event = nautilus_location_entry_on_event;
gobject_class = G_OBJECT_CLASS (class);
+ gobject_class->dispose = nautilus_location_entry_dispose;
gobject_class->finalize = finalize;
entry_class = GTK_ENTRY_CLASS (class);