1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 08:17:13 +03:00

Formatting fixes

This commit is contained in:
Sayak Mukhopadhyay 2021-04-26 14:03:22 +05:30
parent ecf16762d0
commit 6c0437642e
2 changed files with 4 additions and 2 deletions

View File

@ -335,7 +335,7 @@ class AppWindow(object):
self.only_tray_close = 0
def open_window(systray):
def open_window(systray) -> None:
self.only_tray_close = 2
shutdown_thread = threading.Thread(target=systray.shutdown)
shutdown_thread.setDaemon(True)
@ -1393,6 +1393,7 @@ class AppWindow(object):
if value:
self.w.withdraw()
self.systray.start()
else:
self.exit()
@ -1400,6 +1401,7 @@ class AppWindow(object):
"""Tray icon is shutting down."""
if self.only_tray_close > 0:
self.only_tray_close -= 1
else:
exit_thread = threading.Thread(target=self.exit)
exit_thread.setDaemon(True)

View File

@ -636,7 +636,7 @@ class PreferencesDialog(tk.Toplevel):
# Appearance theme and language setting
self.lang = tk.StringVar(value=self.languages.get(config.get_str('language'), _('Default')))
self.always_ontop = tk.BooleanVar(value=bool(config.get_int('always_ontop')))
self.close_system_tray = tk.BooleanVar(value=bool(config.get_int('close_system_tray')))
self.close_system_tray = tk.BooleanVar(value=config.get_bool('close_system_tray'))
self.theme = tk.IntVar(value=config.get_int('theme'))
self.theme_colors = [config.get_str('dark_text'), config.get_str('dark_highlight')]
self.theme_prompts = [