/LOAD without parameters prints loaded modules

GLib warnings/criticals are now printed with printformat(), not into
standard output messing up the screen.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1096 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-01-09 17:25:21 +00:00 committed by cras
commit d6ee17e8cd
4 changed files with 65 additions and 10 deletions

View file

@ -194,10 +194,36 @@ void fe_common_core_deinit(void)
signal_remove("channel destroyed", (SIGNAL_FUNC) sig_channel_destroyed);
}
void glog_func(const char *log_domain, GLogLevelFlags log_level,
const char *message)
{
const char *reason;
switch (log_level) {
case G_LOG_LEVEL_WARNING:
reason = "warning";
break;
case G_LOG_LEVEL_CRITICAL:
reason = "critical";
break;
default:
reason = "error";
break;
}
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
TXT_GLIB_ERROR, reason, message);
}
void fe_common_core_finish_init(void)
{
WINDOW_REC *window;
g_log_set_handler(G_LOG_DOMAIN,
(GLogLevelFlags) (G_LOG_LEVEL_CRITICAL |
G_LOG_LEVEL_WARNING),
(GLogFunc) glog_func, NULL);
signal_emit("irssi init read settings", 0);
#ifdef SIGPIPE