examples: Port to async dialog API

This commit is contained in:
Matthias Clasen 2022-10-28 23:07:12 -04:00
parent 4248380538
commit 8bee62dd36

View File

@ -6,19 +6,11 @@ action_activated (GSimpleAction *action,
gpointer user_data)
{
GtkWindow *parent = user_data;
GtkWidget *dialog;
GtkAlertDialog *dialog;
dialog = gtk_message_dialog_new (parent,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE,
"Activated action `%s`",
g_action_get_name (G_ACTION (action)));
g_signal_connect_swapped (dialog, "response",
G_CALLBACK (gtk_window_destroy), dialog);
gtk_widget_show (dialog);
dialog = gtk_alert_dialog_new ("Activated action `%s`", g_action_get_name (G_ACTION (action)));
gtk_alert_dialog_show (dialog, NULL);
g_object_unref (dialog);
}
static GActionEntry doc_entries[] = {