aboutsummaryrefslogtreecommitdiff
path: root/src/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/event.c')
-rw-r--r--src/event.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/event.c b/src/event.c
index e1e2601..d80e563 100644
--- a/src/event.c
+++ b/src/event.c
@@ -25,6 +25,7 @@
25#include "event.h" 25#include "event.h"
26 26
27#include "contact.h" 27#include "contact.h"
28#include "file.h"
28 29
29#include "ui/chat_entry.h" 30#include "ui/chat_entry.h"
30#include "ui/contact_entry.h" 31#include "ui/contact_entry.h"
@@ -236,7 +237,7 @@ event_joining_contact(MESSENGER_Application *app,
236 return; 237 return;
237 238
238 UI_MESSAGE_Handle *message = ui_message_new(app, UI_MESSAGE_STATUS); 239 UI_MESSAGE_Handle *message = ui_message_new(app, UI_MESSAGE_STATUS);
239 ui_message_update(message, msg); 240 ui_message_update(message, app, msg);
240 241
241 struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender( 242 struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender(
242 msg 243 msg
@@ -304,7 +305,7 @@ _event_invitation_accept_click(UNUSED GtkButton *button,
304} 305}
305 306
306void 307void
307event_invitation(UNUSED MESSENGER_Application *app, 308event_invitation(MESSENGER_Application *app,
308 struct GNUNET_CHAT_Context *context, 309 struct GNUNET_CHAT_Context *context,
309 const struct GNUNET_CHAT_Message *msg) 310 const struct GNUNET_CHAT_Message *msg)
310{ 311{
@@ -320,7 +321,7 @@ event_invitation(UNUSED MESSENGER_Application *app,
320 return; 321 return;
321 322
322 UI_MESSAGE_Handle *message = ui_message_new(app, UI_MESSAGE_STATUS); 323 UI_MESSAGE_Handle *message = ui_message_new(app, UI_MESSAGE_STATUS);
323 ui_message_update(message, msg); 324 ui_message_update(message, app, msg);
324 325
325 const struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender( 326 const struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender(
326 msg 327 msg
@@ -357,7 +358,7 @@ event_invitation(UNUSED MESSENGER_Application *app,
357} 358}
358 359
359void 360void
360event_receive_message(UNUSED MESSENGER_Application *app, 361event_receive_message(MESSENGER_Application *app,
361 struct GNUNET_CHAT_Context *context, 362 struct GNUNET_CHAT_Context *context,
362 const struct GNUNET_CHAT_Message *msg) 363 const struct GNUNET_CHAT_Message *msg)
363{ 364{
@@ -373,7 +374,16 @@ event_receive_message(UNUSED MESSENGER_Application *app,
373 ); 374 );
374 375
375 UI_MESSAGE_Handle *message = ui_message_new(app, type); 376 UI_MESSAGE_Handle *message = ui_message_new(app, type);
376 ui_message_update(message, msg); 377
378 struct GNUNET_CHAT_File *file = GNUNET_CHAT_message_get_file(msg);
379
380 if (file)
381 {
382 file_create_info(file);
383 file_add_ui_message_to_info(file, message);
384 }
385
386 ui_message_update(message, app, msg);
377 387
378 const struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender( 388 const struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender(
379 msg 389 msg