aboutsummaryrefslogtreecommitdiff
path: root/src/ui/account_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/account_entry.c')
-rw-r--r--src/ui/account_entry.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/ui/account_entry.c b/src/ui/account_entry.c
index 3c0c52c..4d8355a 100644
--- a/src/ui/account_entry.c
+++ b/src/ui/account_entry.c
@@ -51,6 +51,32 @@ ui_account_entry_new(MESSENGER_Application *app)
51} 51}
52 52
53void 53void
54ui_account_entry_set_account(UI_ACCOUNT_ENTRY_Handle* handle,
55 const struct GNUNET_CHAT_Account *account)
56{
57 const gchar *name = GNUNET_CHAT_account_get_name(account);
58
59 if (!name)
60 return;
61
62 hdy_avatar_set_text(handle->entry_avatar, name);
63 gtk_label_set_text(handle->entry_label, name);
64}
65
66void
67ui_account_entry_set_contact(UI_ACCOUNT_ENTRY_Handle* handle,
68 const struct GNUNET_CHAT_Contact *contact)
69{
70 const gchar *name = GNUNET_CHAT_contact_get_name(contact);
71
72 if (!name)
73 return;
74
75 hdy_avatar_set_text(handle->entry_avatar, name);
76 gtk_label_set_text(handle->entry_label, name);
77}
78
79void
54ui_account_entry_delete(UI_ACCOUNT_ENTRY_Handle *handle) 80ui_account_entry_delete(UI_ACCOUNT_ENTRY_Handle *handle)
55{ 81{
56 g_object_unref(handle->builder); 82 g_object_unref(handle->builder);