summaryrefslogtreecommitdiff
path: root/build_tools
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2006-04-24 20:01:14 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2006-04-24 20:01:14 +0000
commitb2d355d07feac85a99ee254ac08e689c637783a7 (patch)
treec8e3e75e68258686eacc51dd0ab5cd30527b6bee /build_tools
parent72f2bf8135e1d7f2539897c16b4d71db78473502 (diff)
Move clueful 'h' more central; alias ESC to left arrow and make ESC quit on main menu
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'build_tools')
-rw-r--r--build_tools/menuselect_curses.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/build_tools/menuselect_curses.c b/build_tools/menuselect_curses.c
index ed30c917d..84e85861f 100644
--- a/build_tools/menuselect_curses.c
+++ b/build_tools/menuselect_curses.c
@@ -37,8 +37,9 @@
#define MENU_TITLE1 "*************************************"
#define MENU_TITLE2 "* Asterisk Module Selection *"
#define MENU_TITLE3 "*************************************"
+#define MENU_HELP "Press 'h' for help."
-#define TITLE_HEIGHT 5
+#define TITLE_HEIGHT 7
#define MIN_X 80
#define MIN_Y 20
@@ -199,6 +200,7 @@ int run_category_menu(WINDOW *menu, int cat_num)
/* XXX Move up the list by PAGE_OFFSET */
break;
case KEY_LEFT:
+ case 27: /* Esc key */
return 0;
case KEY_RIGHT:
case KEY_ENTER:
@@ -236,8 +238,8 @@ void draw_title_window(WINDOW *title)
waddstr(title, MENU_TITLE2);
wmove(title, 3, (max_x / 2) - (strlen(MENU_TITLE3) / 2));
waddstr(title, MENU_TITLE3);
- wmove(title, 0, 0);
- waddstr(title, "Press 'h' for help");
+ wmove(title, 5, (max_x / 2) - (strlen(MENU_HELP) / 2));
+ waddstr(title, MENU_HELP);
wrefresh(title);
}
@@ -298,11 +300,11 @@ int run_menu(void)
default:
break;
}
- if (c == 'q') {
+ if (c == 'q' || c == 'Q' || c == 27) {
res = -1;
break;
}
- if (c == 'x')
+ if (c == 'x' || c == 'X' || c == 's' || c == 'S')
break;
draw_main_menu(menu, curopt);
}