diff options
author | Timo Sirainen <cras@irssi.org> | 2002-12-11 10:00:51 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-12-11 10:00:51 +0000 |
commit | e0c66e31224894674356ddaf6d46016c1abc994f (patch) | |
tree | 01996c2a7b6b32deeb06557f9d2f983ac6afcd37 /src | |
parent | 7aacb9638b82bb210f294936a4632b0b924a39a7 (diff) | |
download | irssi-e0c66e31224894674356ddaf6d46016c1abc994f.zip |
Previous theme patch fixes by c0ffee
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3058 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-common/core/themes.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c index 0d543843..e7ad151c 100644 --- a/src/fe-common/core/themes.c +++ b/src/fe-common/core/themes.c @@ -314,7 +314,11 @@ char *theme_format_expand_get(THEME_REC *theme, const char **format) braces++; else if (**format == '}') braces--; - else { + else if ((braces > 1) && (**format == ' ')) { + g_string_append(str, "\\x20"); + (*format)++; + continue; + } else { theme_format_append_next(theme, str, format, 'n', 'n', &dummy, &dummy, 0); @@ -341,6 +345,7 @@ static char *theme_format_expand_abstract(THEME_REC *theme, char default_fg, char default_bg, int flags) { + GString *str; const char *p, *format; char *abstract, *data, *ret; int len; @@ -400,7 +405,21 @@ static char *theme_format_expand_abstract(THEME_REC *theme, PARSE_FLAG_ONLY_ARGS); g_free(abstract); g_free(data); - abstract = ret; + str = g_string_new(NULL); + p = ret; + while (*p != '\0') { + if (*p == '\\') { + int chr; + p++; + chr = expand_escape(&p); + g_string_append_c(str, chr != -1 ? chr : *p); + } else + g_string_append_c(str, *p); + p++; + } + g_free(ret); + abstract = str->str; + g_string_free(str, FALSE); /* abstract may itself contain abstracts or replaces */ p = abstract; |