aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-idle.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-01-14 20:36:44 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-01-14 20:36:44 +0800
commit567179a52534b073d0be44c85a741345bca272d4 (patch)
tree656085d27a736992c7b9953d77097dc7c3658ac7 /libempathy/empathy-idle.c
parent0dabe0d490769cb6d50edf9aecc811ca87694ee6 (diff)
downloadgsoc2013-empathy-567179a52534b073d0be44c85a741345bca272d4.tar
gsoc2013-empathy-567179a52534b073d0be44c85a741345bca272d4.tar.gz
gsoc2013-empathy-567179a52534b073d0be44c85a741345bca272d4.tar.bz2
gsoc2013-empathy-567179a52534b073d0be44c85a741345bca272d4.tar.lz
gsoc2013-empathy-567179a52534b073d0be44c85a741345bca272d4.tar.xz
gsoc2013-empathy-567179a52534b073d0be44c85a741345bca272d4.tar.zst
gsoc2013-empathy-567179a52534b073d0be44c85a741345bca272d4.zip
Make use of PresenceChanged signal now that it got fixed in MC 4.53. Fixes bug #466960.
svn path=/trunk/; revision=547
Diffstat (limited to 'libempathy/empathy-idle.c')
-rw-r--r--libempathy/empathy-idle.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index 68df13168..2f811a622 100644
--- a/libempathy/empathy-idle.c
+++ b/libempathy/empathy-idle.c
@@ -83,6 +83,7 @@ static void idle_set_property (GObject *object,
GParamSpec *pspec);
static void idle_presence_changed_cb (MissionControl *mc,
McPresence state,
+ gchar *status,
EmpathyIdle *idle);
static void idle_session_idle_changed_cb (DBusGProxy *gs_proxy,
gboolean is_idle,
@@ -169,10 +170,10 @@ empathy_idle_init (EmpathyIdle *idle)
priv->is_idle = FALSE;
priv->mc = empathy_mission_control_new ();
priv->state = mission_control_get_presence_actual (priv->mc, NULL);
- idle_presence_changed_cb (priv->mc, priv->state, idle);
+ priv->status = mission_control_get_presence_message_actual (priv->mc, NULL);
dbus_g_proxy_connect_signal (DBUS_G_PROXY (priv->mc),
- "PresenceStatusActual",
+ "PresenceChanged",
G_CALLBACK (idle_presence_changed_cb),
idle, NULL);
@@ -489,19 +490,21 @@ empathy_idle_set_use_nm (EmpathyIdle *idle,
static void
idle_presence_changed_cb (MissionControl *mc,
McPresence state,
+ gchar *status,
EmpathyIdle *idle)
{
EmpathyIdlePriv *priv;
priv = GET_PRIV (idle);
+ empathy_debug (DEBUG_DOMAIN, "Presence changed to '%s' (%d)",
+ status, state);
+
g_free (priv->status);
priv->state = state;
- priv->status = mission_control_get_presence_message_actual (priv->mc, NULL);
-
- if (G_STR_EMPTY (priv->status)) {
- g_free (priv->status);
- priv->status = NULL;
+ priv->status = NULL;
+ if (!G_STR_EMPTY (status)) {
+ priv->status = g_strdup (status);
}
g_object_notify (G_OBJECT (idle), "state");