[nautilus/wip/antoniof/experimental-gtk4-build: 10/52] general: Use gtk_window_destroy() instead of gtk_widget_destroy()
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/experimental-gtk4-build: 10/52] general: Use gtk_window_destroy() instead of gtk_widget_destroy()
- Date: Fri, 31 Dec 2021 23:58:44 +0000 (UTC)
commit 0d7de893b8b0478ec5efd05bcde34b01e786bdbd
Author: António Fernandes <antoniof gnome org>
Date: Fri Dec 17 16:11:18 2021 +0000
general: Use gtk_window_destroy() instead of gtk_widget_destroy()
eel/eel-stock-dialogs.c | 8 ++++----
src/nautilus-application.c | 2 +-
src/nautilus-autorun-software.c | 6 +++---
src/nautilus-batch-rename-dialog.c | 4 ++--
src/nautilus-compress-dialog-controller.c | 2 +-
src/nautilus-file-operations.c | 4 ++--
src/nautilus-files-view.c | 8 ++++----
src/nautilus-list-view.c | 2 +-
src/nautilus-location-entry.c | 2 +-
src/nautilus-mime-actions.c | 14 +++++++-------
src/nautilus-new-folder-dialog-controller.c | 2 +-
src/nautilus-operations-ui-manager.c | 6 +++---
src/nautilus-places-view.c | 2 +-
src/nautilus-properties-window.c | 6 +++---
src/nautilus-search-popover.c | 2 +-
src/nautilus-ui-utilities.c | 2 +-
src/nautilus-window-slot.c | 4 ++--
src/nautilus-window.c | 2 +-
18 files changed, 39 insertions(+), 39 deletions(-)
---
diff --git a/eel/eel-stock-dialogs.c b/eel/eel-stock-dialogs.c
index 9e10eb28a..eb1f542fa 100644
--- a/eel/eel-stock-dialogs.c
+++ b/eel/eel-stock-dialogs.c
@@ -101,7 +101,7 @@ timed_wait_delayed_close_timeout_callback (gpointer callback_data)
G_CALLBACK (timed_wait_delayed_close_destroy_dialog_callback),
GUINT_TO_POINTER (handler_id));
- gtk_widget_destroy (GTK_WIDGET (callback_data));
+ gtk_window_destroy (GTK_WINDOW (callback_data));
return FALSE;
}
@@ -151,7 +151,7 @@ timed_wait_free (TimedWait *wait)
}
else
{
- gtk_widget_destroy (GTK_WIDGET (wait->dialog));
+ gtk_window_destroy (GTK_WINDOW (wait->dialog));
}
}
@@ -187,7 +187,7 @@ trash_dialog_response_callback (GtkDialog *dialog,
int response_id,
TimedWait *wait)
{
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static gboolean
@@ -414,7 +414,7 @@ show_message_dialog (const char *primary_text,
gtk_widget_show (GTK_WIDGET (dialog));
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
return dialog;
}
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index f7b0061b2..57faee94c 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -776,7 +776,7 @@ action_help (GSimpleAction *action,
_("There was an error displaying help: \n%s"),
error->message);
g_signal_connect (G_OBJECT (dialog), "response",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
NULL);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
diff --git a/src/nautilus-autorun-software.c b/src/nautilus-autorun-software.c
index 91fb0ccc0..beba189e4 100644
--- a/src/nautilus-autorun-software.c
+++ b/src/nautilus-autorun-software.c
@@ -47,7 +47,7 @@ autorun_software_dialog_destroy (AutorunSoftwareDialogData *data)
G_CALLBACK (autorun_software_dialog_mount_unmounted),
data);
- gtk_widget_destroy (GTK_WIDGET (data->dialog));
+ gtk_window_destroy (GTK_WINDOW (data->dialog));
g_object_unref (data->mount);
g_free (data);
}
@@ -159,7 +159,7 @@ out:
g_signal_connect (dialog,
"response",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
NULL);
gtk_widget_show_all (dialog);
@@ -171,7 +171,7 @@ autorun_software_dialog_response (GtkDialog *dialog,
gint response_id,
GMount *mount)
{
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
if (response_id == GTK_RESPONSE_OK)
{
diff --git a/src/nautilus-batch-rename-dialog.c b/src/nautilus-batch-rename-dialog.c
index 9bb16e0c1..2b4d8093b 100644
--- a/src/nautilus-batch-rename-dialog.c
+++ b/src/nautilus-batch-rename-dialog.c
@@ -668,7 +668,7 @@ prepare_batch_rename (NautilusBatchRenameDialog *dialog)
gtk_widget_hide (GTK_WIDGET (dialog));
begin_batch_rename (dialog, dialog->new_names);
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -687,7 +687,7 @@ batch_rename_dialog_on_response (NautilusBatchRenameDialog *dialog,
cancel_conflict_check (dialog);
}
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
}
diff --git a/src/nautilus-compress-dialog-controller.c b/src/nautilus-compress-dialog-controller.c
index 839b527cb..d6c33948d 100644
--- a/src/nautilus-compress-dialog-controller.c
+++ b/src/nautilus-compress-dialog-controller.c
@@ -533,7 +533,7 @@ nautilus_compress_dialog_controller_finalize (GObject *object)
if (self->compress_dialog != NULL)
{
g_clear_signal_handler (&self->response_handler_id, self->compress_dialog);
- gtk_widget_destroy (self->compress_dialog);
+ gtk_window_destroy (GTK_WINDOW (self->compress_dialog));
self->compress_dialog = NULL;
}
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index 0e9a19b21..0421ec052 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -1326,7 +1326,7 @@ simple_dialog_cb (GtkDialog *dialog,
return;
}
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
data->result = response_id;
data->completed = TRUE;
@@ -3079,7 +3079,7 @@ empty_trash_prompt_cb (GtkDialog *dialog,
unmount_data_free (data);
}
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
void
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 6e0ccfd63..f080f0438 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1435,7 +1435,7 @@ app_chooser_dialog_response_cb (GtkDialog *dialog,
g_object_unref (info);
out:
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -1696,7 +1696,7 @@ pattern_select_response_cb (GtkWidget *dialog,
case GTK_RESPONSE_DELETE_EVENT:
case GTK_RESPONSE_CANCEL:
{
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
break;
@@ -5854,7 +5854,7 @@ on_destination_dialog_response (GtkDialog *dialog,
}
copy_data_free (copy_data);
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -6311,7 +6311,7 @@ on_extract_destination_dialog_response (GtkDialog *dialog,
extract_files (data->view, data->files, destination_directory);
}
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
nautilus_file_list_free (data->files);
g_free (data);
}
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index ee96ba626..1186c3f91 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -3615,7 +3615,7 @@ nautilus_list_view_finalize (GObject *object)
if (list_view->details->column_editor != NULL)
{
- gtk_widget_destroy (list_view->details->column_editor);
+ gtk_window_destroy (GTK_WINDOW (list_view->details->column_editor));
}
g_regex_unref (list_view->details->regex);
diff --git a/src/nautilus-location-entry.c b/src/nautilus-location-entry.c
index 5d3e3643c..65130d51c 100644
--- a/src/nautilus-location-entry.c
+++ b/src/nautilus-location-entry.c
@@ -284,7 +284,7 @@ confirm_multiple_windows_cb (GtkDialog *dialog,
open_multiple = (response_id == GTK_RESPONSE_OK);
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
do_open_windows (data, open_multiple);
gtk_drag_finish (data->context, open_multiple, FALSE, data->time);
}
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index 255055b7d..7a88865f4 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -563,7 +563,7 @@ trash_symbolic_link_cb (GtkDialog *dialog,
GList file_as_list;
data = user_data;
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
if (response_id == GTK_RESPONSE_YES)
{
@@ -1023,7 +1023,7 @@ on_confirm_multiple_windows_response (GtkDialog *dialog,
int response_id,
ActivateParameters *parameters)
{
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
if (response_id == GTK_RESPONSE_YES)
{
@@ -1109,7 +1109,7 @@ open_with_response_cb (GtkDialog *dialog,
if (response_id != GTK_RESPONSE_OK)
{
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
return;
}
@@ -1117,7 +1117,7 @@ open_with_response_cb (GtkDialog *dialog,
file = g_object_get_data (G_OBJECT (dialog), "mime-action:file");
info = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (dialog));
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
g_signal_emit_by_name (nautilus_signaller_get_current (), "mime-data-changed");
@@ -1143,7 +1143,7 @@ choose_program (GtkDialog *message_dialog,
if (response != GTK_RESPONSE_ACCEPT)
{
- gtk_widget_destroy (GTK_WIDGET (message_dialog));
+ gtk_window_destroy (GTK_WINDOW (message_dialog));
activate_parameters_install_free (parameters);
return;
}
@@ -1156,7 +1156,7 @@ choose_program (GtkDialog *message_dialog,
nautilus_file_ref (file);
/* Destroy the message dialog after ref:ing the file */
- gtk_widget_destroy (GTK_WIDGET (message_dialog));
+ gtk_window_destroy (GTK_WINDOW (message_dialog));
dialog = gtk_app_chooser_dialog_new (parameters->parent_window,
GTK_DIALOG_MODAL,
@@ -1306,7 +1306,7 @@ application_unhandled_file_install (GtkDialog *dialog,
{
char *mime_type;
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
parameters_install->dialog = NULL;
if (response_id == GTK_RESPONSE_YES)
diff --git a/src/nautilus-new-folder-dialog-controller.c b/src/nautilus-new-folder-dialog-controller.c
index 17406a016..c6c1a8b42 100644
--- a/src/nautilus-new-folder-dialog-controller.c
+++ b/src/nautilus-new-folder-dialog-controller.c
@@ -172,7 +172,7 @@ nautilus_new_folder_dialog_controller_finalize (GObject *object)
if (self->new_folder_dialog != NULL)
{
g_clear_signal_handler (&self->response_handler_id, self->new_folder_dialog);
- gtk_widget_destroy (self->new_folder_dialog);
+ gtk_window_destroy (GTK_WINDOW (self->new_folder_dialog));
self->new_folder_dialog = NULL;
}
diff --git a/src/nautilus-operations-ui-manager.c b/src/nautilus-operations-ui-manager.c
index 7d4225785..afabe4f73 100644
--- a/src/nautilus-operations-ui-manager.c
+++ b/src/nautilus-operations-ui-manager.c
@@ -463,7 +463,7 @@ on_conflict_dialog_response (GtkDialog *dialog,
data->response->id = response_id;
- gtk_widget_destroy (GTK_WIDGET (data->dialog));
+ gtk_window_destroy (GTK_WINDOW (data->dialog));
nautilus_file_unref (data->source);
nautilus_file_unref (data->destination);
@@ -561,7 +561,7 @@ on_app_chooser_response (GtkDialog *dialog,
application = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (dialog));
}
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
if (application != NULL)
{
@@ -641,7 +641,7 @@ on_request_passphrase_cb (GtkDialog *dialog,
data->passphrase = g_strdup (gtk_entry_get_text (data->passphrase_entry));
}
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
invoke_main_context_completed (data);
}
diff --git a/src/nautilus-places-view.c b/src/nautilus-places-view.c
index 7ba5296fa..eca8bff2b 100644
--- a/src/nautilus-places-view.c
+++ b/src/nautilus-places-view.c
@@ -135,7 +135,7 @@ show_error_message_cb (NautilusGtkPlacesView *view,
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"%s", secondary);
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show_all (dialog);
}
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
index 339ad5a34..90f0c501e 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -1185,7 +1185,7 @@ update_files_callback (gpointer data)
if (self->original_files == NULL)
{
/* Close the window if no files are left */
- gtk_widget_destroy (GTK_WIDGET (self));
+ gtk_window_destroy (GTK_WINDOW (self));
}
else
{
@@ -3899,7 +3899,7 @@ on_change_permissions_response (GtkDialog *dialog,
if (response != GTK_RESPONSE_OK)
{
g_clear_pointer (&self->change_permission_combos, g_list_free);
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
return;
}
@@ -3977,7 +3977,7 @@ on_change_permissions_response (GtkDialog *dialog,
}
}
g_clear_pointer (&self->change_permission_combos, g_list_free);
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
diff --git a/src/nautilus-search-popover.c b/src/nautilus-search-popover.c
index fd77a911f..e5f4ce9d7 100644
--- a/src/nautilus-search-popover.c
+++ b/src/nautilus-search-popover.c
@@ -574,7 +574,7 @@ on_other_types_dialog_response (GtkDialog *dialog,
}
g_clear_object (&popover->treeview);
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
diff --git a/src/nautilus-ui-utilities.c b/src/nautilus-ui-utilities.c
index 60d667a57..6153d3f1f 100644
--- a/src/nautilus-ui-utilities.c
+++ b/src/nautilus-ui-utilities.c
@@ -333,7 +333,7 @@ show_dialog (const gchar *primary_text,
gtk_widget_show (dialog);
g_signal_connect (GTK_DIALOG (dialog), "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
return GTK_DIALOG (dialog);
}
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 909143e30..bf9fa156c 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -1862,13 +1862,13 @@ got_file_info_for_view_selection_callback (NautilusFile *file,
}
else
{
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
}
}
else
{
/* Since this is a window, destroying it will also unref it. */
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
}
}
else
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index aa090059a..41b48f71a 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -2271,7 +2271,7 @@ nautilus_window_close (NautilusWindow *window)
nautilus_window_save_geometry (window);
nautilus_window_set_active_slot (window, NULL);
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]