aboutsummaryrefslogtreecommitdiff
path: root/src/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/event.c')
-rw-r--r--src/event.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/event.c b/src/event.c
index 7335e91..8f913f2 100644
--- a/src/event.c
+++ b/src/event.c
@@ -160,7 +160,7 @@ event_update_profile(MESSENGER_Application *app)
160 hdy_avatar_set_text(ui->profile_avatar, name); 160 hdy_avatar_set_text(ui->profile_avatar, name);
161 gtk_label_set_text(ui->profile_label, name); 161 gtk_label_set_text(ui->profile_label, name);
162 162
163 UI_PROFILE_ENTRY_Handle *profile = ui_profile_entry_new(); 163 UI_PROFILE_ENTRY_Handle *profile = ui_profile_entry_new(app);
164 164
165 hdy_avatar_set_text(profile->entry_avatar, name); 165 hdy_avatar_set_text(profile->entry_avatar, name);
166 gtk_label_set_text(profile->entry_label, name); 166 gtk_label_set_text(profile->entry_label, name);
@@ -235,11 +235,7 @@ event_joining_contact(MESSENGER_Application *app,
235 if (!handle) 235 if (!handle)
236 return; 236 return;
237 237
238 UI_MESSAGE_Handle *message = ui_message_new( 238 UI_MESSAGE_Handle *message = ui_message_new(app, UI_MESSAGE_STATUS);
239 UI_MESSAGE_STATUS,
240 UI_MESSAGE_CONTENT_TEXT
241 );
242
243 ui_message_update(message, msg); 239 ui_message_update(message, msg);
244 240
245 struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender( 241 struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender(
@@ -328,11 +324,7 @@ event_invitation(UNUSED MESSENGER_Application *app,
328 if (!invitation) 324 if (!invitation)
329 return; 325 return;
330 326
331 UI_MESSAGE_Handle *message = ui_message_new( 327 UI_MESSAGE_Handle *message = ui_message_new(app, UI_MESSAGE_STATUS);
332 UI_MESSAGE_STATUS,
333 UI_MESSAGE_CONTENT_TEXT
334 );
335
336 ui_message_update(message, msg); 328 ui_message_update(message, msg);
337 329
338 const struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender( 330 const struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender(
@@ -384,15 +376,13 @@ event_receive_message(UNUSED MESSENGER_Application *app,
384 if (!handle) 376 if (!handle)
385 return; 377 return;
386 378
387 struct GNUNET_CHAT_File *file = GNUNET_CHAT_message_get_file(msg);
388
389 const int sent = GNUNET_CHAT_message_is_sent(msg); 379 const int sent = GNUNET_CHAT_message_is_sent(msg);
390 380
391 UI_MESSAGE_Handle *message = ui_message_new( 381 const UI_MESSAGE_Type type = (
392 GNUNET_YES == sent? UI_MESSAGE_SENT : UI_MESSAGE_DEFAULT, 382 GNUNET_YES == sent? UI_MESSAGE_SENT : UI_MESSAGE_DEFAULT
393 file? UI_MESSAGE_CONTENT_FILE : UI_MESSAGE_CONTENT_TEXT
394 ); 383 );
395 384
385 UI_MESSAGE_Handle *message = ui_message_new(app, type);
396 ui_message_update(message, msg); 386 ui_message_update(message, msg);
397 387
398 const struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender( 388 const struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender(