diff options
Diffstat (limited to 'src/event.c')
-rw-r--r-- | src/event.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/event.c b/src/event.c index 8f913f2..e1e2601 100644 --- a/src/event.c +++ b/src/event.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2021 GNUnet e.V. | 3 | Copyright (C) 2021--2022 GNUnet e.V. |
4 | 4 | ||
5 | GNUnet is free software: you can redistribute it and/or modify it | 5 | GNUnet is free software: you can redistribute it and/or modify it |
6 | under the terms of the GNU Affero General Public License as published | 6 | under the terms of the GNU Affero General Public License as published |
@@ -268,12 +268,7 @@ event_joining_contact(MESSENGER_Application *app, | |||
268 | gtk_label_set_text(message->text_label, join_message); | 268 | gtk_label_set_text(message->text_label, join_message); |
269 | gtk_label_set_text(message->timestamp_label, time? time : ""); | 269 | gtk_label_set_text(message->timestamp_label, time? time : ""); |
270 | 270 | ||
271 | gtk_container_add( | 271 | ui_chat_add_message(handle->chat, message); |
272 | GTK_CONTAINER(handle->chat->messages_listbox), | ||
273 | message->message_box | ||
274 | ); | ||
275 | |||
276 | handle->chat->messages = g_list_prepend(handle->chat->messages, message); | ||
277 | ui_chat_entry_update(handle, app, context); | 272 | ui_chat_entry_update(handle, app, context); |
278 | } | 273 | } |
279 | 274 | ||
@@ -357,12 +352,7 @@ event_invitation(UNUSED MESSENGER_Application *app, | |||
357 | gtk_widget_show(GTK_WIDGET(message->deny_button)); | 352 | gtk_widget_show(GTK_WIDGET(message->deny_button)); |
358 | gtk_widget_show(GTK_WIDGET(message->accept_button)); | 353 | gtk_widget_show(GTK_WIDGET(message->accept_button)); |
359 | 354 | ||
360 | gtk_container_add( | 355 | ui_chat_add_message(handle->chat, message); |
361 | GTK_CONTAINER(handle->chat->messages_listbox), | ||
362 | message->message_box | ||
363 | ); | ||
364 | |||
365 | handle->chat->messages = g_list_prepend(handle->chat->messages, message); | ||
366 | ui_chat_entry_update(handle, app, context); | 356 | ui_chat_entry_update(handle, app, context); |
367 | } | 357 | } |
368 | 358 | ||
@@ -412,11 +402,6 @@ event_receive_message(UNUSED MESSENGER_Application *app, | |||
412 | gtk_label_set_text(message->text_label, text? text : ""); | 402 | gtk_label_set_text(message->text_label, text? text : ""); |
413 | gtk_label_set_text(message->timestamp_label, time? time : ""); | 403 | gtk_label_set_text(message->timestamp_label, time? time : ""); |
414 | 404 | ||
415 | gtk_container_add( | 405 | ui_chat_add_message(handle->chat, message); |
416 | GTK_CONTAINER(handle->chat->messages_listbox), | ||
417 | message->message_box | ||
418 | ); | ||
419 | |||
420 | handle->chat->messages = g_list_prepend(handle->chat->messages, message); | ||
421 | ui_chat_entry_update(handle, app, context); | 406 | ui_chat_entry_update(handle, app, context); |
422 | } | 407 | } |