diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-01-26 16:30:07 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-01-26 16:30:07 +0800 |
commit | 71e8203ac15682c88cd2313c16a2e793d90312ce (patch) | |
tree | d1eac9de0a9603d2cdd2d7da086682750f982897 /src | |
parent | 1570d9b4827b5e24540960564bb1c487d3f062ae (diff) | |
parent | 08d9529b553d70b3fb4b422f2453fc2247a15f20 (diff) | |
download | gsoc2013-empathy-71e8203ac15682c88cd2313c16a2e793d90312ce.tar gsoc2013-empathy-71e8203ac15682c88cd2313c16a2e793d90312ce.tar.gz gsoc2013-empathy-71e8203ac15682c88cd2313c16a2e793d90312ce.tar.bz2 gsoc2013-empathy-71e8203ac15682c88cd2313c16a2e793d90312ce.tar.lz gsoc2013-empathy-71e8203ac15682c88cd2313c16a2e793d90312ce.tar.xz gsoc2013-empathy-71e8203ac15682c88cd2313c16a2e793d90312ce.tar.zst gsoc2013-empathy-71e8203ac15682c88cd2313c16a2e793d90312ce.zip |
Merge branch 'presence-manager-640532'
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-chat.c | 8 | ||||
-rw-r--r-- | src/empathy-event-manager.c | 10 | ||||
-rw-r--r-- | src/empathy-main-window.c | 1 | ||||
-rw-r--r-- | src/empathy.c | 26 |
4 files changed, 23 insertions, 22 deletions
diff --git a/src/empathy-chat.c b/src/empathy-chat.c index 7d8fcd323..db4000e66 100644 --- a/src/empathy-chat.c +++ b/src/empathy-chat.c @@ -30,7 +30,7 @@ #include <telepathy-glib/debug-sender.h> -#include <libempathy/empathy-idle.h> +#include <libempathy/empathy-presence-manager.h> #include <libempathy-gtk/empathy-ui-utils.h> #include "empathy-chat-manager.h" @@ -95,7 +95,7 @@ main (int argc, TpDebugSender *debug_sender; #endif GError *error = NULL; - EmpathyIdle *idle; + EmpathyPresenceManager *presence_mgr; gint retval; /* Init */ @@ -133,7 +133,7 @@ main (int argc, #endif /* Setting up Idle */ - idle = empathy_idle_dup_singleton (); + presence_mgr = empathy_presence_manager_dup_singleton (); if (g_getenv ("EMPATHY_PERSIST") != NULL) { @@ -152,7 +152,7 @@ main (int argc, retval = g_application_run (G_APPLICATION (app), argc, argv); g_object_unref (app); - g_object_unref (idle); + g_object_unref (presence_mgr); tp_clear_object (&chat_mgr); #ifdef ENABLE_DEBUG diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c index c7dd660a0..b20f1719f 100644 --- a/src/empathy-event-manager.c +++ b/src/empathy-event-manager.c @@ -29,7 +29,7 @@ #include <telepathy-glib/interfaces.h> #include <telepathy-glib/simple-approver.h> -#include <libempathy/empathy-idle.h> +#include <libempathy/empathy-presence-manager.h> #include <libempathy/empathy-tp-contact-factory.h> #include <libempathy/empathy-contact-manager.h> #include <libempathy/empathy-tp-chat.h> @@ -1092,13 +1092,13 @@ event_manager_presence_changed_cb (EmpathyContact *contact, EmpathyEventManagerPriv *priv = GET_PRIV (manager); TpAccount *account; gchar *header = NULL; - EmpathyIdle *idle; + EmpathyPresenceManager *presence_mgr; GtkWidget *window = empathy_main_window_dup (); account = empathy_contact_get_account (contact); - idle = empathy_idle_dup_singleton (); + presence_mgr = empathy_presence_manager_dup_singleton (); - if (empathy_idle_account_is_just_connected (idle, account)) + if (empathy_presence_manager_account_is_just_connected (presence_mgr, account)) goto out; if (tp_connection_presence_type_cmp_availability (previous, @@ -1149,7 +1149,7 @@ event_manager_presence_changed_cb (EmpathyContact *contact, g_free (header); out: - g_object_unref (idle); + g_object_unref (presence_mgr); g_object_unref (window); } diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index d7422d874..97e03dc04 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -34,7 +34,6 @@ #include <folks/folks.h> #include <libempathy/empathy-contact.h> -#include <libempathy/empathy-idle.h> #include <libempathy/empathy-utils.h> #include <libempathy/empathy-dispatcher.h> #include <libempathy/empathy-chatroom-manager.h> diff --git a/src/empathy.c b/src/empathy.c index 357b47e8e..c5de83bbe 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -46,7 +46,7 @@ #include <telepathy-logger/log-manager.h> -#include <libempathy/empathy-idle.h> +#include <libempathy/empathy-presence-manager.h> #include <libempathy/empathy-utils.h> #include <libempathy/empathy-chatroom-manager.h> #include <libempathy/empathy-account-settings.h> @@ -114,7 +114,7 @@ struct _EmpathyApp TplLogManager *log_manager; EmpathyChatroomManager *chatroom_manager; EmpathyFTFactory *ft_factory; - EmpathyIdle *idle; + EmpathyPresenceManager *presence_mgr; EmpathyConnectivity *connectivity; GSettings *gsettings; EmpathyNotificationsApprover *notifications_approver; @@ -136,16 +136,17 @@ empathy_app_dispose (GObject *object) void (*dispose) (GObject *) = G_OBJECT_CLASS (empathy_app_parent_class)->dispose; - if (self->idle != NULL) + if (self->presence_mgr != NULL) { - empathy_idle_set_state (self->idle, TP_CONNECTION_PRESENCE_TYPE_OFFLINE); + empathy_presence_manager_set_state (self->presence_mgr, + TP_CONNECTION_PRESENCE_TYPE_OFFLINE); } #ifdef ENABLE_DEBUG tp_clear_object (&self->debug_sender); #endif - tp_clear_object (&self->idle); + tp_clear_object (&self->presence_mgr); tp_clear_object (&self->connectivity); tp_clear_object (&self->icon); tp_clear_object (&self->account_manager); @@ -520,7 +521,7 @@ account_manager_ready_cb (GObject *source_object, (presence, TP_CONNECTION_PRESENCE_TYPE_OFFLINE) <= 0) /* if current state is Offline, then put it online */ - empathy_idle_set_state (self->idle, + empathy_presence_manager_set_state (self->presence_mgr, TP_CONNECTION_PRESENCE_TYPE_AVAILABLE); /* Pop up the accounts dialog if we don't have any account */ @@ -612,13 +613,13 @@ chatroom_manager_ready_cb (EmpathyChatroomManager *chatroom_manager, } static void -empathy_idle_set_auto_away_cb (GSettings *gsettings, +empathy_presence_manager_set_auto_away_cb (GSettings *gsettings, const gchar *key, gpointer user_data) { - EmpathyIdle *idle = user_data; + EmpathyPresenceManager *presence_mgr = user_data; - empathy_idle_set_auto_away (idle, + empathy_presence_manager_set_auto_away (presence_mgr, g_settings_get_boolean (gsettings, key)); } @@ -643,16 +644,17 @@ empathy_app_constructed (GObject *object) notify_init (_(PACKAGE_NAME)); /* Setting up Idle */ - self->idle = empathy_idle_dup_singleton (); + self->presence_mgr = empathy_presence_manager_dup_singleton (); self->gsettings = g_settings_new (EMPATHY_PREFS_SCHEMA); autoaway = g_settings_get_boolean (self->gsettings, EMPATHY_PREFS_AUTOAWAY); g_signal_connect (self->gsettings, "changed::" EMPATHY_PREFS_AUTOAWAY, - G_CALLBACK (empathy_idle_set_auto_away_cb), self->idle); + G_CALLBACK (empathy_presence_manager_set_auto_away_cb), + self->presence_mgr); - empathy_idle_set_auto_away (self->idle, autoaway); + empathy_presence_manager_set_auto_away (self->presence_mgr, autoaway); /* Setting up Connectivity */ self->connectivity = empathy_connectivity_dup_singleton (); |