[gnome-settings-daemon] power: Do not use G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES when we want to read properties
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] power: Do not use G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES when we want to read properties
- Date: Fri, 16 Sep 2011 16:17:35 +0000 (UTC)
commit dfd4505e4ebd21d5c6b06c039852a4c13896b8e8
Author: Richard Hughes <richard hughsie com>
Date: Fri Sep 16 17:16:55 2011 +0100
power: Do not use G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES when we want to read properties
Hopefully resolves https://bugzilla.gnome.org/show_bug.cgi?id=659066
plugins/power/gsd-power-manager.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index f0b7d5b..b4f72aa 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2754,8 +2754,11 @@ idle_is_session_idle (GsdPowerManager *manager)
/* get the session status */
result = g_dbus_proxy_get_cached_property (manager->priv->session_presence_proxy,
"status");
- if (result == NULL)
+ if (result == NULL) {
+ g_warning ("no readable status property on %s",
+ g_dbus_proxy_get_interface_name (manager->priv->session_presence_proxy));
return FALSE;
+ }
g_variant_get (result, "u", &status);
ret = (status == SESSION_STATUS_CODE_IDLE);
@@ -2894,6 +2897,8 @@ idle_evaluate (GsdPowerManager *manager)
g_source_set_name_by_id (manager->priv->timeout_sleep_id,
"[GsdPowerManager] sleep");
}
+ } else {
+ g_debug ("session is not idle");
}
}
@@ -3334,7 +3339,7 @@ gsd_power_manager_start (GsdPowerManager *manager,
session_proxy_ready_cb,
manager);
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
- G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
+ 0,
NULL,
GNOME_SESSION_DBUS_NAME,
GNOME_SESSION_DBUS_PATH_PRESENCE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]