mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
tray main function moved to pype_tray.py and imported in tray's __init__.py
This commit is contained in:
parent
5d89f0b83c
commit
07ef600cfc
3 changed files with 21 additions and 11 deletions
5
pype/tools/tray/__init__.py
Normal file
5
pype/tools/tray/__init__.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
from .pype_tray import main
|
||||
|
||||
__all__ = (
|
||||
"main",
|
||||
)
|
||||
|
|
@ -1,13 +1,7 @@
|
|||
import os
|
||||
import sys
|
||||
try:
|
||||
from . import pype_tray
|
||||
except ImportError:
|
||||
import pype_tray
|
||||
|
||||
from . import pype_tray
|
||||
|
||||
app = pype_tray.PypeTrayApplication()
|
||||
if os.name == "nt":
|
||||
import ctypes
|
||||
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(
|
||||
u"pype_tray"
|
||||
)
|
||||
|
||||
sys.exit(app.exec_())
|
||||
pype_tray.main()
|
||||
|
|
|
|||
|
|
@ -255,3 +255,14 @@ class PypeTrayApplication(QtWidgets.QApplication):
|
|||
QtCore.Qt.WindowStaysOnTopHint | QtCore.Qt.FramelessWindowHint
|
||||
)
|
||||
return splash
|
||||
|
||||
|
||||
def main():
|
||||
app = PypeTrayApplication()
|
||||
if os.name == "nt":
|
||||
import ctypes
|
||||
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(
|
||||
u"pype_tray"
|
||||
)
|
||||
|
||||
sys.exit(app.exec_())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue