diff options
author | Timo Sirainen <cras@irssi.org> | 2000-10-28 20:14:19 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-10-28 20:14:19 +0000 |
commit | 4dcbe05c0f67fe9e914ba323ce7e179885ebb1f7 (patch) | |
tree | f235d6f427cd0dd7e98dfbd36813a1098e127faa /src/fe-text/gui-textwidget.c | |
parent | 8653c6ea36c29067a358ed59782b71ffd1401fc3 (diff) | |
download | irssi-4dcbe05c0f67fe9e914ba323ce7e179885ebb1f7.zip |
Cleaned up printtext.c, split part of it to formats.c
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@796 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/gui-textwidget.c')
-rw-r--r-- | src/fe-text/gui-textwidget.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/fe-text/gui-textwidget.c b/src/fe-text/gui-textwidget.c index 9b16e691..04055bb4 100644 --- a/src/fe-text/gui-textwidget.c +++ b/src/fe-text/gui-textwidget.c @@ -28,6 +28,7 @@ #include "irc-servers.h" #include "windows.h" +#include "printtext.h" #include "screen.h" #include "gui-windows.h" @@ -56,8 +57,8 @@ static gchar *gui_window_line2text(LINE_REC *line) { /* set color */ color = *ptr; - g_string_sprintfa(str, "\003%c%c", (color & 0x07)+1, ((color & 0xf0) >> 4)+1); - if (color & 0x08) g_string_sprintfa(str, "\002"); + g_string_sprintfa(str, "\004%c%c", (color & 0x0f)+'0', + ((color & 0xf0) >> 4)+'0'); } else switch ((guchar) *ptr) { @@ -73,16 +74,19 @@ static gchar *gui_window_line2text(LINE_REC *line) g_string_append_c(str, 31); break; case LINE_CMD_COLOR0: - g_string_sprintfa(str, "\003%c%c", 1, ((color & 0xf0) >> 4)+1); + g_string_sprintfa(str, "\004%c%c", + '0', ((color & 0xf0) >> 4)+'0'); break; case LINE_CMD_COLOR8: - g_string_sprintfa(str, "\003%c%c", 9, ((color & 0xf0) >> 4)+1); + g_string_sprintfa(str, "\004%c%c", + '8', ((color & 0xf0) >> 4)+'0'); color &= 0xfff0; color |= 8|ATTR_COLOR8; break; case LINE_CMD_BLINK: color |= 0x80; - g_string_sprintfa(str, "\003%c%c", (color & 0x0f)+1, ((color & 0xf0) >> 4)+1); + g_string_sprintfa(str, "\004%c%c", (color & 0x0f)+'0', + ((color & 0xf0) >> 4)+'0'); break; case LINE_CMD_INDENT: break; |