bloatpad: adjust to G(tk)Application 'quit' change
https://bugzilla.gnome.org/show_bug.cgi?id=670485
This commit is contained in:
@@ -224,34 +224,14 @@ about_activated (GSimpleAction *action,
|
|||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
static void
|
||||||
quit_activated (GSimpleAction *action,
|
quit_activated (GSimpleAction *action,
|
||||||
GVariant *parameter,
|
GVariant *parameter,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkApplication *app = user_data;
|
GApplication *app = user_data;
|
||||||
|
|
||||||
quit_app (app);
|
g_application_quit (app);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GActionEntry app_entries[] = {
|
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 *
|
BloatPad *
|
||||||
bloat_pad_new (void)
|
bloat_pad_new (void)
|
||||||
{
|
{
|
||||||
@@ -371,8 +343,6 @@ bloat_pad_new (void)
|
|||||||
"register-session", TRUE,
|
"register-session", TRUE,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
g_signal_connect (bloat_pad, "quit", G_CALLBACK (quit_cb), NULL);
|
|
||||||
|
|
||||||
return bloat_pad;
|
return bloat_pad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user