gui: Remove change_theme().
authorAndre Noll <maan@systemlinux.org>
Tue, 7 Jan 2014 22:08:00 +0000 (22:08 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 4 May 2014 13:48:54 +0000 (15:48 +0200)
It's silly to have a function for this.

gui.c
gui_theme.c

diff --git a/gui.c b/gui.c
index 25e852d..01af322 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -1411,27 +1411,18 @@ static void com_refresh(void)
        init_curses();
 }
 
-static void change_theme(int next)
-{
-       if (next)
-               theme_next(&theme);
-       else
-               theme_prev(&theme);
-       com_refresh();
-       PARA_NOTICE_LOG("new theme: %s\n", theme.name);
-}
-
 static void com_next_theme(void)
 {
-       change_theme(1);
+       theme_next(&theme);
+       com_refresh();
 }
 
 static void com_prev_theme(void)
 {
-       change_theme(0);
+       theme_prev(&theme);
+       com_refresh();
 }
 
-
 static void handle_command(int c)
 {
        int i;
index 3963d35..3c9886d 100644 (file)
@@ -381,6 +381,7 @@ static void set_theme(int num, struct gui_theme *t)
        t->name = themes[num].name;
        themes[num].init(t);
        current_theme_num = num;
+       PARA_NOTICE_LOG("theme: %s\n", t->name);
 }
 
 void theme_init(const char *name, struct gui_theme *t)