Add -t theme option

`profanity -t bios` loads the bios theme now.

Fix https://github.com/profanity-im/profanity/issues/1286
This commit is contained in:
Michael Vetter
2020-03-24 23:00:39 +01:00
parent 4c8e78664c
commit 4f19ea2642
4 changed files with 27 additions and 11 deletions

View File

@@ -67,8 +67,12 @@ static gboolean _theme_load_file(const char *const theme_name);
void
theme_init(const char *const theme_name)
{
if (!_theme_load_file(theme_name) && !_theme_load_file("default")) {
log_error("Theme initialisation failed");
if (!_theme_load_file(theme_name)) {
log_error("Loading theme %s failed.", theme_name);
if (!_theme_load_file("default")) {
log_error("Theme initialisation failed.");
}
}
defaults = g_hash_table_new_full(g_str_hash, g_str_equal, free, free);