[glib/wip/ebassi/application-quit: 3/4] Add a GApplication::quit signal
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/ebassi/application-quit: 3/4] Add a GApplication::quit signal
- Date: Tue, 6 Oct 2015 11:28:28 +0000 (UTC)
commit 82fcb51078f44932f2d43b3af6b6f20d24fb8030
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sun Oct 4 00:54:55 2015 +0100
Add a GApplication::quit signal
gio/gapplication.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index d0ac044..7523728 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
@@ -1426,6 +1426,20 @@ g_application_class_init (GApplicationClass *class)
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
* @command_line: a #GApplicationCommandLine representing the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]