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
|
# Classes
|
||||||
|
REBOOT_STR = wk.std.color_string('Reboot', 'YELLOW')
|
||||||
class MenuEntry():
|
class MenuEntry():
|
||||||
# pylint: disable=too-few-public-methods
|
# pylint: disable=too-few-public-methods
|
||||||
"""Simple class to allow cleaner code below."""
|
"""Simple class to allow cleaner code below."""
|
||||||
def __init__(self, name, function=None, selected=True, **kwargs):
|
def __init__(self, name, function=None, selected=True, **kwargs):
|
||||||
self.name = name
|
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 = {
|
self.details = {
|
||||||
'Function': function,
|
'Function': function,
|
||||||
'Selected': selected,
|
'Selected': selected,
|
||||||
|
|
@ -49,7 +40,7 @@ BASE_MENUS = {
|
||||||
'Windows Repairs': (
|
'Windows Repairs': (
|
||||||
MenuEntry('Disable Windows Updates', 'auto_windows_updates_disable'),
|
MenuEntry('Disable Windows Updates', 'auto_windows_updates_disable'),
|
||||||
MenuEntry('Reset Windows Updates', 'auto_windows_updates_reset'),
|
MenuEntry('Reset Windows Updates', 'auto_windows_updates_reset'),
|
||||||
MenuEntry('Reboot', 'auto_reboot'),
|
MenuEntry(REBOOT_STR, 'auto_reboot'),
|
||||||
MenuEntry('CHKDSK', 'auto_chkdsk'),
|
MenuEntry('CHKDSK', 'auto_chkdsk'),
|
||||||
MenuEntry('DISM RestoreHealth', 'auto_dism'),
|
MenuEntry('DISM RestoreHealth', 'auto_dism'),
|
||||||
MenuEntry('SFC Scan', 'auto_sfc'),
|
MenuEntry('SFC Scan', 'auto_sfc'),
|
||||||
|
|
@ -66,7 +57,7 @@ BASE_MENUS = {
|
||||||
MenuEntry('HitmanPro', 'auto_hitmanpro'),
|
MenuEntry('HitmanPro', 'auto_hitmanpro'),
|
||||||
MenuEntry('KVRT', 'auto_kvrt'),
|
MenuEntry('KVRT', 'auto_kvrt'),
|
||||||
MenuEntry('EmsisoftCmd', 'auto_emsisoft_cmd_run'),
|
MenuEntry('EmsisoftCmd', 'auto_emsisoft_cmd_run'),
|
||||||
MenuEntry('Reboot', 'auto_reboot'),
|
MenuEntry(REBOOT_STR, 'auto_reboot'),
|
||||||
MenuEntry('EmsisoftCmd (Uninstall)', 'auto_emsisoft_cmd_uninstall'),
|
MenuEntry('EmsisoftCmd (Uninstall)', 'auto_emsisoft_cmd_uninstall'),
|
||||||
MenuEntry('Enable Defender Scans', 'auto_enable_defender'),
|
MenuEntry('Enable Defender Scans', 'auto_enable_defender'),
|
||||||
MenuEntry('Windows Defender', 'auto_microsoft_defender'),
|
MenuEntry('Windows Defender', 'auto_microsoft_defender'),
|
||||||
|
|
@ -74,7 +65,7 @@ BASE_MENUS = {
|
||||||
),
|
),
|
||||||
'Manual Steps': (
|
'Manual Steps': (
|
||||||
MenuEntry('Malwarebytes (Install)', 'auto_mbam_install'),
|
MenuEntry('Malwarebytes (Install)', 'auto_mbam_install'),
|
||||||
MenuEntry('Reboot', 'auto_reboot'),
|
MenuEntry(REBOOT_STR, 'auto_reboot'),
|
||||||
MenuEntry('AdwCleaner', 'auto_adwcleaner'),
|
MenuEntry('AdwCleaner', 'auto_adwcleaner'),
|
||||||
MenuEntry('Malwarebytes (Run)', 'auto_mbam_run'),
|
MenuEntry('Malwarebytes (Run)', 'auto_mbam_run'),
|
||||||
MenuEntry('Malwarebytes (Uninstall)', 'auto_mbam_uninstall'),
|
MenuEntry('Malwarebytes (Uninstall)', 'auto_mbam_uninstall'),
|
||||||
|
|
@ -117,7 +108,7 @@ PRESETS = {
|
||||||
'BleachBit',
|
'BleachBit',
|
||||||
'HitmanPro',
|
'HitmanPro',
|
||||||
'KVRT',
|
'KVRT',
|
||||||
'Reboot',
|
REBOOT_STR,
|
||||||
'Enable Defender Scans',
|
'Enable Defender Scans',
|
||||||
'Remove Custom Power Plan',
|
'Remove Custom Power Plan',
|
||||||
),
|
),
|
||||||
|
|
@ -149,7 +140,7 @@ PRESETS = {
|
||||||
'Windows Repairs': (
|
'Windows Repairs': (
|
||||||
'Disable Windows Updates',
|
'Disable Windows Updates',
|
||||||
'Reset Windows Updates',
|
'Reset Windows Updates',
|
||||||
'Reboot',
|
REBOOT_STR,
|
||||||
'CHKDSK',
|
'CHKDSK',
|
||||||
'DISM RestoreHealth',
|
'DISM RestoreHealth',
|
||||||
'SFC Scan',
|
'SFC Scan',
|
||||||
|
|
@ -170,7 +161,7 @@ PRESETS = {
|
||||||
),
|
),
|
||||||
'Manual Steps': (
|
'Manual Steps': (
|
||||||
'Malwarebytes (Install)',
|
'Malwarebytes (Install)',
|
||||||
'Reboot',
|
REBOOT_STR,
|
||||||
'AdwCleaner',
|
'AdwCleaner',
|
||||||
'Malwarebytes (Run)',
|
'Malwarebytes (Run)',
|
||||||
'Malwarebytes (Uninstall)',
|
'Malwarebytes (Uninstall)',
|
||||||
|
|
|
||||||
|
|
@ -391,7 +391,8 @@ def load_preset(menus, presets, enable_menu_exit=True):
|
||||||
for group, menu in menus.items():
|
for group, menu in menus.items():
|
||||||
group_enabled = group in preset
|
group_enabled = group in preset
|
||||||
for name in menu.options:
|
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
|
menu.options[name]['Selected'] = value
|
||||||
|
|
||||||
# Re-enable Main Menu action if disabled
|
# Re-enable Main Menu action if disabled
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue