Browse Source

[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>
tags/v1.20.1
Glenn Brown 14 years ago
parent
commit
978c840365
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      src/hci/tui/settings_ui.c

+ 7
- 0
src/hci/tui/settings_ui.c View File

326
 		      "Ctrl-C - discard changes" );
326
 		      "Ctrl-C - discard changes" );
327
 	} else {
327
 	} else {
328
 		msg ( INSTRUCTION_ROW,
328
 		msg ( INSTRUCTION_ROW,
329
+		      "Ctrl-D - delete setting" INSTRUCTION_PAD
329
 		      "Ctrl-X - exit configuration utility" );
330
 		      "Ctrl-X - exit configuration utility" );
330
 	}
331
 	}
331
 }
332
 }
430
 				if ( next > 0 )
431
 				if ( next > 0 )
431
 					reveal ( &widget, --next ) ;
432
 					reveal ( &widget, --next ) ;
432
 				break;
433
 				break;
434
+			case CTRL_D:
435
+				delete_setting ( widget.settings,
436
+						 widget.setting );
437
+				select_setting ( &widget, next );
438
+				draw_setting ( &widget );
439
+				break;
433
 			case CTRL_X:
440
 			case CTRL_X:
434
 				return 0;
441
 				return 0;
435
 			default:
442
 			default:

Loading…
Cancel
Save