[asterisk-commits] trunk r22308 - /trunk/build_tools/menuselect_curses.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Apr 24 13:01:15 MST 2006


Author: tilghman
Date: Mon Apr 24 15:01:14 2006
New Revision: 22308

URL: http://svn.digium.com/view/asterisk?rev=22308&view=rev
Log:
Move clueful 'h' more central; alias ESC to left arrow and make ESC quit on main menu

Modified:
    trunk/build_tools/menuselect_curses.c

Modified: trunk/build_tools/menuselect_curses.c
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/menuselect_curses.c?rev=22308&r1=22307&r2=22308&view=diff
==============================================================================
--- trunk/build_tools/menuselect_curses.c (original)
+++ trunk/build_tools/menuselect_curses.c Mon Apr 24 15:01:14 2006
@@ -37,8 +37,9 @@
 #define MENU_TITLE1	"*************************************"
 #define MENU_TITLE2	"*     Asterisk Module Selection     *"
 #define MENU_TITLE3	"*************************************"
-
-#define TITLE_HEIGHT	5
+#define MENU_HELP	"Press 'h' for help."
+
+#define TITLE_HEIGHT	7
 
 #define MIN_X		80
 #define MIN_Y		20
@@ -199,6 +200,7 @@
 			/* 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 @@
 	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 @@
 		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);
 	}



More information about the asterisk-commits mailing list