mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 15:48:54 +02:00
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.
This commit is contained in:
@@ -482,10 +482,11 @@ g_application_class_init (GApplicationClass *class)
|
|||||||
FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_INACTIVITY_TIMEOUT,
|
g_object_class_install_property (object_class, PROP_INACTIVITY_TIMEOUT,
|
||||||
g_param_spec_boolean ("inactivity-timeout",
|
g_param_spec_uint ("inactivity-timeout",
|
||||||
P_("Inactivity timeout"),
|
P_("Inactivity timeout"),
|
||||||
P_("Iime (ms) to stay alive after becoming idle"),
|
P_("Iime (ms) to stay alive after becoming idle"),
|
||||||
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
0, G_MAXUINT, 0,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_ACTION_GROUP,
|
g_object_class_install_property (object_class, PROP_ACTION_GROUP,
|
||||||
g_param_spec_object ("action-group",
|
g_param_spec_object ("action-group",
|
||||||
@@ -1159,6 +1160,7 @@ g_application_run (GApplication *application,
|
|||||||
g_strfreev (arguments);
|
g_strfreev (arguments);
|
||||||
|
|
||||||
if (application->priv->flags & G_APPLICATION_IS_SERVICE &&
|
if (application->priv->flags & G_APPLICATION_IS_SERVICE &&
|
||||||
|
application->priv->is_registered &&
|
||||||
!application->priv->use_count &&
|
!application->priv->use_count &&
|
||||||
!application->priv->inactivity_timeout_id)
|
!application->priv->inactivity_timeout_id)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user