Skip to content

Commit af5181f

Browse files
committed
bugfix
1 parent 433b58e commit af5181f

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

smct/tray.py

+1-20
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
ICON = None
1111

12-
menu = None
13-
1412

1513
def save_mmt_config_clicked():
1614
multimonitortool.save_mmt_config()
@@ -34,7 +32,7 @@ def open_folder_clicked():
3432
os.startfile(paths.BASE_PATH)
3533

3634

37-
def startup_with_windows_clicked(icon):
35+
def startup_with_windows_clicked():
3836
_current_start_with_windows_value = config.get_start_with_windows_value()
3937
config.set_start_with_windows_value(not _current_start_with_windows_value)
4038
_toggled_start_with_windows_value = config.get_start_with_windows_value()
@@ -43,23 +41,6 @@ def startup_with_windows_clicked(icon):
4341
registry.add_to_autostart()
4442
else:
4543
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
6344

6445

6546
def get_icon_image(_option):

0 commit comments

Comments
 (0)