refactor(src): comment out LazyLauncher implementation and usage

This commit is contained in:
sankalp committed 2026-07-06 19:49:30 +05:45
1 parent 8a231540e5
commit 023d0be7c8
1 file changed
+19 -20
+19 -20
View File
@@ -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