From 82fcb51078f44932f2d43b3af6b6f20d24fb8030 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Sun, 4 Oct 2015 00:54:55 +0100 Subject: [PATCH] Add a GApplication::quit signal --- gio/gapplication.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gio/gapplication.c b/gio/gapplication.c index d0ac04475..752372810 100644 --- a/gio/gapplication.c +++ b/gio/gapplication.c @@ -276,6 +276,7 @@ enum SIGNAL_ACTION, SIGNAL_COMMAND_LINE, SIGNAL_HANDLE_LOCAL_OPTIONS, + SIGNAL_QUIT, NR_SIGNALS }; @@ -1408,7 +1409,6 @@ g_application_class_init (GApplicationClass *class) G_STRUCT_OFFSET (GApplicationClass, activate), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); - /** * GApplication::open: * @application: the application @@ -1425,6 +1425,20 @@ g_application_class_init (GApplicationClass *class) NULL, NULL, NULL, G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_INT, G_TYPE_STRING); + /** + * GApplication:quit: + * @application: the application + * + * The ::quit signal is emitted on the primary instance when the application + * is requested to terminate. See g_application_quit(). + * + * Since: 2.48 + */ + g_application_signals[SIGNAL_QUIT] = + g_signal_new (I_("quit"), G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GApplicationClass, quit), + NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + /** * GApplication::command-line: * @application: the application