diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-15 20:02:15 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-15 20:02:15 +0000 |
commit | fc918570293831f974e448afa54c6973f863e54d (patch) | |
tree | f1d092e89148e71ef1378c9b28ae58b2e67e829d /src/fe-text | |
parent | cda63f03d417e906f369efe4c966265db2fa5159 (diff) | |
download | irssi-fc918570293831f974e448afa54c6973f863e54d.zip |
Changed the escaping system - theme_format_expand_data()'s
EXPAND_FLAG_IGNORE_EMPTY now also checks if the argument is a $variable that
is empty. Statusbar now first expands the formats and after then expands
$variables. Should fix at least when trying to print #$$$ channel in
statusbar.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2023 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text')
-rw-r--r-- | src/fe-text/statusbar.c | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/src/fe-text/statusbar.c b/src/fe-text/statusbar.c index fa90672a..cbbce605 100644 --- a/src/fe-text/statusbar.c +++ b/src/fe-text/statusbar.c @@ -297,20 +297,6 @@ static void statusbar_calc_item_positions(STATUSBAR_REC *bar) active_win = old_active_win; } -/*STATUSBAR_REC *statusbar_find(int pos, int line) -{ - GSList *tmp; - - for (tmp = statusbars; tmp != NULL; tmp = tmp->next) { - STATUSBAR_REC *rec = tmp->data; - - if (rec->pos == pos && rec->line == line) - return rec; - } - - return NULL; -}*/ - void statusbar_redraw(STATUSBAR_REC *bar, int force) { if (bar != NULL) { @@ -673,20 +659,17 @@ void statusbar_item_default_handler(SBAR_ITEM_REC *item, int get_size_only, wiitem = active_win->active; } - /* expand $variables */ - tmpstr = parse_special_string(str, server, wiitem, data, NULL, - (escape_vars ? PARSE_FLAG_ESCAPE_VARS : 0 ) | - PARSE_FLAG_ESCAPE_THEME); - /* expand templates */ - str = tmpstr; - tmpstr2 = theme_format_expand_data(current_theme, &str, - 'n', 'n', - NULL, NULL, - EXPAND_FLAG_ROOT | - EXPAND_FLAG_IGNORE_REPLACES | - EXPAND_FLAG_IGNORE_EMPTY); - g_free(tmpstr); + tmpstr = theme_format_expand_data(current_theme, &str, + 'n', 'n', + NULL, NULL, + EXPAND_FLAG_ROOT | + EXPAND_FLAG_IGNORE_REPLACES | + EXPAND_FLAG_IGNORE_EMPTY); + /* expand $variables */ + tmpstr2 = parse_special_string(tmpstr, server, wiitem, data, NULL, + (escape_vars ? PARSE_FLAG_ESCAPE_VARS : 0 )); + g_free(tmpstr); /* remove color codes (not %formats) */ tmpstr = strip_codes(tmpstr2); |