[file-roller/wip/gtk4: 2/54] gtk4: removed use of gtk_widget_destroy




commit 0f27ddbaae8e64b9c16d07767d24e4344d7c0d53
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Sep 26 22:05:57 2022 +0200

    gtk4: removed use of gtk_widget_destroy

 src/dlg-add.c                     | 10 ++++----
 src/dlg-ask-password.c            |  4 ++--
 src/dlg-batch-add.c               |  2 +-
 src/dlg-delete.c                  |  4 ++--
 src/dlg-extract.c                 | 16 ++++++-------
 src/dlg-open-with.c               |  4 ++--
 src/dlg-package-installer.c       |  2 +-
 src/dlg-password.c                |  2 +-
 src/dlg-update.c                  |  6 ++---
 src/fr-new-archive-dialog.c       | 16 ++++++-------
 src/fr-window-actions-callbacks.c |  4 ++--
 src/fr-window.c                   | 50 +++++++++++++++++++--------------------
 src/gtk-utils.c                   |  6 ++---
 13 files changed, 63 insertions(+), 63 deletions(-)
---
diff --git a/src/dlg-add.c b/src/dlg-add.c
index 9fdf407f..dc6580f2 100644
--- a/src/dlg-add.c
+++ b/src/dlg-add.c
@@ -80,7 +80,7 @@ file_selector_response_cb (GtkDialog *dialog,
        dlg_add_folder_save_last_options (data);
 
        if ((response == GTK_RESPONSE_CANCEL) || (response == GTK_RESPONSE_DELETE_EVENT)) {
-               gtk_widget_destroy (data->dialog);
+               gtk_window_destroy (GTK_WINDOW (data->dialog));
                return;
        }
 
@@ -101,7 +101,7 @@ file_selector_response_cb (GtkDialog *dialog,
                                           _("Could not add the files to the archive"),
                                           _("You don’t have the right permissions to read files from folder 
“%s”"),
                                           utf8_path);
-               g_signal_connect (GTK_MESSAGE_DIALOG (d), "response", G_CALLBACK (gtk_widget_destroy), NULL);
+               g_signal_connect (GTK_MESSAGE_DIALOG (d), "response", G_CALLBACK (gtk_window_destroy), NULL);
                gtk_widget_show (d);
                return;
        }
@@ -136,7 +136,7 @@ file_selector_response_cb (GtkDialog *dialog,
        _g_object_list_unref (files);
        g_object_unref (current_folder);
 
-       gtk_widget_destroy (data->dialog);
+       gtk_window_destroy (GTK_WINDOW (data->dialog));
 
        return;
 }
@@ -622,7 +622,7 @@ aod_apply_cb (GtkButton *button,
        dlg_add_folder_load_options (data, options_name);
        g_free (options_name);
 
-       gtk_widget_destroy (aod_data->dialog);
+       gtk_window_destroy (GTK_WINDOW (aod_data->dialog));
 }
 
 
@@ -779,7 +779,7 @@ load_options_activate_cb (GSimpleAction *action,
                          aod_data);
        g_signal_connect_swapped (GTK_BUTTON (cancel_button),
                                  "clicked",
-                                 G_CALLBACK (gtk_widget_destroy),
+                                 G_CALLBACK (gtk_window_destroy),
                                  aod_data->dialog);
        g_signal_connect (GTK_BUTTON (ok_button),
                          "clicked",
diff --git a/src/dlg-ask-password.c b/src/dlg-ask-password.c
index a67066f0..b57008aa 100644
--- a/src/dlg-ask-password.c
+++ b/src/dlg-ask-password.c
@@ -82,13 +82,13 @@ ask_password__response_cb (GtkDialog  *dialog,
        default:
                fr_window_dnd_extraction_finished (data->window, TRUE);
                if (fr_window_is_batch_mode (data->window))
-                       gtk_widget_destroy (GTK_WIDGET (data->window));
+                       gtk_window_destroy (GTK_WINDOW (data->window));
                else
                        fr_window_reset_current_action (data->window);
                break;
        }
 
-       gtk_widget_destroy (data->dialog);
+       gtk_window_destroy (GTK_WINDOW (data->dialog));
 }
 
 
diff --git a/src/dlg-batch-add.c b/src/dlg-batch-add.c
index 6eb37c82..eda1739b 100644
--- a/src/dlg-batch-add.c
+++ b/src/dlg-batch-add.c
@@ -54,7 +54,7 @@ dialog_response_cb (GtkDialog *dialog,
        else
                fr_window_batch_stop (window);
 
-       gtk_widget_destroy (GTK_WIDGET (dialog));
+       gtk_window_destroy (GTK_WINDOW (dialog));
 }
 
 
diff --git a/src/dlg-delete.c b/src/dlg-delete.c
index bd64a0e3..6d620fff 100644
--- a/src/dlg-delete.c
+++ b/src/dlg-delete.c
@@ -91,7 +91,7 @@ response_cb (GtkDialog  *widget,
        }
 
        /* close the dialog. */
-       gtk_widget_destroy (data->dialog);
+       gtk_window_destroy (GTK_WINDOW (data->dialog));
 }
 
 
