Use gtk_window_destroy
Replace calls to gtk_widget_destroy on windows with gtk_window_destroy.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user