]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
gui: Simplify print_status_bar().
authorAndre Noll <maan@systemlinux.org>
Sun, 26 Jan 2014 17:39:56 +0000 (18:39 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 4 May 2014 12:04:04 +0000 (14:04 +0200)
Curses is always active at this point, so remove the check. Moreover,
refreshing of all other windows is performed in init_wins(), so move
the call to wrefresh() there to be consistent. Finally, the comment
of this function is rather pointless, so remove that as well.

gui.c

diff --git a/gui.c b/gui.c
index e4849fbab3f622ea160494bf7bbc9bdc653337cc..63e0090f03ca3641aa9f3675f438c8c02128e0d5 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -360,20 +360,14 @@ __printf_2_3 static void print_in_bar(int color, const char *fmt,...)
        wrefresh(in.win);
 }
 
-/*
- * update the status bar
- */
 static void print_status_bar(void)
 {
        char *tmp;
 
-       if (!curses_active)
-               return;
        tmp = para_strdup("para_gui " PACKAGE_VERSION " (hit ? for help)");
        wmove(sb.win, 0, 0);
        align_str(sb.win, tmp, sb.cols, CENTER);
        free(tmp);
-       wrefresh(sb.win);
 }
 
 /*
@@ -685,8 +679,8 @@ static void init_wins(int top_lines)
        //wclear(bot.win);
        wnoutrefresh(top.win);
        wnoutrefresh(bot.win);
-       //wnoutrefresh(sb.win);
        print_status_bar();
+       wnoutrefresh(sb.win);
        wnoutrefresh(in.win);
        wnoutrefresh(sep.win);
        doupdate();