Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
46f30907f8
2 changed files with 9 additions and 17 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'),
|
||||
|
|
@ -66,7 +57,7 @@ BASE_MENUS = {
|
|||
MenuEntry('HitmanPro', 'auto_hitmanpro'),
|
||||
MenuEntry('KVRT', 'auto_kvrt'),
|
||||
MenuEntry('EmsisoftCmd', 'auto_emsisoft_cmd_run'),
|
||||
MenuEntry('Reboot', 'auto_reboot'),
|
||||
MenuEntry(REBOOT_STR, 'auto_reboot'),
|
||||
MenuEntry('EmsisoftCmd (Uninstall)', 'auto_emsisoft_cmd_uninstall'),
|
||||
MenuEntry('Enable Defender Scans', 'auto_enable_defender'),
|
||||
MenuEntry('Windows Defender', 'auto_microsoft_defender'),
|
||||
|
|
@ -74,7 +65,7 @@ BASE_MENUS = {
|
|||
),
|
||||
'Manual Steps': (
|
||||
MenuEntry('Malwarebytes (Install)', 'auto_mbam_install'),
|
||||
MenuEntry('Reboot', 'auto_reboot'),
|
||||
MenuEntry(REBOOT_STR, 'auto_reboot'),
|
||||
MenuEntry('AdwCleaner', 'auto_adwcleaner'),
|
||||
MenuEntry('Malwarebytes (Run)', 'auto_mbam_run'),
|
||||
MenuEntry('Malwarebytes (Uninstall)', 'auto_mbam_uninstall'),
|
||||
|
|
@ -117,7 +108,7 @@ PRESETS = {
|
|||
'BleachBit',
|
||||
'HitmanPro',
|
||||
'KVRT',
|
||||
'Reboot',
|
||||
REBOOT_STR,
|
||||
'Enable Defender Scans',
|
||||
'Remove Custom Power Plan',
|
||||
),
|
||||
|
|
@ -149,7 +140,7 @@ PRESETS = {
|
|||
'Windows Repairs': (
|
||||
'Disable Windows Updates',
|
||||
'Reset Windows Updates',
|
||||
'Reboot',
|
||||
REBOOT_STR,
|
||||
'CHKDSK',
|
||||
'DISM RestoreHealth',
|
||||
'SFC Scan',
|
||||
|
|
@ -170,7 +161,7 @@ PRESETS = {
|
|||
),
|
||||
'Manual Steps': (
|
||||
'Malwarebytes (Install)',
|
||||
'Reboot',
|
||||
REBOOT_STR,
|
||||
'AdwCleaner',
|
||||
'Malwarebytes (Run)',
|
||||
'Malwarebytes (Uninstall)',
|
||||
|
|
|
|||
|
|
@ -391,7 +391,8 @@ def load_preset(menus, presets, enable_menu_exit=True):
|
|||
for group, menu in menus.items():
|
||||
group_enabled = group in preset
|
||||
for name in menu.options:
|
||||
value = group_enabled and name in preset[group]
|
||||
name_str = strip_colors(name)
|
||||
value = group_enabled and name_str in preset[group]
|
||||
menu.options[name]['Selected'] = value
|
||||
|
||||
# Re-enable Main Menu action if disabled
|
||||
|
|
|
|||
Loading…
Reference in a new issue