XEP-0392: get background color from theme

So far we just used -1 (default color). Now we actually check whether
`bkgnd` is set in the theme file and use this if available.

Fix https://github.com/profanity-im/profanity/issues/1255
This commit is contained in:
Michael Vetter
2020-01-22 10:01:04 +01:00
parent dac6d088d0
commit 802df37926
3 changed files with 17 additions and 1 deletions

View File

@@ -618,6 +618,14 @@ _theme_prep_bgnd(char *setting, char *def, GString *lookup_str)
g_free(val);
}
/* return value needs to be freed */
char*
theme_get_bkgnd(void)
{
char *val = g_key_file_get_string(theme, "colours", "bkgnd", NULL);
return val;
}
static void
_theme_prep_fgnd(char *setting, GString *lookup_str, gboolean *bold)
{