mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-17 23:51:42 +03:00
Added annotations for systray
This commit is contained in:
parent
b377199119
commit
fc83dcf090
@ -264,6 +264,7 @@ if __name__ == '__main__': # noqa: C901
|
|||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from logging import trace, TRACE # type: ignore # noqa: F401
|
from logging import trace, TRACE # type: ignore # noqa: F401
|
||||||
import update
|
import update
|
||||||
|
from infi.systray import SysTrayIcon
|
||||||
# isort: on
|
# isort: on
|
||||||
|
|
||||||
def _(x: str) -> str:
|
def _(x: str) -> str:
|
||||||
@ -334,7 +335,7 @@ class AppWindow(object):
|
|||||||
if platform == 'win32':
|
if platform == 'win32':
|
||||||
from infi.systray import SysTrayIcon
|
from infi.systray import SysTrayIcon
|
||||||
|
|
||||||
def open_window(systray) -> None:
|
def open_window(systray: 'SysTrayIcon') -> None:
|
||||||
self.w.deiconify()
|
self.w.deiconify()
|
||||||
|
|
||||||
menu_options = (("Open", None, open_window),)
|
menu_options = (("Open", None, open_window),)
|
||||||
@ -1383,7 +1384,7 @@ class AppWindow(object):
|
|||||||
logger.debug('"other" exception', exc_info=e)
|
logger.debug('"other" exception', exc_info=e)
|
||||||
self.status['text'] = str(e)
|
self.status['text'] = str(e)
|
||||||
|
|
||||||
def exit_tray(self, systray) -> None:
|
def exit_tray(self, systray: 'SysTrayIcon') -> None:
|
||||||
"""Tray icon is shutting down."""
|
"""Tray icon is shutting down."""
|
||||||
exit_thread = threading.Thread(target=self.onexit)
|
exit_thread = threading.Thread(target=self.onexit)
|
||||||
exit_thread.setDaemon(True)
|
exit_thread.setDaemon(True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user