aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-avatar-chooser.c8
-rw-r--r--libempathy-gtk/empathy-avatar-chooser.h4
-rw-r--r--libempathy-gtk/empathy-contact-widget.c10
3 files changed, 14 insertions, 8 deletions
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c
index 1c5ff7b5e..bd878608e 100644
--- a/libempathy-gtk/empathy-avatar-chooser.c
+++ b/libempathy-gtk/empathy-avatar-chooser.c
@@ -1073,9 +1073,11 @@ empathy_avatar_chooser_get_image_data (EmpathyAvatarChooser *chooser,
}
void
-empathy_avatar_chooser_set_connection (EmpathyAvatarChooser *self,
- TpConnection *connection)
+empathy_avatar_chooser_set_account (EmpathyAvatarChooser *self,
+ TpAccount *account)
{
- avatar_chooser_set_connection (self, connection);
+ g_return_if_fail (account != NULL);
+
+ avatar_chooser_set_connection (self, tp_account_get_connection (account));
g_object_notify (G_OBJECT (self), "connection");
}
diff --git a/libempathy-gtk/empathy-avatar-chooser.h b/libempathy-gtk/empathy-avatar-chooser.h
index 84773574e..6ca583163 100644
--- a/libempathy-gtk/empathy-avatar-chooser.h
+++ b/libempathy-gtk/empathy-avatar-chooser.h
@@ -59,7 +59,7 @@ void empathy_avatar_chooser_get_image_data (EmpathyAvatarChooser *chooser,
gsize *data_size,
const gchar **mime_type);
-void empathy_avatar_chooser_set_connection (EmpathyAvatarChooser *self,
- TpConnection *connection);
+void empathy_avatar_chooser_set_account (EmpathyAvatarChooser *self,
+ TpAccount *account);
#endif /* __EMPATHY_AVATAR_CHOOSER_H__ */
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index b7f4a2696..062bcebf4 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -969,10 +969,14 @@ static void
update_avatar_chooser_account_cb (EmpathyAccountChooser *account_chooser,
EmpathyAvatarChooser *avatar_chooser)
{
- TpConnection *connection;
+ TpAccount *account;
+
+ account = empathy_account_chooser_dup_account (account_chooser);
+ if (account == NULL)
+ return;
- connection = empathy_account_chooser_get_connection (account_chooser);
- empathy_avatar_chooser_set_connection (avatar_chooser, connection);
+ empathy_avatar_chooser_set_account (avatar_chooser, account);
+ g_object_unref (account);
}
static void