aboutsummaryrefslogtreecommitdiff
path: root/src/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/event.c')
-rw-r--r--src/event.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/event.c b/src/event.c
index c3e4ac6..2280785 100644
--- a/src/event.c
+++ b/src/event.c
@@ -190,7 +190,10 @@ event_joining_contact(MESSENGER_Application *app,
190 190
191 ui_chat_entry_update(handle, app, context); 191 ui_chat_entry_update(handle, app, context);
192 192
193 UI_MESSAGE_Handle *message = ui_message_new(UI_MESSAGE_STATUS); 193 UI_MESSAGE_Handle *message = ui_message_new(
194 UI_MESSAGE_STATUS,
195 UI_MESSAGE_CONTENT_TEXT
196 );
194 197
195 struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender( 198 struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender(
196 msg 199 msg
@@ -209,7 +212,7 @@ event_joining_contact(MESSENGER_Application *app,
209 message->message_box 212 message->message_box
210 ); 213 );
211 214
212 ui_message_delete(message); 215 handle->chat->messages = g_list_append(handle->chat->messages, message);
213} 216}
214 217
215void 218void
@@ -259,7 +262,10 @@ event_invitation(UNUSED MESSENGER_Application *app,
259 if (!invitation) 262 if (!invitation)
260 return; 263 return;
261 264
262 UI_MESSAGE_Handle *message = ui_message_new(UI_MESSAGE_STATUS); 265 UI_MESSAGE_Handle *message = ui_message_new(
266 UI_MESSAGE_STATUS,
267 UI_MESSAGE_CONTENT_TEXT
268 );
263 269
264 const struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender( 270 const struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender(
265 msg 271 msg
@@ -285,7 +291,7 @@ event_invitation(UNUSED MESSENGER_Application *app,
285 message->message_box 291 message->message_box
286 ); 292 );
287 293
288 ui_message_delete(message); 294 handle->chat->messages = g_list_append(handle->chat->messages, message);
289} 295}
290 296
291void 297void
@@ -301,7 +307,8 @@ event_receive_message(UNUSED MESSENGER_Application *app,
301 const int sent = GNUNET_CHAT_message_is_sent(msg); 307 const int sent = GNUNET_CHAT_message_is_sent(msg);
302 308
303 UI_MESSAGE_Handle *message = ui_message_new( 309 UI_MESSAGE_Handle *message = ui_message_new(
304 GNUNET_YES == sent? UI_MESSAGE_SENT : UI_MESSAGE_DEFAULT 310 GNUNET_YES == sent? UI_MESSAGE_SENT : UI_MESSAGE_DEFAULT,
311 UI_MESSAGE_CONTENT_TEXT
305 ); 312 );
306 313
307 const struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender( 314 const struct GNUNET_CHAT_Contact *contact = GNUNET_CHAT_message_get_sender(
@@ -329,7 +336,7 @@ event_receive_message(UNUSED MESSENGER_Application *app,
329 message->message_box 336 message->message_box
330 ); 337 );
331 338
332 ui_message_delete(message); 339 handle->chat->messages = g_list_append(handle->chat->messages, message);
333 340
334 gtk_label_set_text(handle->text_label, text? text : ""); 341 gtk_label_set_text(handle->text_label, text? text : "");
335 gtk_label_set_text(handle->timestamp_label, time? time : ""); 342 gtk_label_set_text(handle->timestamp_label, time? time : "");