upstream: Minor improve theme (038f345a4)

This commit is contained in:
2026-03-31 19:58:59 +03:00
parent e1de3eee8e
commit a7a09a813a
3 changed files with 92 additions and 116 deletions

View File

@@ -667,25 +667,17 @@ _theme_prep_fgnd(char* setting, GString* lookup_str, gboolean* bold)
}
}
char*
gchar*
theme_get_string(char* str)
{
gchar* res = g_key_file_get_string(theme, "colours", str, NULL);
if (!res) {
return strdup(g_hash_table_lookup(defaults, str));
return g_strdup(g_hash_table_lookup(defaults, str));
} else {
return res;
}
}
void
theme_free_string(char* str)
{
if (str) {
g_free(str);
}
}
int
theme_hash_attrs(const char* str)
{