Make Ctrl-D delete a settings, 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 storate.
---
 src/hci/tui/settings_ui.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/hci/tui/settings_ui.c b/src/hci/tui/settings_ui.c
index 61ea3e4..1915e58 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:
-- 
1.7.0.4

_______________________________________________
gPXE-devel mailing list
[email protected]
http://etherboot.org/mailman/listinfo/gpxe-devel

Reply via email to