forked from AuroraMiddleware/gtk
examples: Port to async dialog API
This commit is contained in:
parent
4248380538
commit
8bee62dd36
@ -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[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user