messenger-gtk

Gtk+3 graphical user interfaces for GNUnet Messenger
Log | Files | Refs | Submodules | README | LICENSE

commit aed032038587a0c4243c0584031dbbb496f650c0
parent 8e8f7bf802109d986f7c2c083b1622d25c7f5356
Author: TheJackiMonster <thejackimonster@gmail.com>
Date:   Mon, 14 Mar 2022 20:49:09 +0100

Cleanup console output

Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>

Diffstat:
Msrc/chat/messenger.c | 18+-----------------
Msrc/event.c | 2++
2 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/src/chat/messenger.c b/src/chat/messenger.c @@ -82,24 +82,9 @@ _chat_messenger_message(void *cls, const struct GNUNET_CHAT_Message *message) { MESSENGER_Application *app = (MESSENGER_Application*) cls; - pthread_mutex_lock(&(app->chat.mutex)); - const enum GNUNET_CHAT_MessageKind kind = GNUNET_CHAT_message_get_kind(message); - const struct GNUNET_CHAT_Contact* sender = GNUNET_CHAT_message_get_sender(message); - - struct GNUNET_TIME_Absolute time = GNUNET_CHAT_message_get_timestamp(message); - - printf("- %d, %lu", kind, time.abs_value_us); - - if (GNUNET_YES == GNUNET_CHAT_message_is_sent(message)) - printf(", [!]\n"); - else if (sender) - printf(", %s\n", GNUNET_CHAT_contact_get_name(sender)); - else - printf("\n"); - - switch (kind) + switch (GNUNET_CHAT_message_get_kind(message)) { case GNUNET_CHAT_KIND_WARNING: application_call_message_event( @@ -189,7 +174,6 @@ _chat_messenger_message(void *cls, } pthread_mutex_unlock(&(app->chat.mutex)); - return GNUNET_YES; } diff --git a/src/event.c b/src/event.c @@ -91,6 +91,8 @@ event_handle_warning(MESSENGER_Application *app, msg ); + fprintf(stderr, "ERROR: %s\n", text); + _show_notification( app, context,