From 2ce057e39416ee31ed10ba53f24f44c2377fc9b7 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Tue, 22 Feb 2022 16:32:37 -0700 Subject: [PATCH] Adjust ddrescue-tui main menu --- scripts/wk/hw/ddrescue.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/wk/hw/ddrescue.py b/scripts/wk/hw/ddrescue.py index 8634b584..1ef6ab4e 100644 --- a/scripts/wk/hw/ddrescue.py +++ b/scripts/wk/hw/ddrescue.py @@ -79,7 +79,7 @@ REGEX_REMAINING_TIME = re.compile( LOG = logging.getLogger(__name__) MENU_ACTIONS = ( 'Start', - 'Add Tech Note', + 'Add tech note', f'Change settings {std.color_string("(experts only)", "YELLOW")}', f'Detect drives {std.color_string("(experts only)", "YELLOW")}', f'Fresh start {std.color_string("(experts only)", "YELLOW")}', @@ -1954,8 +1954,11 @@ def main(): if not args['--force-local-map']: state.ost.select_ticket() if state.ost.disabled: - main_menu.actions['Add Tech Note']['Disabled'] = True - main_menu.actions['Add Tech Note']['Hidden'] = True + main_menu.actions['Add tech note']['Disabled'] = True + main_menu.actions['Add tech note']['Hidden'] = True + main_menu.actions[MENU_ACTIONS[2]]['Separator'] = True + else: + main_menu.actions['Add tech note']['Separator'] = True try: state.init_recovery(args) except (FileNotFoundError, std.GenericAbort): @@ -1980,8 +1983,8 @@ def main(): if 'Detect drives' in selection[0]: detect_drives(state) - # Tech Note - if 'Tech Note' in selection[0]: + # Tech note + if 'tech note' in selection[0]: state.ost.add_note( 'Please enter any additional information about this recovery', )