summaryrefslogtreecommitdiff
path: root/examples/bloatpad.c
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-02-21 01:15:50 +0100
committerRyan Lortie <desrt@desrt.ca>2012-02-21 01:23:01 +0100
commit8ec0cfd571da29b02dbdd3464cd9508ebec4cac1 (patch)
treeb6700bdd22a9238d873bd9b99158f25f35297601 /examples/bloatpad.c
parentef2df583f2459bf38690db24fc476eb5f2654360 (diff)
downloadgtk+-8ec0cfd571da29b02dbdd3464cd9508ebec4cac1.tar.gz
bloatpad: adjust to G(tk)Application 'quit' change
https://bugzilla.gnome.org/show_bug.cgi?id=670485
Diffstat (limited to 'examples/bloatpad.c')
-rw-r--r--examples/bloatpad.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/examples/bloatpad.c b/examples/bloatpad.c
index 3b5654e957..d5f872f681 100644
--- a/examples/bloatpad.c
+++ b/examples/bloatpad.c
@@ -225,33 +225,13 @@ about_activated (GSimpleAction *action,
}
static void
-quit_app (GtkApplication *app)
-{
- GList *list, *next;
- GtkWindow *win;
-
- g_print ("Going down...\n");
-
- list = gtk_application_get_windows (app);
- while (list)
- {
- win = list->data;
- next = list->next;
-
- gtk_widget_destroy (GTK_WIDGET (win));
-
- list = next;
- }
-}
-
-static void
quit_activated (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
- GtkApplication *app = user_data;
+ GApplication *app = user_data;
- quit_app (app);
+ g_application_quit (app);
}
static GActionEntry app_entries[] = {
@@ -347,14 +327,6 @@ bloat_pad_class_init (BloatPadClass *class)
}
-static void
-quit_cb (GtkApplication *app)
-{
- g_print ("Session manager to us to quit\n");
-
- quit_app (app);
-}
-
BloatPad *
bloat_pad_new (void)
{
@@ -371,8 +343,6 @@ bloat_pad_new (void)
"register-session", TRUE,
NULL);
- g_signal_connect (bloat_pad, "quit", G_CALLBACK (quit_cb), NULL);
-
return bloat_pad;
}