From a749fdae21a6228fe1d07f43da7b72fa8a46342f Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Thu, 13 Feb 2020 11:13:00 -0300 Subject: [PATCH] Redirecting gtk logs to lib3270. --- src/main/main.c | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/src/main/main.c b/src/main/main.c index 426516f..6dd4b5d 100644 --- a/src/main/main.c +++ b/src/main/main.c @@ -70,6 +70,10 @@ static gboolean quit_signal(GtkApplication *app) { } #endif // G_OS_UNIX +static void g_log_to_lib3270(const gchar *log_domain,GLogLevelFlags G_GNUC_UNUSED(log_level),const gchar *message,gpointer G_GNUC_UNUSED(user_data)) { + lib3270_write_log(NULL,log_domain,"%s",message); +} + int main (int argc, char **argv) { GtkApplication *app; @@ -91,6 +95,8 @@ int main (int argc, char **argv) { } #endif // _WIN32 + g_log_set_default_handler(g_log_to_lib3270,NULL); + bind_textdomain_codeset(PACKAGE_NAME, "UTF-8"); textdomain(PACKAGE_NAME); -- libgit2 0.21.2