diff options
author | Timo Sirainen <cras@irssi.org> | 2000-06-09 16:58:52 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-06-09 16:58:52 +0000 |
commit | 3fd3a03402c41f9e31bff05120e9c668cf3c2dc2 (patch) | |
tree | 024370d553661b45472bd59e19be1de5cc4f44a3 /src/fe-text | |
parent | 6ee0a40abb6d32221bfdb6dc0d995d8e7cd44233 (diff) | |
download | irssi-3fd3a03402c41f9e31bff05120e9c668cf3c2dc2.zip |
Beeps should work(?). ANSI colors had some bugs, bolds weren't working and
blinking crashed irssi.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@305 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/gui-printtext.c | 10 | ||||
-rw-r--r-- | src/fe-text/gui-textwidget.c | 2 | ||||
-rw-r--r-- | src/fe-text/gui-windows.h | 1 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/fe-text/gui-printtext.c b/src/fe-text/gui-printtext.c index c53e4674..2f1d5be8 100644 --- a/src/fe-text/gui-printtext.c +++ b/src/fe-text/gui-printtext.c @@ -210,7 +210,9 @@ static void line_add_colors(GUI_WINDOW_REC *gui, int fg, int bg, int flags) unsigned char buffer[12]; int color, pos; - color = (fg & 0x0f) | (bg << 4); + /* color should never have last bit on or it would be treated as a + command! */ + color = (fg & 0x0f) | ((bg & 0x0f) << 4); pos = 0; if (((fg & ATTR_COLOR8) == 0 && (fg|(bg << 4)) != gui->last_color) || @@ -227,14 +229,12 @@ static void line_add_colors(GUI_WINDOW_REC *gui, int fg, int bg, int flags) buffer[pos++] = 0; buffer[pos++] = LINE_CMD_COLOR8; } - if (flags & PRINTFLAG_BEEP) { - buffer[pos++] = 0; - buffer[pos++] = LINE_CMD_BEEP; - } if (flags & PRINTFLAG_INDENT) { buffer[pos++] = 0; buffer[pos++] = LINE_CMD_INDENT; } + if (flags & PRINTFLAG_BEEP) + beep(); linebuf_add(gui, (char *) buffer, pos); diff --git a/src/fe-text/gui-textwidget.c b/src/fe-text/gui-textwidget.c index 49841479..27767fd7 100644 --- a/src/fe-text/gui-textwidget.c +++ b/src/fe-text/gui-textwidget.c @@ -76,8 +76,6 @@ static gchar *gui_window_line2text(LINE_REC *line) color &= 0xfff0; color |= 8|ATTR_COLOR8; break; - case LINE_CMD_BEEP: - break; case LINE_CMD_INDENT: break; } diff --git a/src/fe-text/gui-windows.h b/src/fe-text/gui-windows.h index 622b5f4a..2d1a9a96 100644 --- a/src/fe-text/gui-windows.h +++ b/src/fe-text/gui-windows.h @@ -18,7 +18,6 @@ enum { LINE_CMD_OVERFLOW, /* buffer overflow! */ LINE_CMD_COLOR8, /* change to dark grey, normally 8 = bold black */ LINE_CMD_UNDERLINE, /* enable/disable underlining */ - LINE_CMD_BEEP, /* beep */ LINE_CMD_INDENT /* if line is split, indent it at this position */ }; |