Fix reboot entries in Auto Repairs presets
This commit is contained in:
parent
d1ff7a391b
commit
94c1f282f5
2 changed files with 3 additions and 14 deletions
|
|
@ -10,21 +10,12 @@ import wk # pylint: disable=wrong-import-position
|
|||
|
||||
|
||||
# Classes
|
||||
REBOOT_STR = wk.std.color_string('Reboot', 'YELLOW')
|
||||
class MenuEntry():
|
||||
# pylint: disable=too-few-public-methods
|
||||
"""Simple class to allow cleaner code below."""
|
||||
def __init__(self, name, function=None, selected=True, **kwargs):
|
||||
self.name = name
|
||||
|
||||
# Color reboot entries
|
||||
if name == 'Reboot':
|
||||
self.name = wk.std.color_string(
|
||||
['Reboot', ' ', '(Forced)'],
|
||||
['YELLOW', None, 'ORANGE'],
|
||||
sep='',
|
||||
)
|
||||
|
||||
# Set details
|
||||
self.details = {
|
||||
'Function': function,
|
||||
'Selected': selected,
|
||||
|
|
@ -49,7 +40,7 @@ BASE_MENUS = {
|
|||
'Windows Repairs': (
|
||||
MenuEntry('Disable Windows Updates', 'auto_windows_updates_disable'),
|
||||
MenuEntry('Reset Windows Updates', 'auto_windows_updates_reset'),
|
||||
MenuEntry('Reboot', 'auto_reboot'),
|
||||
MenuEntry(REBOOT_STR, 'auto_reboot'),
|
||||
MenuEntry('CHKDSK', 'auto_chkdsk'),
|
||||
MenuEntry('DISM RestoreHealth', 'auto_dism'),
|
||||
MenuEntry('SFC Scan', 'auto_sfc'),
|
||||
|
|
@ -65,7 +56,7 @@ BASE_MENUS = {
|
|||
MenuEntry('KVRT', 'auto_kvrt'),
|
||||
MenuEntry('Windows Defender', 'auto_microsoft_defender'),
|
||||
MenuEntry('Remove Custom Power Plan', 'auto_remove_power_plan'),
|
||||
MenuEntry('Reboot', 'auto_reboot'),
|
||||
MenuEntry(REBOOT_STR, 'auto_reboot'),
|
||||
),
|
||||
'Manual Steps': (
|
||||
MenuEntry('AdwCleaner', 'auto_adwcleaner'),
|
||||
|
|
|
|||
|
|
@ -378,8 +378,6 @@ def load_preset(menus, presets, enable_menu_exit=True):
|
|||
group_enabled = group in preset
|
||||
for name in menu.options:
|
||||
name_str = strip_colors(name)
|
||||
if name_str == 'Reboot (Forced)':
|
||||
name_str = 'Reboot'
|
||||
value = group_enabled and name_str in preset[group]
|
||||
menu.options[name]['Selected'] = value
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue