From 986967ef8909e894cd0c691c74da7f50c4b91b3e Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 9 Dec 2012 00:21:33 +0000 Subject: Added /theme list command --- src/command.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/command.c') diff --git a/src/command.c b/src/command.c index 2b0d14bc..c81a7618 100644 --- a/src/command.c +++ b/src/command.c @@ -1223,10 +1223,19 @@ _cmd_prefs(gchar **args, struct cmd_help_t help) static gboolean _cmd_theme(gchar **args, struct cmd_help_t help) { - if (theme_load(args[0])) { + // list themes + if (strcmp(args[0], "list") == 0) { + GSList *themes = theme_list(); + cons_show_themes(themes); + 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 { cons_show("Couldn't find theme: %s", args[0]); } -- cgit 1.4.1-2-gfad0