diff options
author | andmarti1424 <andmarti@gmail.com> | 2017-04-05 23:35:38 -0300 |
---|---|---|
committer | andmarti1424 <andmarti@gmail.com> | 2017-04-05 23:35:38 -0300 |
commit | f89bd0bd11631b676ec1894486e24759f0ffe853 (patch) | |
tree | 7283f91a6b6e0922486523bd8d069b2d0a9fb043 /src/help.c | |
parent | 72706a74191583a2828215d2cf3bd7dee8e16eb6 (diff) |
cleaned color.c
Diffstat (limited to 'src/help.c')
-rw-r--r-- | src/help.c | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -1,3 +1,4 @@ +#ifdef CURSES #include <ncurses.h> #include <unistd.h> #include <stdlib.h> @@ -8,7 +9,6 @@ #include "macros.h" #include "tui.h" #include "string.h" -#include "color.h" #include "utils/string.h" #include "help.h" #include "conf.h" @@ -102,7 +102,7 @@ void help() { wclrtobot(input_win); wrefresh(input_win); - set_ucolor(main_win, &ucolors[NORMAL]); + ui_set_ucolor(main_win, &ucolors[NORMAL]); wtimeout(input_win, -1); noecho(); curs_set(0); @@ -274,7 +274,7 @@ void find_word(char * word, char order) { if (look_result == -1) { sc_info("Pattern not found."); } - set_ucolor(input_win, &ucolors[NORMAL]); + ui_set_ucolor(input_win, &ucolors[NORMAL]); return; } @@ -289,14 +289,14 @@ int show_lines() { for (c = 0; c < strlen(long_help[lineno + delta]); c++) { if (long_help[lineno + delta][c] == '&') bold = ! bold; - bold ? set_ucolor(main_win, &ucolors[CELL_SELECTION_SC]) : set_ucolor(main_win, &ucolors[NORMAL]); + bold ? ui_set_ucolor(main_win, &ucolors[CELL_SELECTION_SC]) : ui_set_ucolor(main_win, &ucolors[NORMAL]); if (long_help[lineno + delta][c] == '&') { - set_ucolor(main_win, &ucolors[NORMAL]); + ui_set_ucolor(main_win, &ucolors[NORMAL]); continue; } else if (look_result != -1 && c >= look_result && c < look_result + strlen(word_looked) ) { - set_ucolor(main_win, &ucolors[CELL_SELECTION_SC]); + ui_set_ucolor(main_win, &ucolors[CELL_SELECTION_SC]); } mvwprintw(main_win, lineno, c, "%c", long_help[lineno + delta][c]); } @@ -310,3 +310,8 @@ int show_lines() { (void) wrefresh(main_win); return wgetch(input_win); } +#else +// implement this function if want to create another UI +void help() { +} +#endif |