mirror of
https://github.com/irssi/irssi.git
synced 2025-01-03 14:56:47 -05:00
Previous theme patch fixes by c0ffee
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3058 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
7aacb9638b
commit
e0c66e3122
@ -314,7 +314,11 @@ char *theme_format_expand_get(THEME_REC *theme, const char **format)
|
|||||||
braces++;
|
braces++;
|
||||||
else if (**format == '}')
|
else if (**format == '}')
|
||||||
braces--;
|
braces--;
|
||||||
else {
|
else if ((braces > 1) && (**format == ' ')) {
|
||||||
|
g_string_append(str, "\\x20");
|
||||||
|
(*format)++;
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
theme_format_append_next(theme, str, format,
|
theme_format_append_next(theme, str, format,
|
||||||
'n', 'n',
|
'n', 'n',
|
||||||
&dummy, &dummy, 0);
|
&dummy, &dummy, 0);
|
||||||
@ -341,6 +345,7 @@ static char *theme_format_expand_abstract(THEME_REC *theme,
|
|||||||
char default_fg, char default_bg,
|
char default_fg, char default_bg,
|
||||||
int flags)
|
int flags)
|
||||||
{
|
{
|
||||||
|
GString *str;
|
||||||
const char *p, *format;
|
const char *p, *format;
|
||||||
char *abstract, *data, *ret;
|
char *abstract, *data, *ret;
|
||||||
int len;
|
int len;
|
||||||
@ -400,7 +405,21 @@ static char *theme_format_expand_abstract(THEME_REC *theme,
|
|||||||
PARSE_FLAG_ONLY_ARGS);
|
PARSE_FLAG_ONLY_ARGS);
|
||||||
g_free(abstract);
|
g_free(abstract);
|
||||||
g_free(data);
|
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 */
|
/* abstract may itself contain abstracts or replaces */
|
||||||
p = abstract;
|
p = abstract;
|
||||||
|
Loading…
Reference in New Issue
Block a user