1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Allow bold for default colours

This commit is contained in:
Paul Fertser 2022-04-01 17:00:13 +03:00
parent cef0c5e927
commit 4217105ff0

View File

@ -663,11 +663,12 @@ theme_get_bkgnd(void)
static void
_theme_prep_fgnd(char* setting, GString* lookup_str, gboolean* bold)
{
gchar* val = g_key_file_get_string(theme, "colours", setting, NULL);
if (!val) {
char* def = g_hash_table_lookup(defaults, setting);
g_string_append(lookup_str, def);
} else {
gchar* conf_str = g_key_file_get_string(theme, "colours", setting, NULL);
gchar* val = conf_str;
if (!val)
val = g_hash_table_lookup(defaults, setting);
if (g_str_has_prefix(val, "bold_")) {
g_string_append(lookup_str, &val[5]);
*bold = TRUE;
@ -675,8 +676,8 @@ _theme_prep_fgnd(char* setting, GString* lookup_str, gboolean* bold)
g_string_append(lookup_str, val);
*bold = FALSE;
}
}
g_free(val);
g_free(conf_str);
}
char*