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

Added '/theme load name' to replace '/theme name'

This commit is contained in:
James Booth 2012-12-09 00:29:17 +00:00
parent bf1a574cfd
commit 53ac41057c

View File

@ -1235,14 +1235,16 @@ _cmd_theme(gchar **args, struct cmd_help_t help)
g_slist_free_full(themes, g_free); g_slist_free_full(themes, g_free);
// load a theme // load a theme
} else if (theme_load(args[0])) { } else if (strcmp(args[0], "load") == 0) {
ui_load_colours(); if (theme_load(args[1])) {
prefs_set_theme(args[0]); ui_load_colours();
cons_show("Loaded theme: %s", args[0]); prefs_set_theme(args[1]);
cons_show("Loaded theme: %s", args[1]);
// theme not found } else {
cons_show("Couldn't find theme: %s", args[1]);
}
} else { } else {
cons_show("Couldn't find theme: %s", args[0]); cons_show("Usage: %s", help.usage);
} }
return TRUE; return TRUE;