aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-28 01:29:51 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-28 04:11:49 +0800
commitaad78d378231d1a8a3c44ffda2ada5e63560a58a (patch)
tree942bbba6ae9f3842deb37a390ac5f48240f38939 /libempathy
parent4c9b885598161f7ab91888c07c1a557249ce3c77 (diff)
downloadgsoc2013-empathy-aad78d378231d1a8a3c44ffda2ada5e63560a58a.tar
gsoc2013-empathy-aad78d378231d1a8a3c44ffda2ada5e63560a58a.tar.gz
gsoc2013-empathy-aad78d378231d1a8a3c44ffda2ada5e63560a58a.tar.bz2
gsoc2013-empathy-aad78d378231d1a8a3c44ffda2ada5e63560a58a.tar.lz
gsoc2013-empathy-aad78d378231d1a8a3c44ffda2ada5e63560a58a.tar.xz
gsoc2013-empathy-aad78d378231d1a8a3c44ffda2ada5e63560a58a.tar.zst
gsoc2013-empathy-aad78d378231d1a8a3c44ffda2ada5e63560a58a.zip
When not connected don't apply !offline states but save them
When we're not connected to a network don't allow setting the status to anything else then offline, but when a status is set do save it so it can be applied as soon as soon as we get network connectivity
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-idle.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index c86b997af..b8c7784d7 100644
--- a/libempathy/empathy-idle.c
+++ b/libempathy/empathy-idle.c
@@ -570,17 +570,19 @@ empathy_idle_set_presence (EmpathyIdle *idle,
status = NULL;
}
- if (!empathy_connectivity_is_online (priv->connectivity)) {
+ if (state != TP_CONNECTION_PRESENCE_TYPE_OFFLINE &&
+ !empathy_connectivity_is_online (priv->connectivity)) {
DEBUG ("Empathy is not online");
+ priv->saved_state = state;
if (tp_strdiff (priv->status, status)) {
- g_free (priv->status);
- priv->status = NULL;
+ g_free (priv->saved_status);
+ priv->saved_status = NULL;
if (!EMP_STR_EMPTY (status)) {
- priv->status = g_strdup (status);
+ priv->saved_status = g_strdup (status);
}
- g_object_notify (G_OBJECT (idle), "status");
}
+ return;
}
empathy_idle_do_set_presence (idle, state, status);