1
0
mirror of https://github.com/irssi/irssi.git synced 2025-01-03 14:56:47 -05:00

%F = blinking on/off. several fixes to make blinking work better. some

hilight fixes.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1403 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-03-17 02:32:32 +00:00 committed by cras
parent c3da7fa8ab
commit d9008ae249
7 changed files with 20 additions and 14 deletions

View File

@ -13,6 +13,7 @@
%c %C %6 cyan bold cyan cyan
%w %W %7 white bold white white
%n %N Turn off all colors and other formatting
%F Blinking on/off (think: flash)
%U Underline on/off
%8 Reverse on/off
%9 %_ Bold on/off

View File

@ -62,6 +62,7 @@ void channel_destroy(CHANNEL_REC *channel)
signal_emit("channel destroyed", 1, channel);
MODULE_DATA_DEINIT(channel);
g_free_not_null(channel->hilight_color);
g_free_not_null(channel->topic);
g_free_not_null(channel->topic_by);
g_free_not_null(channel->key);

View File

@ -62,6 +62,7 @@ void query_destroy(QUERY_REC *query)
signal_emit("query destroyed", 1, query);
MODULE_DATA_DEINIT(query);
g_free_not_null(query->hilight_color);
g_free_not_null(query->server_tag);
g_free_not_null(query->address);
g_free(query->name);

View File

@ -93,7 +93,9 @@ int format_expand_styles(GString *out, char format)
g_string_append_c(out, FORMAT_STYLE_INDENT);
break;
case 'F':
/* flashing - ignore */
/* blink */
g_string_append_c(out, 4);
g_string_append_c(out, FORMAT_STYLE_BLINK);
break;
case 'n':
case 'N':
@ -845,6 +847,9 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text)
/* user specific colors */
flags &= ~PRINTFLAG_MIRC_COLOR;
switch (*ptr) {
case FORMAT_STYLE_BLINK:
flags ^= PRINTFLAG_BLINK;
break;
case FORMAT_STYLE_UNDERLINE:
flags ^= PRINTFLAG_UNDERLINE;
break;

View File

@ -101,11 +101,12 @@ void format_send_to_gui(TEXT_DEST_REC *dest, const char *text);
#define FORMAT_COLOR_NOCHANGE ('0'-1) /* don't change this, at least hilighting depends this value */
#define FORMAT_STYLE_SPECIAL 0x60
#define FORMAT_STYLE_UNDERLINE (0x01 + FORMAT_STYLE_SPECIAL)
#define FORMAT_STYLE_BOLD (0x02 + FORMAT_STYLE_SPECIAL)
#define FORMAT_STYLE_REVERSE (0x03 + FORMAT_STYLE_SPECIAL)
#define FORMAT_STYLE_INDENT (0x04 + FORMAT_STYLE_SPECIAL)
#define FORMAT_STYLE_DEFAULTS (0x05 + FORMAT_STYLE_SPECIAL)
#define FORMAT_STYLE_BLINK (0x01 + FORMAT_STYLE_SPECIAL)
#define FORMAT_STYLE_UNDERLINE (0x02 + FORMAT_STYLE_SPECIAL)
#define FORMAT_STYLE_BOLD (0x03 + FORMAT_STYLE_SPECIAL)
#define FORMAT_STYLE_REVERSE (0x04 + FORMAT_STYLE_SPECIAL)
#define FORMAT_STYLE_INDENT (0x05 + FORMAT_STYLE_SPECIAL)
#define FORMAT_STYLE_DEFAULTS (0x06 + FORMAT_STYLE_SPECIAL)
int format_expand_styles(GString *out, char format);
void formats_init(void);

View File

@ -186,16 +186,13 @@ static void theme_format_append_next(THEME_REC *theme, GString *str,
chr = **format;
if (**format == 'n') {
/* %n = change to default color */
if (default_fg == 'n' || default_bg == 'n') {
if (*last_fg != 'n')
g_string_append(str, "%n");
*last_bg = *last_fg = 'n';
}
if (default_bg != *last_bg) {
g_string_append(str, "%n");
if (default_bg != 'n') {
g_string_append_c(str, '%');
g_string_append_c(str, default_bg);
}
if (default_fg != *last_fg) {
if (default_fg != 'n') {
g_string_append_c(str, '%');
g_string_append_c(str, default_fg);
}

View File

@ -307,7 +307,7 @@ static void get_colors(int flags, int *fg, int *bg)
*fg |= 8;
}
if (flags & PRINTFLAG_UNDERLINE) *fg |= ATTR_UNDERLINE;
if (flags & PRINTFLAG_BLINK) *bg |= 0x80;
if (flags & PRINTFLAG_BLINK) *bg |= 0x08;
}
static void linebuf_add(GUI_WINDOW_REC *gui, const char *str, int len)