| version 1.2, 2001/09/21 19:44:51 |
version 1.3, 2001/09/21 19:54:45 |
|
|
| */ |
*/ |
| /* |
/* |
| * $Log$ |
* $Log$ |
| |
* Revision 1.3 2001/09/21 19:54:45 host8 |
| |
* Cosmetics changes in *.c |
| |
* |
| * Revision 1.2 2001/09/21 19:44:51 host8 |
* Revision 1.2 2001/09/21 19:44:51 host8 |
| * Added $Log$ keyword substitution |
* Added $Log$ |
| |
* Added Revision 1.3 2001/09/21 19:54:45 host8 |
| |
* Added Cosmetics changes in *.c |
| |
* Added keyword substitution |
| * |
* |
| */ |
*/ |
| #ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
| Line 249 popup_menu_print(menu *m) |
|
| Line 255 popup_menu_print(menu *m) |
|
| for (i = 0; i < m->nitems; i++) |
for (i = 0; i < m->nitems; i++) |
| popup_menu_print_option(m, i, (i == m->selected)); |
popup_menu_print_option(m, i, (i == m->selected)); |
| for (i = (m->pos[m->nitems] + strlen(o->text)+2); i < m->width; i++) |
for (i = (m->pos[m->nitems] + strlen(o->text)+2); i < m->width; i++) |
| wprintw(m->win, " "); |
wprintw(m->win, " "); |
| wmove(m->win, 0, m->pos[m->selected]); |
wmove(m->win, 0, m->pos[m->selected]); |
| } |
} |
| |
|
| Line 405 do_menu(int type, PROCTABLE *p_ptbl, opt |
|
| Line 411 do_menu(int type, PROCTABLE *p_ptbl, opt |
|
| else s = 0; |
else s = 0; |
| break; |
break; |
| default: |
default: |
| if (type) |
if (type) |
| c = (c>='A' && c<='Z') ? c -'A' +'a' : c; |
c = (c>='A' && c<='Z') ? c -'A' +'a' : c; |
| for (i=0; i < m->nitems; i++) { |
for (i=0; i < m->nitems; i++) { |
| if (m->options[i].hotkey == c) { |
if (m->options[i].hotkey == c) { |
|
|
| touchwin(m->win); |
touchwin(m->win); |
| wrefresh(m->win); |
wrefresh(m->win); |
| } |
} |
| if (type) |
if (type) |
| retval = (*(m->options[m->selected].func)) |
retval = (*(m->options[m->selected].func)) |
| (p_ptbl, y+m->pos[m->selected]+1, x+m->width); |
(p_ptbl, y+m->pos[m->selected]+1, x+m->width); |
| else |
else |
| Line 574 void menu_curses_init(void) |
|
| Line 580 void menu_curses_init(void) |
|
| cbreak(); // necaka do odklepnutia enterom |
cbreak(); // necaka do odklepnutia enterom |
| noecho(); // mackane klavesy sa nevypisuju na obrazovku |
noecho(); // mackane klavesy sa nevypisuju na obrazovku |
| nonl(); |
nonl(); |
| keypad(stdscr, TRUE); // pouzivanie sipok |
keypad(stdscr, TRUE); // pouzivanie sipok |
| idlok(stdscr, TRUE); |
idlok(stdscr, TRUE); |
| scrollok(stdscr, TRUE); |
scrollok(stdscr, TRUE); |
| refresh(); |
refresh(); |
| Line 621 int main(int argc, char *argv[]) |
|
| Line 627 int main(int argc, char *argv[]) |
|
| } |
} |
| } |
} |
| } |
} |
| endwin(); |
endwin(); |
| exit(0); |
exit(0); |
| } |
} |
| |
|