aboutsummaryrefslogtreecommitdiff
path: root/src/ui/contact_entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/contact_entry.c')
-rw-r--r--src/ui/contact_entry.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/ui/contact_entry.c b/src/ui/contact_entry.c
index 54fe80a..b9789da 100644
--- a/src/ui/contact_entry.c
+++ b/src/ui/contact_entry.c
@@ -25,6 +25,7 @@
25#include "contact_entry.h" 25#include "contact_entry.h"
26 26
27#include "../application.h" 27#include "../application.h"
28#include "../ui.h"
28 29
29UI_CONTACT_ENTRY_Handle* 30UI_CONTACT_ENTRY_Handle*
30ui_contact_entry_new(MESSENGER_Application *app) 31ui_contact_entry_new(MESSENGER_Application *app)
@@ -59,24 +60,12 @@ ui_contact_entry_set_contact(UI_CONTACT_ENTRY_Handle* handle,
59 const struct GNUNET_CHAT_Contact *contact) 60 const struct GNUNET_CHAT_Contact *contact)
60{ 61{
61 62
62 const gchar *name; 63 const char *name = GNUNET_CHAT_contact_get_name(contact);
63 const gchar *key; 64 const char *key = GNUNET_CHAT_contact_get_key(contact);
64 65
65 name = GNUNET_CHAT_contact_get_name(contact); 66 ui_avatar_set_text(handle->entry_avatar, name);
66 67 ui_label_set_text(handle->title_label, name);
67 if (!name) 68 ui_label_set_text(handle->subtitle_label, key);
68 goto skip_name;
69
70 hdy_avatar_set_text(handle->entry_avatar, name);
71 gtk_label_set_text(handle->title_label, name);
72
73skip_name:
74 key = GNUNET_CHAT_contact_get_key(contact);
75
76 if (!key)
77 return;
78
79 gtk_label_set_text(handle->subtitle_label, name);
80} 69}
81 70
82void 71void