From 013f862a03d11708bb08f2ec98c8612f245a8937 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 23 Oct 2010 14:04:28 +0200 Subject: [PATCH] Properly register the inactivity-timeout property It is a uint, not a boolean, so register it as such. Also, only install the service timeout if we are actually registered as the primary instance. --- gio/gapplication.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gio/gapplication.c b/gio/gapplication.c index f79302fb8..c2554c47e 100644 --- a/gio/gapplication.c +++ b/gio/gapplication.c @@ -482,10 +482,11 @@ g_application_class_init (GApplicationClass *class) FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_INACTIVITY_TIMEOUT, - g_param_spec_boolean ("inactivity-timeout", - P_("Inactivity timeout"), - P_("Iime (ms) to stay alive after becoming idle"), - FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + g_param_spec_uint ("inactivity-timeout", + P_("Inactivity timeout"), + P_("Iime (ms) to stay alive after becoming idle"), + 0, G_MAXUINT, 0, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_ACTION_GROUP, g_param_spec_object ("action-group", @@ -1159,6 +1160,7 @@ g_application_run (GApplication *application, g_strfreev (arguments); if (application->priv->flags & G_APPLICATION_IS_SERVICE && + application->priv->is_registered && !application->priv->use_count && !application->priv->inactivity_timeout_id) {