summaryrefslogtreecommitdiffstats
path: root/src/hci/tui
diff options
context:
space:
mode:
authorGlenn Brown2010-06-23 22:18:35 +0200
committerMichael Brown2010-06-25 00:34:43 +0200
commit978c840365894598f4c3046e8680e3567e1bfa97 (patch)
treeece0af39a9087423c3343ba445bb4a671ac5a495 /src/hci/tui
parent[settings] Enable jump scroll in config UI (diff)
downloadipxe-978c840365894598f4c3046e8680e3567e1bfa97.tar.gz
ipxe-978c840365894598f4c3046e8680e3567e1bfa97.tar.xz
ipxe-978c840365894598f4c3046e8680e3567e1bfa97.zip
[settings] Add setting deletion (Ctrl-D) interface
Make Ctrl-D delete a setting, because the Text User Interface (tui) previously provided no way to delete a setting. Also, update the on-screen instructions to describe the new feature. Deleting settings is especially important for settings stored in precious nonvolatile storage. Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci/tui')
-rw-r--r--src/hci/tui/settings_ui.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/hci/tui/settings_ui.c b/src/hci/tui/settings_ui.c
index dce0b5d5..b8fe207f 100644
--- a/src/hci/tui/settings_ui.c
+++ b/src/hci/tui/settings_ui.c
@@ -326,6 +326,7 @@ static void draw_instruction_row ( int editing ) {
"Ctrl-C - discard changes" );
} else {
msg ( INSTRUCTION_ROW,
+ "Ctrl-D - delete setting" INSTRUCTION_PAD
"Ctrl-X - exit configuration utility" );
}
}
@@ -430,6 +431,12 @@ static int main_loop ( struct settings *settings ) {
if ( next > 0 )
reveal ( &widget, --next ) ;
break;
+ case CTRL_D:
+ delete_setting ( widget.settings,
+ widget.setting );
+ select_setting ( &widget, next );
+ draw_setting ( &widget );
+ break;
case CTRL_X:
return 0;
default: