summaryrefslogtreecommitdiff
path: root/src/contact.c
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2011-08-12 15:39:27 +0200
committerWill Thompson <will.thompson@collabora.co.uk>2011-08-16 11:37:19 +0100
commit19bfc985571cfe4586b71cb7005863f8598b971b (patch)
tree04307080ab62d0e9798c763f6c772823d67fa894 /src/contact.c
parent9117c3da3f8341d48bfe790e5e5a9e00d52b1839 (diff)
downloadtelepathy-salut-19bfc985571cfe4586b71cb7005863f8598b971b.tar.gz
Contact: track real names
Diffstat (limited to 'src/contact.c')
-rw-r--r--src/contact.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/contact.c b/src/contact.c
index cc8ab52e..555952f1 100644
--- a/src/contact.c
+++ b/src/contact.c
@@ -341,6 +341,8 @@ salut_contact_finalize (GObject *object)
g_free (self->status_message);
g_free (priv->alias);
g_free (self->avatar_token);
+ g_free (self->first);
+ g_free (self->last);
g_free (self->email);
g_free (self->jid);
@@ -525,6 +527,22 @@ salut_contact_change (SalutContact *self, guint changes)
}
void
+salut_contact_change_real_name (
+ SalutContact *self,
+ const gchar *first,
+ const gchar *last)
+{
+ if (tp_strdiff (self->first, first) || tp_strdiff (self->last, last))
+ {
+ g_free (self->first);
+ self->first = g_strdup (first);
+ g_free (self->last);
+ self->last = g_strdup (last);
+ salut_contact_change (self, SALUT_CONTACT_REAL_NAME_CHANGED);
+ }
+}
+
+void
salut_contact_change_alias (SalutContact *self, const gchar *alias)
{
SalutContactPrivate *priv = self->priv;