aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Curtis <briancurtis.wx@gmail.com>2010-03-15 20:47:51 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-15 20:49:17 +0800
commit0d1cf12a9eae8334778e51934d5e6a3b0cb58b4a (patch)
treecf03edb52065663b0d19d139d26b76c7ee2af011
parenta7d443e78a3c58d6d188432ada7f7706b3c10cf2 (diff)
downloadgsoc2013-empathy-0d1cf12a9eae8334778e51934d5e6a3b0cb58b4a.tar
gsoc2013-empathy-0d1cf12a9eae8334778e51934d5e6a3b0cb58b4a.tar.gz
gsoc2013-empathy-0d1cf12a9eae8334778e51934d5e6a3b0cb58b4a.tar.bz2
gsoc2013-empathy-0d1cf12a9eae8334778e51934d5e6a3b0cb58b4a.tar.lz
gsoc2013-empathy-0d1cf12a9eae8334778e51934d5e6a3b0cb58b4a.tar.xz
gsoc2013-empathy-0d1cf12a9eae8334778e51934d5e6a3b0cb58b4a.tar.zst
gsoc2013-empathy-0d1cf12a9eae8334778e51934d5e6a3b0cb58b4a.zip
idle: Only restore state but not status message when getting back from idle (#566832)
-rw-r--r--libempathy/empathy-idle.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/libempathy/empathy-idle.c b/libempathy/empathy-idle.c
index e9bb1a4ac..3ee3f39a3 100644
--- a/libempathy/empathy-idle.c
+++ b/libempathy/empathy-idle.c
@@ -226,31 +226,20 @@ idle_session_status_changed_cb (DBusGProxy *gs_proxy,
priv->away_saved_state, new_state);
empathy_idle_set_state (idle, new_state);
} else if (!is_idle && priv->is_idle) {
- const gchar *new_status;
/* We are no more idle, restore state */
idle_ext_away_stop (idle);
- if (priv->away_saved_state == TP_CONNECTION_PRESENCE_TYPE_AWAY ||
- priv->away_saved_state == TP_CONNECTION_PRESENCE_TYPE_EXTENDED_AWAY) {
- priv->away_saved_state = TP_CONNECTION_PRESENCE_TYPE_AVAILABLE;
- new_status = NULL;
- } else {
- new_status = priv->status;
- }
-
/* Only try and set the presence if the away saved state is not
* unset. This is an odd case because it means that the session
* didn't notify us of the state change to idle, and as a
* result, we couldn't save the current state at that time.
*/
if (priv->away_saved_state != TP_CONNECTION_PRESENCE_TYPE_UNSET) {
- DEBUG ("Restoring state to %d, reset status to %s",
- priv->away_saved_state, new_status);
+ DEBUG ("Restoring state to %d",
+ priv->away_saved_state);
- empathy_idle_set_presence (idle,
- priv->away_saved_state,
- new_status);
+ empathy_idle_set_state (idle,priv->away_saved_state);
} else {
DEBUG ("Away saved state is unset. This means that we "
"weren't told when the session went idle. "