X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=gui.c;h=c0588197c553e1728713e0e964c61041eb02e7ef;hp=ab66bbb262d38efe8b4501034d3a8e651a07b5bd;hb=1457610326a2f03878d310c15c1884e22eed92d2;hpb=75529c7cb29903302931db92f04cb3b510eb6317 diff --git a/gui.c b/gui.c index ab66bbb2..c0588197 100644 --- a/gui.c +++ b/gui.c @@ -31,7 +31,7 @@ INIT_GUI_ERRLISTS; extern const char *status_item_list[NUM_STAT_ITEMS]; static char *stat_content[NUM_STAT_ITEMS]; -#define STANDARD_STATUS_BAR "para_gui " VERSION " (hit ? for help)" +#define STANDARD_STATUS_BAR "para_gui " PACKAGE_VERSION " (hit ? for help)" static int signal_pipe; @@ -339,7 +339,7 @@ static void print_status_bar(void) if (!curses_active) return; wmove(sb.win, 0, 0); - align_str(sb.win,STANDARD_STATUS_BAR, sb.cols, CENTER); + align_str(sb.win, STANDARD_STATUS_BAR, sb.cols, CENTER); wrefresh(sb.win); } @@ -540,7 +540,7 @@ static void print_welcome(void) int ll = conf.loglevel_arg; if (ll > NOTICE) return; - outputf(COLOR_WELCOME, "Welcome to para_gui " VERSION + outputf(COLOR_WELCOME, "Welcome to para_gui " PACKAGE_VERSION " \"" CODENAME "\". Theme: %s", theme.name); wclrtoeol(bot.win); } @@ -893,8 +893,6 @@ repeat: /* command pipe only for COMMAND_MODE */ if (command_pipe >= 0 && mode == COMMAND_MODE) para_fd_set(command_pipe, &rfds, &max_fileno); - if (curses_active) - para_fd_set(STDIN_FILENO, &rfds, &max_fileno); ret = para_select(max_fileno + 1, &rfds, NULL, &tv); if (ret <= 0) goto check_return; /* skip fd checks */ @@ -1085,22 +1083,22 @@ static void com_scroll_up(void) { struct rb_entry *rbe = NULL; unsigned lines; - int i, first_rbe, scroll; + int i, first_rbe, num_scroll; /* the entry that is going to vanish */ rbe = ringbuffer_get(bot_win_rb, scroll_position); if (!rbe) goto err_out; - scroll = NUM_LINES(rbe->len); + num_scroll = NUM_LINES(rbe->len); first_rbe = first_visible_rbe(&lines); if (first_rbe < 0 || (first_rbe == ringbuffer_filled(bot_win_rb) - 1)) goto err_out; scroll_position++; - wscrl(bot.win, -scroll); + wscrl(bot.win, -num_scroll); i = draw_top_rbe(&lines); if (i < 0) goto err_out; - while (i > 0 && lines < scroll) { + while (i > 0 && lines < num_scroll) { int rbe_lines; rbe = ringbuffer_get(bot_win_rb, --i); if (!rbe) @@ -1226,7 +1224,8 @@ static void com_enlarge_top_win(void) static void com_version(void) { - print_in_bar(COLOR_MSG, "para_gui " VERSION " \"" CODENAME "\""); + print_in_bar(COLOR_MSG, "para_gui " PACKAGE_VERSION " \"" + CODENAME "\""); } static void com_quit(void) @@ -1341,11 +1340,6 @@ int main(int argc, char *argv[]) initscr(); /* needed only once, always successful */ init_curses(); print_welcome(); - ret = mark_fd_nonblock(STDIN_FILENO); - if (ret < 0) { - PARA_EMERG_LOG("%s\n", PARA_STRERROR(-ret)); - exit(EXIT_FAILURE); - } for (;;) { print_status_bar(); ret = do_select(GETCH_MODE);