gnome-power-manager r3189 - in trunk: . src
- From: rhughes svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-power-manager r3189 - in trunk: . src
- Date: Tue, 27 Jan 2009 15:51:55 +0000 (UTC)
Author: rhughes
Date: Tue Jan 27 15:51:54 2009
New Revision: 3189
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=3189&view=rev
Log:
2009-01-27 Richard Hughes <hughsie localhost localdomain>
* src/gpm-session.c (gpm_session_is_idle):
Fix up the logic for the session manager.
Modified:
trunk/ChangeLog
trunk/src/gpm-session.c
Modified: trunk/src/gpm-session.c
==============================================================================
--- trunk/src/gpm-session.c (original)
+++ trunk/src/gpm-session.c Tue Jan 27 15:51:54 2009
@@ -35,11 +35,11 @@
#define GPM_SESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_SESSION, GpmSessionPrivate))
-#define GPM_SESSION_MANAGER_SERVICE "org.gnome.Session"
-#define GPM_SESSION_MANAGER_PATH "/org/gnome/Session"
-#define GPM_SESSION_MANAGER_INTERFACE "org.gnome.Session"
-#define GPM_SESSION_MANAGER_PRESENCE_PATH "/org/gnome/Session/Presence"
-#define GPM_SESSION_MANAGER_PRESENCE_INTERFACE "org.gnome.Session.Presence"
+#define GPM_SESSION_MANAGER_SERVICE "org.gnome.SessionManager"
+#define GPM_SESSION_MANAGER_PATH "/org/gnome/SessionManager"
+#define GPM_SESSION_MANAGER_INTERFACE "org.gnome.SessionManager"
+#define GPM_SESSION_MANAGER_PRESENCE_PATH "/org/gnome/SessionManager/Presence"
+#define GPM_SESSION_MANAGER_PRESENCE_INTERFACE "org.gnome.SessionManager.Presence"
#define GPM_DBUS_PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties"
typedef enum {
@@ -135,12 +135,13 @@
GError *error = NULL;
GValue *value;
+ value = g_new0(GValue, 1);
/* find out if this change altered the inhibited state */
ret = dbus_g_proxy_call (session->priv->proxy_prop, "Get", &error,
G_TYPE_STRING, GPM_SESSION_MANAGER_PRESENCE_INTERFACE,
G_TYPE_STRING, "status",
G_TYPE_INVALID,
- G_TYPE_VALUE, &value,
+ G_TYPE_VALUE, value,
G_TYPE_INVALID);
if (!ret) {
egg_warning ("failed to get idle status: %s", error->message);
@@ -149,6 +150,7 @@
goto out;
}
is_idle = (g_value_get_uint (value) == GPM_SESSION_STATUS_ENUM_IDLE);
+ g_free (value);
out:
return is_idle;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]