[svn-commits] seanbright: trunk r382 - /trunk/menuselect_newt.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Nov 5 10:14:10 CST 2008
Author: seanbright
Date: Thu Sep 11 18:55:34 2008
New Revision: 382
URL: http://svn.digium.com/view/menuselect?view=rev&rev=382
Log:
Add a 'Save & Exit' button as well so you can skip the 'are you sure?' dialog
if you know what you are doing.
Modified:
trunk/menuselect_newt.c
Modified: trunk/menuselect_newt.c
URL: http://svn.digium.com/view/menuselect/trunk/menuselect_newt.c?view=diff&rev=382&r1=381&r2=382
==============================================================================
--- trunk/menuselect_newt.c (original)
+++ trunk/menuselect_newt.c Thu Sep 11 18:55:34 2008
@@ -48,6 +48,7 @@
static newtComponent conflictsDataTextbox;
static newtComponent exitButton;
+static newtComponent saveAndExitButton;
static void build_members_menu(int overlay);
static void root_menu_callback(newtComponent component, void *data);
@@ -286,6 +287,7 @@
conflictsDataTextbox = newtTextbox(18, y - 9, x - 27, 1, 0);
exitButton = newtButton(x - 23, y - 11, " Exit ");
+ saveAndExitButton = newtButton(x - 43, y - 11, " Save & Exit ");
newtFormAddComponents(
form,
@@ -296,6 +298,7 @@
usesDataTextbox,
conflictsLabel,
conflictsDataTextbox,
+ saveAndExitButton,
exitButton,
NULL);
@@ -339,7 +342,10 @@
break;
}
} else if (es.reason == NEWT_EXIT_COMPONENT) {
- if (es.u.co == exitButton) {
+ if (es.u.co == saveAndExitButton) {
+ res = 0;
+ break;
+ } else if (es.u.co == exitButton) {
int done = 1;
if (changes_made) {
More information about the svn-commits
mailing list