diff options
author | James Booth <boothj5@gmail.com> | 2012-12-09 00:29:17 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-12-09 00:29:17 +0000 |
commit | 53ac41057c4c382a507a03aaeb589fd22eba83a1 (patch) | |
tree | 1bd5090f553339c7662aff3fa15dc27c9fb936a1 | |
parent | bf1a574cfd9bfbef7e1d5aa08c22a494d7733e95 (diff) | |
download | profani-tty-53ac41057c4c382a507a03aaeb589fd22eba83a1.tar.gz |
Added '/theme load name' to replace '/theme name'
-rw-r--r-- | src/command.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/command.c b/src/command.c index a9ca5edf..d6092940 100644 --- a/src/command.c +++ b/src/command.c @@ -1235,14 +1235,16 @@ _cmd_theme(gchar **args, struct cmd_help_t help) g_slist_free_full(themes, g_free); // load a theme - } else if (theme_load(args[0])) { - ui_load_colours(); - prefs_set_theme(args[0]); - cons_show("Loaded theme: %s", args[0]); - - // theme not found + } else if (strcmp(args[0], "load") == 0) { + if (theme_load(args[1])) { + ui_load_colours(); + prefs_set_theme(args[1]); + cons_show("Loaded theme: %s", args[1]); + } else { + cons_show("Couldn't find theme: %s", args[1]); + } } else { - cons_show("Couldn't find theme: %s", args[0]); + cons_show("Usage: %s", help.usage); } return TRUE; |