aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-28 17:07:37 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-28 17:08:06 +0800
commita711c1e353bc84a0e97652fb22d39e34bd729f4e (patch)
treed3138819f4c51ed251f34d252b9bca4a41276556 /src
parent847a2ea867f4006e75ee26ba16cc96ba6b26a5ed (diff)
downloadgsoc2013-empathy-a711c1e353bc84a0e97652fb22d39e34bd729f4e.tar
gsoc2013-empathy-a711c1e353bc84a0e97652fb22d39e34bd729f4e.tar.gz
gsoc2013-empathy-a711c1e353bc84a0e97652fb22d39e34bd729f4e.tar.bz2
gsoc2013-empathy-a711c1e353bc84a0e97652fb22d39e34bd729f4e.tar.lz
gsoc2013-empathy-a711c1e353bc84a0e97652fb22d39e34bd729f4e.tar.xz
gsoc2013-empathy-a711c1e353bc84a0e97652fb22d39e34bd729f4e.tar.zst
gsoc2013-empathy-a711c1e353bc84a0e97652fb22d39e34bd729f4e.zip
accounts-dialog: don't show the avatar button if avatars are not supported
https://bugzilla.gnome.org/show_bug.cgi?id=627948
Diffstat (limited to 'src')
-rw-r--r--src/empathy-accounts-dialog.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 578f998bc..7645d1642 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -790,18 +790,25 @@ create_contact_info_editor (EmpathyAccountsDialog *self,
EmpathyAccountsDialogPriv *priv = GET_PRIV (self);
GtkWidget *editor, *alig;
EmpathyContact *contact;
+ EmpathyContactWidgetFlags flags;
+ TpConnection *conn;
contact = empathy_contact_dup_from_tp_contact (tp_contact);
alig = gtk_alignment_new (0.5, 0, 1, 1);
- /* create the contact info editor for this account */
- editor = empathy_contact_widget_new (contact,
- EMPATHY_CONTACT_WIDGET_EDIT_ALIAS |
- EMPATHY_CONTACT_WIDGET_EDIT_AVATAR |
+ flags = EMPATHY_CONTACT_WIDGET_EDIT_ALIAS |
EMPATHY_CONTACT_WIDGET_NO_STATUS |
EMPATHY_CONTACT_WIDGET_EDIT_DETAILS |
- EMPATHY_CONTACT_WIDGET_NO_ACCOUNT);
+ EMPATHY_CONTACT_WIDGET_NO_ACCOUNT;
+
+ conn = tp_contact_get_connection (tp_contact);
+ if (tp_proxy_has_interface_by_id (conn,
+ TP_IFACE_QUARK_CONNECTION_INTERFACE_AVATARS))
+ flags |= EMPATHY_CONTACT_WIDGET_EDIT_AVATAR;
+
+ /* create the contact info editor for this account */
+ editor = empathy_contact_widget_new (contact, flags);
gtk_box_pack_start (GTK_BOX (priv->dialog_content), alig, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (alig), editor);