@@ -166,7 +166,7 @@ dlg_delete__common (FrWindow *window,
                          data);
 //     g_signal_connect_swapped (GTK_BUTTON (cancel_button),
 //                               "clicked",
-//                               G_CALLBACK (gtk_widget_destroy),
+//                               G_CALLBACK (gtk_window_destroy),
 //                               G_OBJECT (data->dialog));
 //     g_signal_connect (GTK_BUTTON (ok_button),
 //                       "clicked",
diff --git a/src/dlg-extract.c b/src/dlg-extract.c
index c754b116..720922da 100644
--- a/src/dlg-extract.c
+++ b/src/dlg-extract.c
@@ -115,7 +115,7 @@ create_destination_response_cb (GtkDialog    *dialog,
                      int           response,
                      DialogData   *data)
 {
-       gtk_widget_destroy (GTK_WIDGET (dialog));
+       gtk_window_destroy (GTK_WINDOW (dialog));
 
        if (response != GTK_RESPONSE_YES) {
                data->do_not_extract = TRUE;
@@ -138,7 +138,7 @@ extract_cb_possibly_try_to_create_destination_directory (DialogData  *data)
                                           _("Extraction not performed"),
                                           _("Could not create the destination folder: %s."),
                                           error->message);
-               g_signal_connect (GTK_MESSAGE_DIALOG (d), "response", G_CALLBACK (gtk_widget_destroy), NULL);
+               g_signal_connect (GTK_MESSAGE_DIALOG (d), "response", G_CALLBACK (gtk_window_destroy), NULL);
                gtk_widget_show (d);
        } else {
                extract_cb_check_whether_preparing_destination_failed (data);
@@ -151,10 +151,10 @@ extraction_not_performed_cb (GtkDialog    *dialog,
                      int           response,
                      DialogData   *data)
 {
-       gtk_widget_destroy (GTK_WIDGET (dialog));
+       gtk_window_destroy (GTK_WINDOW (dialog));
 
        if (fr_window_is_batch_mode (data->window)) {
-               gtk_widget_destroy (data->dialog);
+               gtk_window_destroy (GTK_WINDOW (data->dialog));
        }
 }
 
@@ -199,7 +199,7 @@ extract_cb_check_permissions (DialogData  *data)
                                           _("Extraction not performed"),
                                           _("You don’t have the right permissions to extract archives in the 
folder “%s”"),
                                           utf8_path);
-               g_signal_connect (GTK_MESSAGE_DIALOG (d), "response", G_CALLBACK (gtk_widget_destroy), NULL);
+               g_signal_connect (GTK_MESSAGE_DIALOG (d), "response", G_CALLBACK (gtk_window_destroy), NULL);
                gtk_widget_show (d);
        } else {
                extract_cb_start_extracting (data);
@@ -245,7 +245,7 @@ extract_cb_start_extracting (DialogData *data)
                pattern = gtk_entry_get_text (GTK_ENTRY (GET_WIDGET ("file_pattern_entry")));
                file_list = fr_window_get_file_list_pattern (window, pattern);
                if (file_list == NULL) {
-                       gtk_widget_destroy (data->dialog);
+                       gtk_window_destroy (GTK_WINDOW (data->dialog));
                        return;
                }
        }
