diff --git a/plugins/housekeeping/gsd-disk-space.c b/plugins/housekeeping/gsd-disk-space.c
index 8c4d378..f474d96 100644
--- a/plugins/housekeeping/gsd-disk-space.c
+++ b/plugins/housekeeping/gsd-disk-space.c
@@ -209,7 +209,7 @@ ldsm_notify_for_mount (LdsmMountInfo *mount,
         g_object_ref (G_OBJECT (dialog));
         response = gtk_dialog_run (GTK_DIALOG (dialog));
 
-        gtk_object_destroy (GTK_OBJECT (dialog));
+        gtk_widget_destroy (GTK_WIDGET (dialog));
         dialog = NULL;
 
         switch (response) {
diff --git a/plugins/housekeeping/gsd-ldsm-trash-empty.c b/plugins/housekeeping/gsd-ldsm-trash-empty.c
index 38737b8..29fc007 100644
--- a/plugins/housekeeping/gsd-ldsm-trash-empty.c
+++ b/plugins/housekeeping/gsd-ldsm-trash-empty.c
@@ -318,7 +318,7 @@ trash_empty_confirmation_response (GtkDialog *dialog,
         if (response_id == GTK_RESPONSE_YES)
                 trash_empty_start ();
 
-        gtk_object_destroy (GTK_OBJECT (dialog));
+        gtk_widget_destroy (GTK_WIDGET (dialog));
         trash_empty_confirm_dialog = NULL;
 }
 
