aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-18 01:18:15 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-11-19 07:12:11 +0800
commit6d44631feaef9003a77b9854764549afee839a27 (patch)
tree9e708df7782fb9cf28f9522f23afbb21fe2acac7 /src
parent31e4f59e7c16016d0279070a711147fb6b460af1 (diff)
downloadgsoc2013-empathy-6d44631feaef9003a77b9854764549afee839a27.tar
gsoc2013-empathy-6d44631feaef9003a77b9854764549afee839a27.tar.gz
gsoc2013-empathy-6d44631feaef9003a77b9854764549afee839a27.tar.bz2
gsoc2013-empathy-6d44631feaef9003a77b9854764549afee839a27.tar.lz
gsoc2013-empathy-6d44631feaef9003a77b9854764549afee839a27.tar.xz
gsoc2013-empathy-6d44631feaef9003a77b9854764549afee839a27.tar.zst
gsoc2013-empathy-6d44631feaef9003a77b9854764549afee839a27.zip
empathy.c: use tp_account_manager_get_most_available_presence instead of empathy_idle_get_state
Diffstat (limited to 'src')
-rw-r--r--src/empathy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/empathy.c b/src/empathy.c
index 539d84db9..a9db756de 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -646,6 +646,7 @@ account_manager_ready_cb (GObject *source_object,
EmpathyIdle *idle;
EmpathyConnectivity *connectivity;
gboolean autoconnect = TRUE;
+ TpConnectionPresenceType presence;
if (!tp_account_manager_prepare_finish (manager, result, &error))
{
@@ -658,11 +659,14 @@ account_manager_ready_cb (GObject *source_object,
idle = empathy_idle_dup_singleton ();
connectivity = empathy_connectivity_dup_singleton ();
+ presence = tp_account_manager_get_most_available_presence (manager, NULL,
+ NULL);
+
empathy_conf_get_bool (empathy_conf_get (),
EMPATHY_PREFS_AUTOCONNECT, &autoconnect);
if (autoconnect && !no_connect &&
tp_connection_presence_type_cmp_availability
- (empathy_idle_get_state (idle), TP_CONNECTION_PRESENCE_TYPE_OFFLINE)
+ (presence, TP_CONNECTION_PRESENCE_TYPE_OFFLINE)
<= 0)
/* if current state is Offline, then put it online */
empathy_idle_set_state (idle, TP_CONNECTION_PRESENCE_TYPE_AVAILABLE);