9
9
10
10
ICON = None
11
11
12
- menu = None
13
-
14
12
15
13
def save_mmt_config_clicked ():
16
14
multimonitortool .save_mmt_config ()
@@ -34,7 +32,7 @@ def open_folder_clicked():
34
32
os .startfile (paths .BASE_PATH )
35
33
36
34
37
- def startup_with_windows_clicked (icon ):
35
+ def startup_with_windows_clicked ():
38
36
_current_start_with_windows_value = config .get_start_with_windows_value ()
39
37
config .set_start_with_windows_value (not _current_start_with_windows_value )
40
38
_toggled_start_with_windows_value = config .get_start_with_windows_value ()
@@ -43,23 +41,6 @@ def startup_with_windows_clicked(icon):
43
41
registry .add_to_autostart ()
44
42
else :
45
43
registry .remove_from_autostart ()
46
- # TODO: This freezes the app i think
47
- new_menu = (
48
- item (
49
- ui_strings .STARTUP_WITH_WINDOWS ,
50
- startup_with_windows_clicked ,
51
- checked = lambda icon : registry .is_autostartkey_in_registry (),
52
- ),
53
- pystray .Menu .SEPARATOR ,
54
- item (
55
- ui_strings .SAVE_MONITOR_LAYOUT ,
56
- save_mmt_config_clicked ,
57
- ),
58
- item (ui_strings .OPEN_FOLDER , open_folder_clicked ),
59
- pystray .Menu .SEPARATOR ,
60
- item (ui_strings .EXIT , exit_clicked ),
61
- )
62
- icon .menu = new_menu
63
44
64
45
65
46
def get_icon_image (_option ):
0 commit comments