Use gtk_window_destroy

Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
This commit is contained in:
Matthias Clasen
2020-05-09 10:26:22 -04:00
parent 48821a64d0
commit cd0081d08a
137 changed files with 364 additions and 368 deletions

View File

@@ -16,7 +16,7 @@ action_activated (GSimpleAction *action,
g_action_get_name (G_ACTION (action)));
g_signal_connect_swapped (dialog, "response",
G_CALLBACK (gtk_widget_destroy), dialog);
G_CALLBACK (gtk_window_destroy), dialog);
gtk_widget_show (dialog);
}

View File

@@ -374,7 +374,7 @@ response (GtkDialog *dialog,
if (response_id == GTK_RESPONSE_CLOSE)
{
gtk_widget_destroy (GTK_WIDGET (dialog));
gtk_window_destroy (GTK_WINDOW (dialog));
return;
}

View File

@@ -42,7 +42,7 @@ activate (GtkApplication *app,
gtk_grid_attach (GTK_GRID (grid), button, 1, 0, 1, 1);
button = gtk_button_new_with_label ("Quit");
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_destroy), window);
/* Place the Quit button in the grid cell (0, 1), and make it
* span 2 columns.

View File

@@ -24,7 +24,7 @@ activate (GtkApplication *app,
button = gtk_button_new_with_label ("Hello World");
g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL);
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_destroy), window);
gtk_container_add (GTK_CONTAINER (box), button);
gtk_widget_show (window);

View File

@@ -173,7 +173,7 @@ quit_app (GSimpleAction *action,
win = list->data;
next = list->next;
gtk_widget_destroy (GTK_WIDGET (win));
gtk_window_destroy (GTK_WINDOW (win));
list = next;
}
@@ -382,7 +382,7 @@ configure_plugins (GSimpleAction *action,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), plugin_enabled ("black"));
g_signal_connect (check, "toggled", G_CALLBACK (enable_or_disable_plugin), (char *) "black");
g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
gtk_window_present (GTK_WINDOW (dialog));

View File

@@ -101,7 +101,7 @@ quit_app (GSimpleAction *action,
win = list->data;
next = list->next;
gtk_widget_destroy (GTK_WIDGET (win));
gtk_window_destroy (GTK_WINDOW (win));
list = next;
}