mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
58 lines
1.7 KiB
Diff
58 lines
1.7 KiB
Diff
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
|
|
index c723079..9504519 100644
|
|
--- a/libempathy/empathy-idle.c
|
|
+++ b/libempathy/empathy-idle.c
|
|
@@ -77,6 +77,14 @@ enum {
|
|
PROP_USE_NM
|
|
};
|
|
|
|
+typedef enum {
|
|
+ SESSION_STATUS_AVAILABLE = 0,
|
|
+ SESSION_STATUS_INVISIBLE,
|
|
+ SESSION_STATUS_BUSY,
|
|
+ SESSION_STATUS_IDLE,
|
|
+ SESSION_STATUS_UNKNOWN
|
|
+} SessionStatus;
|
|
+
|
|
G_DEFINE_TYPE (EmpathyIdle, empathy_idle, G_TYPE_OBJECT);
|
|
|
|
static EmpathyIdle * idle_singleton = NULL;
|
|
@@ -148,12 +156,15 @@ idle_ext_away_start (EmpathyIdle *idle)
|
|
|
|
static void
|
|
idle_session_idle_changed_cb (DBusGProxy *gs_proxy,
|
|
- gboolean is_idle,
|
|
+ guint status,
|
|
EmpathyIdle *idle)
|
|
{
|
|
EmpathyIdlePriv *priv;
|
|
|
|
priv = GET_PRIV (idle);
|
|
+
|
|
+ gboolean is_idle;
|
|
+ is_idle = (status == SESSION_STATUS_IDLE);
|
|
|
|
DEBUG ("Session idle state changed, %s -> %s",
|
|
priv->is_idle ? "yes" : "no",
|
|
@@ -488,14 +499,13 @@ empathy_idle_init (EmpathyIdle *idle)
|
|
idle, NULL);
|
|
|
|
priv->gs_proxy = dbus_g_proxy_new_for_name (tp_get_bus (),
|
|
- "org.gnome.ScreenSaver",
|
|
- "/org/gnome/ScreenSaver",
|
|
- "org.gnome.ScreenSaver");
|
|
+ "org.gnome.SessionManager",
|
|
+ "/org/gnome/SessionManager/Presence",
|
|
+ "org.gnome.SessionManager.Presence");
|
|
if (priv->gs_proxy) {
|
|
- dbus_g_proxy_add_signal (priv->gs_proxy, "SessionIdleChanged",
|
|
- G_TYPE_BOOLEAN,
|
|
- G_TYPE_INVALID);
|
|
- dbus_g_proxy_connect_signal (priv->gs_proxy, "SessionIdleChanged",
|
|
+ dbus_g_proxy_add_signal (priv->gs_proxy, "StatusChanged",
|
|
+ G_TYPE_UINT, G_TYPE_INVALID);
|
|
+ dbus_g_proxy_connect_signal (priv->gs_proxy, "StatusChanged",
|
|
G_CALLBACK (idle_session_idle_changed_cb),
|
|
idle, NULL);
|
|
} else {
|
|
|