refactor(src): comment out LazyLauncher implementation and usage
This commit is contained in:
1 file changed
+19
-20
+19
-20
@@ -20,24 +20,23 @@ from window.osd.main import OSDWindow
|
||||
from window.panel.main import Panel
|
||||
from window.switcher import ApplicationSwitcher
|
||||
|
||||
|
||||
class LazyLauncher:
|
||||
def __init__(self):
|
||||
self._instance = None
|
||||
|
||||
def _get_instance(self):
|
||||
if self._instance is None:
|
||||
from window.launcher.main import Launcher
|
||||
|
||||
self._instance = Launcher()
|
||||
import __main__
|
||||
|
||||
if hasattr(__main__, "app") and __main__.app:
|
||||
__main__.app.add_window(self._instance)
|
||||
return self._instance
|
||||
|
||||
def __getattr__(self, name):
|
||||
return getattr(self._get_instance(), name)
|
||||
# class LazyLauncher:
|
||||
# def __init__(self):
|
||||
# self._instance = None
|
||||
#
|
||||
# def _get_instance(self):
|
||||
# if self._instance is None:
|
||||
# from window.launcher.main import Launcher
|
||||
#
|
||||
# self._instance = Launcher()
|
||||
# import __main__
|
||||
#
|
||||
# if hasattr(__main__, "app") and __main__.app:
|
||||
# __main__.app.add_window(self._instance)
|
||||
# return self._instance
|
||||
#
|
||||
# def __getattr__(self, name):
|
||||
# return getattr(self._get_instance(), name)
|
||||
|
||||
|
||||
def main():
|
||||
@@ -57,7 +56,7 @@ def main():
|
||||
switcher = ApplicationSwitcher()
|
||||
panel = Panel()
|
||||
modusnoti = ModusNoti()
|
||||
launcher = LazyLauncher()
|
||||
# launcher = LazyLauncher()
|
||||
deskwidget = Deskwidgets()
|
||||
dock = Dock()
|
||||
osd = OSDWindow()
|
||||
@@ -95,7 +94,7 @@ def main():
|
||||
__main__.switcher = switcher
|
||||
__main__.panel = panel
|
||||
__main__.modusnoti = modusnoti
|
||||
__main__.launcher = launcher
|
||||
# __main__.launcher = launcher
|
||||
__main__.deskwidget = deskwidget
|
||||
__main__.dock = dock
|
||||
__main__.osd = osd
|
||||
|
||||
Reference in new issue
Block a user