aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2010-05-10 18:36:28 +0800
committerXavier Claessens <xclaesse@gmail.com>2010-05-26 17:17:47 +0800
commitb8ff75d21c1be60e6df472a35599a9e22046a92b (patch)
treefcaa7453e65ac310e4a3c0f854bcb8b588722863 /src
parent696bd076bbd431aad122c66cadfb6ec3f5ff1762 (diff)
downloadgsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.tar
gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.tar.gz
gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.tar.bz2
gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.tar.lz
gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.tar.xz
gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.tar.zst
gsoc2013-empathy-b8ff75d21c1be60e6df472a35599a9e22046a92b.zip
Port to new EmpathyTpContactFactory API
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c8
-rw-r--r--src/empathy-chat-window.c9
-rw-r--r--src/empathy-event-manager.c16
3 files changed, 8 insertions, 25 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 598f483ab..40c461488 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -1257,7 +1257,7 @@ contact_avatar_changed_cb (EmpathyContact *contact,
}
static void
-empathy_call_window_got_self_contact_cb (EmpathyTpContactFactory *factory,
+empathy_call_window_got_self_contact_cb (TpConnection *connection,
EmpathyContact *contact, const GError *error, gpointer user_data,
GObject *weak_object)
{
@@ -1282,7 +1282,6 @@ empathy_call_window_setup_avatars (EmpathyCallWindow *self,
if (priv->contact != NULL)
{
TpConnection *connection;
- EmpathyTpContactFactory *factory;
set_window_title (self);
@@ -1294,12 +1293,9 @@ empathy_call_window_setup_avatars (EmpathyCallWindow *self,
/* Retreiving the self avatar */
connection = empathy_contact_get_connection (priv->contact);
- factory = empathy_tp_contact_factory_dup_singleton (connection);
- empathy_tp_contact_factory_get_from_handle (factory,
+ empathy_tp_contact_factory_get_from_handle (connection,
tp_connection_get_self_handle (connection),
empathy_call_window_got_self_contact_cb, self, NULL, G_OBJECT (self));
-
- g_object_unref (factory);
}
else
{
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index d47e942f5..94717f3c8 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -856,7 +856,7 @@ chat_window_contacts_toggled_cb (GtkToggleAction *toggle_action,
}
static void
-got_contact_cb (EmpathyTpContactFactory *factory,
+got_contact_cb (TpConnection *connection,
EmpathyContact *contact,
const GError *error,
gpointer user_data,
@@ -900,7 +900,6 @@ chat_window_invite_participant_activate_cb (GtkAction *action,
if (response == GTK_RESPONSE_ACCEPT) {
TpConnection *connection;
- EmpathyTpContactFactory *factory;
const char *id;
id = empathy_contact_selector_dialog_get_selected (
@@ -908,12 +907,8 @@ chat_window_invite_participant_activate_cb (GtkAction *action,
if (EMP_STR_EMPTY (id)) goto out;
connection = tp_channel_borrow_connection (channel);
- factory = empathy_tp_contact_factory_dup_singleton (connection);
-
- empathy_tp_contact_factory_get_from_id (factory, id,
+ empathy_tp_contact_factory_get_from_id (connection, id,
got_contact_cb, tp_chat, NULL, NULL);
-
- g_object_unref (factory);
}
out:
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index a7283594f..025eec564 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -624,7 +624,7 @@ event_room_channel_process_func (EventPriv *event)
}
static void
-event_manager_muc_invite_got_contact_cb (EmpathyTpContactFactory *factory,
+event_manager_muc_invite_got_contact_cb (TpConnection *connection,
EmpathyContact *contact,
const GError *error,
gpointer user_data,
@@ -665,7 +665,7 @@ event_manager_muc_invite_got_contact_cb (EmpathyTpContactFactory *factory,
}
static void
-event_manager_ft_got_contact_cb (EmpathyTpContactFactory *factory,
+event_manager_ft_got_contact_cb (TpConnection *connection,
EmpathyContact *contact,
const GError *error,
gpointer user_data,
@@ -730,20 +730,16 @@ event_manager_approve_channel_cb (EmpathyDispatcher *dispatcher,
channel, self_handle, &inviter, NULL, NULL))
{
/* We are invited to a room */
- EmpathyTpContactFactory *factory;
TpConnection *connection;
DEBUG ("Have been invited to %s. Ask user if he wants to accept",
tp_channel_get_identifier (channel));
connection = empathy_tp_chat_get_connection (tp_chat);
- factory = empathy_tp_contact_factory_dup_singleton (connection);
-
- empathy_tp_contact_factory_get_from_handle (factory,
+ empathy_tp_contact_factory_get_from_handle (connection,
inviter, event_manager_muc_invite_got_contact_cb,
approval, NULL, G_OBJECT (manager));
- g_object_unref (factory);
return;
}
@@ -781,17 +777,13 @@ event_manager_approve_channel_cb (EmpathyDispatcher *dispatcher,
TpChannel *channel;
TpConnection *connection;
TpHandle handle;
- EmpathyTpContactFactory *factory;
channel = empathy_dispatch_operation_get_channel (operation);
handle = tp_channel_get_handle (channel, NULL);
connection = tp_channel_borrow_connection (channel);
- factory = empathy_tp_contact_factory_dup_singleton (connection);
- empathy_tp_contact_factory_get_from_handle (factory, handle,
+ empathy_tp_contact_factory_get_from_handle (connection, handle,
event_manager_ft_got_contact_cb, approval, NULL, G_OBJECT (manager));
-
- g_object_unref (factory);
}
else
{