aboutsummaryrefslogtreecommitdiff
path: root/src/ui/contacts.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/contacts.c')
-rw-r--r--src/ui/contacts.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/src/ui/contacts.c b/src/ui/contacts.c
index 2e445ba..f19c93f 100644
--- a/src/ui/contacts.c
+++ b/src/ui/contacts.c
@@ -90,24 +90,15 @@ handle_dialog_destroy(UNUSED GtkWidget *window,
90} 90}
91 91
92static int 92static int
93_iterate_clear_contacts(UNUSED void *cls,
94 UNUSED struct GNUNET_CHAT_Handle *handle,
95 struct GNUNET_CHAT_Contact *contact)
96{
97 GNUNET_CHAT_contact_set_user_pointer(contact, NULL);
98 return GNUNET_YES;
99}
100
101static int
102_iterate_contacts(void *cls, 93_iterate_contacts(void *cls,
103 UNUSED struct GNUNET_CHAT_Handle *handle, 94 UNUSED struct GNUNET_CHAT_Handle *handle,
104 struct GNUNET_CHAT_Contact *contact) 95 struct GNUNET_CHAT_Contact *contact)
105{ 96{
106 MESSENGER_Application *app = (MESSENGER_Application*) cls; 97 if (GNUNET_YES == GNUNET_CHAT_contact_is_owned(contact))
107
108 if (GNUNET_CHAT_contact_get_user_pointer(contact))
109 return GNUNET_YES; 98 return GNUNET_YES;
110 99
100 MESSENGER_Application *app = (MESSENGER_Application*) cls;
101
111 const char *title; 102 const char *title;
112 title = GNUNET_CHAT_contact_get_name(contact); 103 title = GNUNET_CHAT_contact_get_name(contact);
113 104
@@ -119,8 +110,6 @@ _iterate_contacts(void *cls,
119 entry->entry_box 110 entry->entry_box
120 ); 111 );
121 112
122 GNUNET_CHAT_contact_set_user_pointer(contact, entry);
123
124 if (title) 113 if (title)
125 { 114 {
126 gtk_label_set_text(entry->title_label, title); 115 gtk_label_set_text(entry->title_label, title);
@@ -201,12 +190,6 @@ ui_contacts_dialog_init(MESSENGER_Application *app,
201 190
202 GNUNET_CHAT_iterate_contacts( 191 GNUNET_CHAT_iterate_contacts(
203 app->chat.messenger.handle, 192 app->chat.messenger.handle,
204 _iterate_clear_contacts,
205 NULL
206 );
207
208 GNUNET_CHAT_iterate_contacts(
209 app->chat.messenger.handle,
210 _iterate_contacts, 193 _iterate_contacts,
211 app 194 app
212 ); 195 );