changed the disabling buttons to use a decorator as it looks much cleaner
This commit is contained in:
@@ -6,48 +6,6 @@ from tools.cfg_util.cfg_util_sg.layout import window
|
||||
import pyperclip
|
||||
|
||||
|
||||
def disable_buttons():
|
||||
button_list = ["scan",
|
||||
"import_file_config",
|
||||
"export_file_config",
|
||||
"import_iplist",
|
||||
"export_iplist",
|
||||
"export_csv",
|
||||
"select_all_ips",
|
||||
"refresh_data",
|
||||
"open_in_web",
|
||||
"reboot_miners",
|
||||
"restart_miner_backend",
|
||||
"import_config",
|
||||
"send_config",
|
||||
"light",
|
||||
"generate_config",
|
||||
]
|
||||
for button in button_list:
|
||||
window[button].Update(disabled=True)
|
||||
|
||||
|
||||
def enable_buttons():
|
||||
button_list = ["scan",
|
||||
"import_file_config",
|
||||
"export_file_config",
|
||||
"import_iplist",
|
||||
"export_iplist",
|
||||
"export_csv",
|
||||
"select_all_ips",
|
||||
"refresh_data",
|
||||
"open_in_web",
|
||||
"reboot_miners",
|
||||
"restart_miner_backend",
|
||||
"import_config",
|
||||
"send_config",
|
||||
"light",
|
||||
"generate_config",
|
||||
]
|
||||
for button in button_list:
|
||||
window[button].Update(disabled=False)
|
||||
|
||||
|
||||
def copy_from_table(table):
|
||||
selection = table.selection()
|
||||
copy_values = []
|
||||
|
||||
Reference in New Issue
Block a user