aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-idle.c
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-08-19 23:50:14 +0800
committerJonny Lamb <jonny.lamb@collabora.co.uk>2009-08-19 23:50:44 +0800
commitc98e85dcf635914dc66755d6a8560e2d370cfffe (patch)
tree3aa9733ce27b1a93ed3179f85e3fb7bb7aafab50 /libempathy/empathy-idle.c
parentc777b477a4003b4f49285500736f0c91767c76cb (diff)
downloadgsoc2013-empathy-c98e85dcf635914dc66755d6a8560e2d370cfffe.tar
gsoc2013-empathy-c98e85dcf635914dc66755d6a8560e2d370cfffe.tar.gz
gsoc2013-empathy-c98e85dcf635914dc66755d6a8560e2d370cfffe.tar.bz2
gsoc2013-empathy-c98e85dcf635914dc66755d6a8560e2d370cfffe.tar.lz
gsoc2013-empathy-c98e85dcf635914dc66755d6a8560e2d370cfffe.tar.xz
gsoc2013-empathy-c98e85dcf635914dc66755d6a8560e2d370cfffe.tar.zst
gsoc2013-empathy-c98e85dcf635914dc66755d6a8560e2d370cfffe.zip
empathy-connectivity: only send the new state in the state-change signal
It can be assumed that the old state was always the opposite to the new state, because the signal is only ever fired if the new state differs from the old state. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'libempathy/empathy-idle.c')
-rw-r--r--libempathy/empathy-idle.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index c3e6b0177..f408cf69b 100644
--- a/libempathy/empathy-idle.c
+++ b/libempathy/empathy-idle.c
@@ -226,7 +226,6 @@ idle_session_status_changed_cb (DBusGProxy *gs_proxy,
static void
idle_state_change_cb (EmpathyConnectivity *connectivity,
- gboolean old_online,
gboolean new_online,
EmpathyIdle *idle)
{
@@ -234,7 +233,7 @@ idle_state_change_cb (EmpathyConnectivity *connectivity,
priv = GET_PRIV (idle);
- if (old_online && !new_online) {
+ if (!new_online) {
/* We are no longer connected */
DEBUG ("Disconnected: Save state %d (%s)",
priv->state, priv->status);
@@ -243,7 +242,7 @@ idle_state_change_cb (EmpathyConnectivity *connectivity,
priv->saved_status = g_strdup (priv->status);
empathy_idle_set_state (idle, TP_CONNECTION_PRESENCE_TYPE_OFFLINE);
}
- else if (!old_online && new_online
+ else if (new_online
&& priv->saved_state != TP_CONNECTION_PRESENCE_TYPE_UNSET) {
/* We are now connected */
DEBUG ("Reconnected: Restore state %d (%s)",