From 94afc1026dce7dc92d12196cc61a320509080762 Mon Sep 17 00:00:00 2001 From: Jonny Lamb Date: Sat, 24 Oct 2009 16:00:07 +0100 Subject: event-manager: port to new tp-glib account API Signed-off-by: Jonny Lamb --- src/empathy-event-manager.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/empathy-event-manager.c') diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index c68458d69..f3eb2992d 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -24,11 +24,12 @@ #include #include +#include #include #include -#include #include +#include #include #include #include @@ -918,13 +919,16 @@ event_manager_presence_changed_cb (EmpathyContactMonitor *monitor, TpConnectionPresenceType previous, EmpathyEventManager *manager) { - EmpathyAccount *account; + TpAccount *account; gchar *header = NULL; gboolean preference = FALSE; + EmpathyIdle *idle; account = empathy_contact_get_account (contact); - if (empathy_account_is_just_connected (account)) - return; + idle = empathy_idle_dup_singleton (); + + if (empathy_idle_account_is_just_connected (idle, account)) + goto out; if (tp_connection_presence_type_cmp_availability (previous, TP_CONNECTION_PRESENCE_TYPE_OFFLINE) > 0) @@ -960,6 +964,9 @@ event_manager_presence_changed_cb (EmpathyContactMonitor *monitor, } } g_free (header); + +out: + g_object_unref (idle); } -- cgit v1.2.3