diff options
Diffstat (limited to 'src/ui/new_group.c')
-rw-r--r-- | src/ui/new_group.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/ui/new_group.c b/src/ui/new_group.c index 6355fcd..3741768 100644 --- a/src/ui/new_group.c +++ b/src/ui/new_group.c | |||
@@ -149,24 +149,15 @@ handle_dialog_destroy(UNUSED GtkWidget *window, | |||
149 | } | 149 | } |
150 | 150 | ||
151 | static int | 151 | static int |
152 | _iterate_clear_contacts(UNUSED void *cls, | ||
153 | UNUSED struct GNUNET_CHAT_Handle *handle, | ||
154 | struct GNUNET_CHAT_Contact *contact) | ||
155 | { | ||
156 | GNUNET_CHAT_contact_set_user_pointer(contact, NULL); | ||
157 | return GNUNET_YES; | ||
158 | } | ||
159 | |||
160 | static int | ||
161 | _iterate_contacts(void *cls, | 152 | _iterate_contacts(void *cls, |
162 | UNUSED struct GNUNET_CHAT_Handle *handle, | 153 | UNUSED struct GNUNET_CHAT_Handle *handle, |
163 | struct GNUNET_CHAT_Contact *contact) | 154 | struct GNUNET_CHAT_Contact *contact) |
164 | { | 155 | { |
165 | MESSENGER_Application *app = (MESSENGER_Application*) cls; | 156 | if (GNUNET_YES == GNUNET_CHAT_contact_is_owned(contact)) |
166 | |||
167 | if (GNUNET_CHAT_contact_get_user_pointer(contact)) | ||
168 | return GNUNET_YES; | 157 | return GNUNET_YES; |
169 | 158 | ||
159 | MESSENGER_Application *app = (MESSENGER_Application*) cls; | ||
160 | |||
170 | const char *title; | 161 | const char *title; |
171 | title = GNUNET_CHAT_contact_get_name(contact); | 162 | title = GNUNET_CHAT_contact_get_name(contact); |
172 | 163 | ||
@@ -178,8 +169,6 @@ _iterate_contacts(void *cls, | |||
178 | entry->entry_box | 169 | entry->entry_box |
179 | ); | 170 | ); |
180 | 171 | ||
181 | GNUNET_CHAT_contact_set_user_pointer(contact, entry); | ||
182 | |||
183 | if (title) | 172 | if (title) |
184 | { | 173 | { |
185 | gtk_label_set_text(entry->title_label, title); | 174 | gtk_label_set_text(entry->title_label, title); |
@@ -324,12 +313,6 @@ ui_new_group_dialog_init(MESSENGER_Application *app, | |||
324 | 313 | ||
325 | GNUNET_CHAT_iterate_contacts( | 314 | GNUNET_CHAT_iterate_contacts( |
326 | app->chat.messenger.handle, | 315 | app->chat.messenger.handle, |
327 | _iterate_clear_contacts, | ||
328 | NULL | ||
329 | ); | ||
330 | |||
331 | GNUNET_CHAT_iterate_contacts( | ||
332 | app->chat.messenger.handle, | ||
333 | _iterate_contacts, | 316 | _iterate_contacts, |
334 | app | 317 | app |
335 | ); | 318 | ); |