[glib] GApplication: document IS_SERVICE timeout properly
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GApplication: document IS_SERVICE timeout properly
- Date: Thu, 21 Feb 2013 15:00:42 +0000 (UTC)
commit 5bbca5fa0c96904542f286b55329820a9567a9c9
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Feb 21 14:58:32 2013 +0000
GApplication: document IS_SERVICE timeout properly
The documentation was suggesting that using G_APPLICATION_IS_SERVICE
would automatically set an inactivity timeout (ie: app stays around for
a while after the use count drops to zero).
In reality, it only adds an initial 10 second wait for the first
activation message to arrive after which it uses the normal inactivity
timeout mechanism.
gio/gapplication.c | 9 ++++++---
gio/gioenums.h | 5 +++--
2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index 29a5149d..36c91bd 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -1531,9 +1531,12 @@ g_application_open (GApplication *application,
* non-zero then the default main context is iterated until the use count
* falls to zero, at which point 0 is returned.
*
- * If the %G_APPLICATION_IS_SERVICE flag is set, then the exiting at
- * use count of zero is delayed for a while (ie: the instance stays
- * around to provide its <emphasis>service</emphasis> to others).
+ * If the %G_APPLICATION_IS_SERVICE flag is set, then the service will
+ * run for as much as 10 seconds with a use count of zero while waiting
+ * for the message that caused the activation to arrive. After that,
+ * if the use count falls to zero the application will exit immediately,
+ * except in the case that g_application_set_inactivity_timeout() is in
+ * use.
*
* Returns: the exit status
*
diff --git a/gio/gioenums.h b/gio/gioenums.h
index b76f7a6..3831ec9 100644
--- a/gio/gioenums.h
+++ b/gio/gioenums.h
@@ -1339,8 +1339,9 @@ typedef enum
* GApplicationFlags:
* @G_APPLICATION_FLAGS_NONE: Default
* @G_APPLICATION_IS_SERVICE: Run as a service. In this mode, registration
- * fails if the service is already running, and the application will
- * stay around for a while when the use count falls to zero.
+ * fails if the service is already running, and the application
+ * will initially wait up to 10 seconds for an initial activation
+ * message to arrive.
* @G_APPLICATION_IS_LAUNCHER: Don't try to become the primary instance.
* @G_APPLICATION_HANDLES_OPEN: This application handles opening files (in
* the primary instance). Note that this flag only affects the default
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]