@@ -260,7 +260,7 @@ extract_cb_start_extracting (DialogData *data)
        /* close the dialog. */
 
        data->destination = NULL; /* do not free when destroying the dialog. */
-       gtk_widget_destroy (data->dialog);
+       gtk_window_destroy (GTK_WINDOW (data->dialog));
 
        /* extract ! */
 
@@ -284,7 +284,7 @@ file_selector_response_cb (GtkDialog    *dialog,
                      DialogData   *data)
 {
        if ((response == GTK_RESPONSE_CANCEL) || (response == GTK_RESPONSE_DELETE_EVENT)) {
-               gtk_widget_destroy (data->dialog);
+               gtk_window_destroy (GTK_WINDOW (data->dialog));
        } else if (response == GTK_RESPONSE_OK) {
                extract_cb (dialog, data);
        }
diff --git a/src/dlg-open-with.c b/src/dlg-open-with.c
index 8b4fe9f9..1dfead1e 100644
--- a/src/dlg-open-with.c
+++ b/src/dlg-open-with.c
@@ -76,13 +76,13 @@ app_chooser_response_cb (GtkDialog *dialog,
                        g_object_unref (app_info);
                }
                g_free (o_data);
-               gtk_widget_destroy (GTK_WIDGET (dialog));
+               gtk_window_destroy (GTK_WINDOW (dialog));
                break;
 
        case GTK_RESPONSE_CANCEL:
        case GTK_RESPONSE_DELETE_EVENT:
                g_free (o_data);
-               gtk_widget_destroy (GTK_WIDGET (dialog));
+               gtk_window_destroy (GTK_WINDOW (dialog));
                break;
 
        default:
diff --git a/src/dlg-package-installer.c b/src/dlg-package-installer.c
index f0a34bdb..e9eed908 100644
--- a/src/dlg-package-installer.c
+++ b/src/dlg-package-installer.c
@@ -236,7 +236,7 @@ confirm_search_dialog_response_cb (GtkDialog *dialog,
 {
        InstallerData *idata = user_data;
 
-       gtk_widget_destroy (GTK_WIDGET (dialog));
+       gtk_window_destroy (GTK_WINDOW (dialog));
 
        if (response_id == GTK_RESPONSE_YES) {
                install_packages (idata);
diff --git a/src/dlg-password.c b/src/dlg-password.c
index a7664203..9cb319ec 100644
--- a/src/dlg-password.c
+++ b/src/dlg-password.c
@@ -65,7 +65,7 @@ response_cb (GtkDialog  *dialog,
                g_free (password);
        }
 
-       gtk_widget_destroy (data->dialog);
+       gtk_window_destroy (GTK_WINDOW (data->dialog));
 }
 
 
diff --git a/src/dlg-update.c b/src/dlg-update.c
index 63887301..ee272423 100644
--- a/src/dlg-update.c
+++ b/src/dlg-update.c
@@ -107,9 +107,9 @@ execute_update (DialogData *data)
 
                n_files = g_list_length (data->file_list);
                if (n_files == 1)
-                       gtk_widget_destroy (data->update_file_dialog);
+                       gtk_window_destroy (GTK_WINDOW (data->update_file_dialog));
                else
-                       gtk_widget_destroy (data->update_files_dialog);
+                       gtk_window_destroy (GTK_WINDOW (data->update_files_dialog));
        }
        if (selection != NULL)
                g_list_free (selection);
@@ -276,7 +276,7 @@ update_dialog_response (GtkDialog   *dialog,
        switch (response_id) {
        case GTK_RESPONSE_CANCEL:
        case GTK_RESPONSE_DELETE_EVENT:
-               gtk_widget_destroy (GTK_WIDGET (dialog));
+               gtk_window_destroy (GTK_WINDOW (dialog));
                break;
 
        case DIALOG_RESPONSE_UPDATE:
diff --git a/src/fr-new-archive-dialog.c b/src/fr-new-archive-dialog.c
index 31188f1a..5f55d237 100644
--- a/src/fr-new-archive-dialog.c
+++ b/src/fr-new-archive-dialog.c
@@ -353,7 +353,7 @@ fr_new_archive_dialog_get_file (FrNewArchiveDialog  *self,
                                           "%s",
                                           _("You have to specify an archive name."));
                gtk_dialog_run (GTK_DIALOG (d));
-               gtk_widget_destroy (GTK_WIDGET (d));
+               gtk_window_destroy (GTK_WINDOW (d));
 
                return NULL;
        }
@@ -372,7 +372,7 @@ fr_new_archive_dialog_get_file (FrNewArchiveDialog  *self,
                                           "%s",
                                           _("You have to specify an archive name."));
                gtk_dialog_run (GTK_DIALOG (d));
-               gtk_widget_destroy (GTK_WIDGET (d));
+               gtk_window_destroy (GTK_WINDOW (d));
 
                return NULL;
        }
@@ -389,7 +389,7 @@ fr_new_archive_dialog_get_file (FrNewArchiveDialog  *self,
                                                error->message);
                gtk_dialog_run (GTK_DIALOG (dialog));
 
-               gtk_widget_destroy (GTK_WIDGET (dialog));
+               gtk_window_destroy (GTK_WINDOW (dialog));
                g_error_free (error);
                g_free (basename_ext);
                g_object_unref (parent);
@@ -438,7 +438,7 @@ fr_new_archive_dialog_get_file (FrNewArchiveDialog  *self,
                                                _("You don’t have permission to create an archive in this 
folder"));
                gtk_dialog_run (GTK_DIALOG (dialog));
 
-               gtk_widget_destroy (GTK_WIDGET (dialog));
+               gtk_window_destroy (GTK_WINDOW (dialog));
                g_object_unref (parent_info);
                g_object_unref (file);
 
@@ -456,7 +456,7 @@ fr_new_archive_dialog_get_file (FrNewArchiveDialog  *self,
                                                _("New name is the same as old one, please type other 
name."));
                gtk_dialog_run (GTK_DIALOG (dialog));
 
-               gtk_widget_destroy (GTK_WIDGET (dialog));
+               gtk_window_destroy (GTK_WINDOW (dialog));
                g_object_unref (parent_info);
                g_object_unref (file);
 
@@ -478,7 +478,7 @@ fr_new_archive_dialog_get_file (FrNewArchiveDialog  *self,
                                                                _("You can’t add an archive to itself."));
                                gtk_dialog_run (GTK_DIALOG (dialog));
 
-                               gtk_widget_destroy (GTK_WIDGET (dialog));
+                               gtk_window_destroy (GTK_WINDOW (dialog));
                                g_object_unref (parent_info);
                                g_object_unref (file);
 
@@ -507,7 +507,7 @@ fr_new_archive_dialog_get_file (FrNewArchiveDialog  *self,
                                                  NULL);
                overwrite = gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK;
 
-               gtk_widget_destroy (dialog);
+               gtk_window_destroy (GTK_WINDOW (dialog));
                g_free (secondary_message);
                g_free (message);
                g_free (filename);
@@ -523,7 +523,7 @@ fr_new_archive_dialog_get_file (FrNewArchiveDialog  *self,
                                                                error->message);
                                gtk_dialog_run (GTK_DIALOG (dialog));
 
-                               gtk_widget_destroy (GTK_WIDGET (dialog));
+                               gtk_window_destroy (GTK_WINDOW (dialog));
                                g_error_free (error);
                                g_object_unref (parent_info);
                                g_object_unref (file);
diff --git a/src/fr-window-actions-callbacks.c b/src/fr-window-actions-callbacks.c
index 1f72253b..379fed76 100644
--- a/src/fr-window-actions-callbacks.c
+++ b/src/fr-window-actions-callbacks.c
@@ -260,7 +260,7 @@ window_archive_loaded_cb (FrWindow  *window,
 {
        if (success) {
                g_signal_handlers_disconnect_by_data (window, file_sel);
-               gtk_widget_destroy (file_sel);
+               gtk_window_destroy (GTK_WINDOW (file_sel));
        }
        else {
                FrWindow *original_window =  g_object_get_data (G_OBJECT (file_sel), "fr_window");
@@ -279,7 +279,7 @@ open_file_response_cb (GtkDialog *dialog,
        GFile    *file;
 
        if ((response == GTK_RESPONSE_CANCEL) || (response == GTK_RESPONSE_DELETE_EVENT)) {
-               gtk_widget_destroy (file_sel);
+               gtk_window_destroy (GTK_WINDOW (file_sel));
                return;
        }
 
diff --git a/src/fr-window.c b/src/fr-window.c
index 54cf3952..30bf0a89 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -599,7 +599,7 @@ fr_window_close (FrWindow *window)
                        g_settings_set_int (private->settings_listing, PREF_LISTING_NAME_COLUMN_WIDTH, width);
        }
 
-       gtk_widget_destroy (GTK_WIDGET (window));
+       gtk_window_destroy (GTK_WINDOW (window));
 }
 
 
@@ -2158,7 +2158,7 @@ show_folder (GtkWindow *parent_window,
                                           "%s",
                                           error->message);
                gtk_dialog_run (GTK_DIALOG (d));
-               gtk_widget_destroy (d);
+               gtk_window_destroy (GTK_WINDOW (d));
 
                g_free (message);
                g_clear_error (&error);
@@ -2720,7 +2720,7 @@ fr_window_close_confirmation_dialog (FrWindow  *window,
                                     GtkDialog *dialog)
 {
        FrWindowPrivate *private = fr_window_get_instance_private (window);
-       gtk_widget_destroy (GTK_WIDGET (dialog));
+       gtk_window_destroy (GTK_WINDOW (dialog));
        if (private->batch_mode && private->destroy_with_confirmation_dialog)
                _fr_window_close_after_notification (window);
 }
@@ -2891,7 +2891,7 @@ error_dialog_response_cb (GtkDialog *dialog,
        FrWindowPrivate *private = fr_window_get_instance_private (window);
 
        private->showing_error_dialog = FALSE;
-       gtk_widget_destroy (GTK_WIDGET (dialog));
+       gtk_window_destroy (GTK_WINDOW (dialog));
 
        if (private->destroy_with_error_dialog) {
                if (private->batch_mode) {
@@ -2900,7 +2900,7 @@ error_dialog_response_cb (GtkDialog *dialog,
                                       0,
                                       NULL);
                }
-               gtk_widget_destroy (GTK_WIDGET (window));
+               gtk_window_destroy (GTK_WINDOW (window));
        }
 }
 
@@ -2921,7 +2921,7 @@ fr_window_show_error_dialog (FrWindow   *window,
                               0,
                               error);
 
-               gtk_widget_destroy (GTK_WIDGET (window));
+               gtk_window_destroy (GTK_WINDOW (window));
 
                return;
        }
@@ -4132,7 +4132,7 @@ new_archive_dialog_response_cb (GtkDialog *dialog,
        int         volume_size;
 
        if ((response == GTK_RESPONSE_CANCEL) || (response == GTK_RESPONSE_DELETE_EVENT)) {
-               gtk_widget_destroy (GTK_WIDGET (dialog));
+               gtk_window_destroy (GTK_WINDOW (dialog));
                _archive_operation_cancelled (window, FR_ACTION_CREATING_NEW_ARCHIVE);
                return;
        }
@@ -4160,10 +4160,10 @@ new_archive_dialog_response_cb (GtkDialog *dialog,
                                                   mime_type,
                                                   GTK_WINDOW (dialog)))
        {
-               gtk_widget_destroy (GTK_WIDGET (dialog));
+               gtk_window_destroy (GTK_WINDOW (dialog));
        }
        else if (new_window)
-               gtk_widget_destroy (archive_window);
+               gtk_window_destroy (GTK_WINDOW (archive_window));
 
        g_object_unref (file);
 }
@@ -4226,7 +4226,7 @@ fr_window_drag_data_received  (GtkWidget          *widget,
                                           _("Could not perform the operation"),
                                           NULL);
                gtk_dialog_run (GTK_DIALOG (d));
-               gtk_widget_destroy(d);
+               gtk_window_destroy (GTK_WINDOW (d));
 
                return;
        }
@@ -4258,7 +4258,7 @@ fr_window_drag_data_received  (GtkWidget          *widget,
                        gtk_dialog_set_default_response (GTK_DIALOG (d), 2);
 
                        r = gtk_dialog_run (GTK_DIALOG (d));
-                       gtk_widget_destroy (GTK_WIDGET (d));
+                       gtk_window_destroy (GTK_WINDOW (d));
 
                        if (r == 0)  /* Add */
                                fr_window_archive_add_dropped_items (window, list);
@@ -4285,7 +4285,7 @@ fr_window_drag_data_received  (GtkWidget          *widget,
 
                        gtk_dialog_set_default_response (GTK_DIALOG (d), GTK_RESPONSE_YES);
                        r = gtk_dialog_run (GTK_DIALOG (d));
-                       gtk_widget_destroy (GTK_WIDGET (d));
+                       gtk_window_destroy (GTK_WINDOW (d));
 
                        if (r == GTK_RESPONSE_YES) {
                                GFile     *first_file;
@@ -5491,7 +5491,7 @@ fr_window_attach (FrWindow      *window,
        case FR_WINDOW_AREA_CONTENTS:
                position = 4;
                if (private->contents != NULL)
-                       gtk_widget_destroy (private->contents);
+                       g_object_unref (private->contents);
                private->contents = child;
                gtk_widget_set_vexpand (child, TRUE);
                break;
@@ -6681,7 +6681,7 @@ overwrite_dialog_response_cb (GtkDialog *dialog,
                break;
        }
 
-       gtk_widget_destroy (GTK_WIDGET (dialog));
+       gtk_window_destroy (GTK_WINDOW (dialog));
 
        if (do_not_extract) {
                fr_window_batch_stop (odata->window);
@@ -6916,7 +6916,7 @@ _fr_window_archive_extract_from_edata_maybe (FrWindow    *window,
 
                        gtk_dialog_set_default_response (GTK_DIALOG (d), GTK_RESPONSE_YES);
                        r = gtk_dialog_run (GTK_DIALOG (d));
-                       gtk_widget_destroy (GTK_WIDGET (d));
+                       gtk_window_destroy (GTK_WINDOW (d));
 
                        g_free (msg);
 
@@ -7661,7 +7661,7 @@ fr_window_archive_save_as (FrWindow   *window,
                                           "%s",
                                           _("Archive type not supported."));
                gtk_dialog_run (GTK_DIALOG (d));
-               gtk_widget_destroy (d);
+               gtk_window_destroy (GTK_WINDOW (d));
 
                g_free (message);
 
@@ -7731,7 +7731,7 @@ save_as_archive_dialog_response_cb (GtkDialog *dialog,
        GSettings  *settings;
 
        if ((response == GTK_RESPONSE_CANCEL) || (response == GTK_RESPONSE_DELETE_EVENT)) {
-               gtk_widget_destroy (GTK_WIDGET (dialog));
+               gtk_window_destroy (GTK_WINDOW (dialog));
                _archive_operation_cancelled (window, FR_ACTION_CREATING_ARCHIVE);
                return;
        }
@@ -7753,7 +7753,7 @@ save_as_archive_dialog_response_cb (GtkDialog *dialog,
 
        fr_window_archive_save_as (window, file, mime_type, password, encrypt_header, volume_size);
 
-       gtk_widget_destroy (GTK_WIDGET (dialog));
+       gtk_window_destroy (GTK_WINDOW (dialog));
        g_object_unref (file);
 }
 
@@ -8023,7 +8023,7 @@ fr_window_archive_encrypt (FrWindow   *window,
                                           "%s",
                                           _("Archive type not supported."));
                gtk_dialog_run (GTK_DIALOG (d));
-               gtk_widget_destroy (d);
+               gtk_window_destroy (GTK_WINDOW (d));
 
                g_free (message);
                g_object_unref (temp_new_file);
@@ -8155,7 +8155,7 @@ fr_window_view_last_output (FrWindow   *window,
 
        g_signal_connect (GTK_DIALOG (dialog),
                          "response",
-                         G_CALLBACK (gtk_widget_destroy),
+                         G_CALLBACK (gtk_window_destroy),
                          NULL);
 
        g_signal_connect (GTK_DIALOG (dialog),
@@ -8474,7 +8474,7 @@ fr_window_rename_selection (FrWindow *window,
                                                     "%s",
                                                     reason);
                        gtk_dialog_run (GTK_DIALOG (dlg));
-                       gtk_widget_destroy (dlg);
+                       gtk_window_destroy (GTK_WINDOW (dlg));
 
                        g_free (reason);
                        g_free (utf8_name);
@@ -8493,7 +8493,7 @@ fr_window_rename_selection (FrWindow *window,
                                                       _GTK_LABEL_CLOSE, GTK_RESPONSE_OK,
                                                       NULL);
                        gtk_dialog_run (GTK_DIALOG (dlg));
-                       gtk_widget_destroy (dlg);
+                       gtk_window_destroy (GTK_WINDOW (dlg));
                        g_free (reason);
                        g_free (new_name);
                        goto retry__rename_selection;
@@ -9737,11 +9737,11 @@ fr_window_exec_batch_action (FrWindow      *window,
                        FrWindowPrivate *private = fr_window_get_instance_private (window);
 
                        if ((private->progress_dialog != NULL) && (gtk_widget_get_parent 
(private->progress_dialog) != GTK_WIDGET (window))) {
-                               gtk_widget_destroy (private->progress_dialog);
+                               gtk_window_destroy (GTK_WINDOW (private->progress_dialog));
                                private->progress_dialog = NULL;
                        }
                }
-               gtk_widget_destroy (GTK_WIDGET (window));
+               gtk_window_destroy (GTK_WINDOW (window));
                break;
 
        default:
@@ -9903,7 +9903,7 @@ fr_window_batch_stop (FrWindow *window)
                               fr_window_signals[READY],
                               0,
                               NULL);
-               gtk_widget_destroy (GTK_WIDGET (window));
+               gtk_window_destroy (GTK_WINDOW (window));
        }
 }
 
diff --git a/src/gtk-utils.c b/src/gtk-utils.c
index 6ac7ab7a..551f34a3 100644
--- a/src/gtk-utils.c
+++ b/src/gtk-utils.c
@@ -149,7 +149,7 @@ _gtk_request_dialog_run (GtkWindow      *parent,
        else
                result = NULL;
 
-       gtk_widget_destroy (dialog);
+       gtk_window_destroy (GTK_WINDOW (dialog));
 
        return result;
 }
@@ -270,7 +270,7 @@ _gtk_error_dialog_run (GtkWindow  *parent,
        g_free (message);
 
        g_signal_connect (GTK_MESSAGE_DIALOG (d), "response",
-                         G_CALLBACK (gtk_widget_destroy),
+                         G_CALLBACK (gtk_window_destroy),
                          NULL);
 
        gtk_widget_show (d);
@@ -373,7 +373,7 @@ _gtk_show_help_dialog (GtkWindow  *parent,
                gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
 
                g_signal_connect (GTK_MESSAGE_DIALOG (dialog), "response",
-                                 G_CALLBACK (gtk_widget_destroy),
+                                 G_CALLBACK (gtk_window_destroy),
                                  NULL);
 
                gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]