static void set_capabilities_from_tp_caps (EmpathyContact *self,
TpCapabilities *caps);
+static void contact_set_avatar (EmpathyContact *contact,
+ EmpathyAvatar *avatar);
static void contact_set_avatar_from_tp_contact (EmpathyContact *contact);
G_DEFINE_TYPE (EmpathyContact, empathy_contact, G_TYPE_OBJECT);
"Avatar image",
"The avatar image",
EMPATHY_TYPE_AVATAR,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
PROP_PRESENCE,
case PROP_ALIAS:
empathy_contact_set_alias (contact, g_value_get_string (value));
break;
- case PROP_AVATAR:
- empathy_contact_set_avatar (contact, g_value_get_boxed (value));
- break;
case PROP_PRESENCE:
empathy_contact_set_presence (contact, g_value_get_uint (value));
break;
return priv->avatar;
}
-void
-empathy_contact_set_avatar (EmpathyContact *contact,
- EmpathyAvatar *avatar)
+static void
+contact_set_avatar (EmpathyContact *contact,
+ EmpathyAvatar *avatar)
{
EmpathyContactPriv *priv;
DEBUG ("Avatar loaded from %s", filename);
avatar = empathy_avatar_new ((guchar *) data, len, NULL, g_strdup (token),
filename);
- empathy_contact_set_avatar (contact, avatar);
+ contact_set_avatar (contact, avatar);
empathy_avatar_unref (avatar);
}
else
g_file_load_contents (file, NULL, &data, &len, NULL, NULL);
avatar = empathy_avatar_new ((guchar *) data, len, g_strdup (mime), g_strdup (token),
g_file_get_path (file));
- empathy_contact_set_avatar (contact, avatar);
+ contact_set_avatar (contact, avatar);
empathy_avatar_unref (avatar);
}
else
{
- empathy_contact_set_avatar (contact, NULL);
+ contact_set_avatar (contact, NULL);
}
}
void empathy_contact_change_group (EmpathyContact *contact, const gchar *group,
gboolean is_member);
EmpathyAvatar * empathy_contact_get_avatar (EmpathyContact *contact);
-void empathy_contact_set_avatar (EmpathyContact *contact,
- EmpathyAvatar *avatar);
TpAccount * empathy_contact_get_account (EmpathyContact *contact);
FolksPersona * empathy_contact_get_persona (EmpathyContact *contact);
void empathy_contact_set_persona (EmpathyContact *contact,