Perl working again, better than ever (unless there's bugs :)

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@191 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-04-28 08:07:42 +00:00 committed by cras
commit a5a66264de
43 changed files with 1510 additions and 1004 deletions

View file

@ -807,23 +807,30 @@ static int sig_check_daychange(void)
return TRUE;
}
static void sig_gui_dialog(const char *type, const char *text)
void printtext_multiline(void *server, const char *channel, int level, const char *format, const char *text)
{
char **lines, **tmp;
if (g_strcasecmp(type, "warning") == 0)
type = _("%_Warning:%_ %s");
else if (g_strcasecmp(type, "error") == 0)
type = _("%_Error:%_ %s");
else
type = "%s";
lines = g_strsplit(text, "\n", -1);
for (tmp = lines; *tmp != NULL; tmp++)
printtext(NULL, NULL, MSGLEVEL_NEVER, type, *tmp);
printtext(NULL, NULL, MSGLEVEL_NEVER, format, *tmp);
g_strfreev(lines);
}
static void sig_gui_dialog(const char *type, const char *text)
{
char *format;
if (g_strcasecmp(type, "warning") == 0)
format = _("%_Warning:%_ %s");
else if (g_strcasecmp(type, "error") == 0)
format = _("%_Error:%_ %s");
else
format = "%s";
printtext_multiline(NULL, NULL, MSGLEVEL_NEVER, format, text);
}
static void read_settings(void)
{
toggle_show_timestamps = settings_get_bool("toggle_show_timestamps");