mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 05:23:16 +00:00
23 lines
883 B
Diff
23 lines
883 B
Diff
diff --git a/screen.py b/screen.py
|
|
index 4fd75cd..a10779a 100755
|
|
--- a/screen.py
|
|
+++ b/screen.py
|
|
@@ -48,7 +48,7 @@ PRINTER_BASE_STATUS_OBJECTS = [
|
|
'exclude_object',
|
|
]
|
|
|
|
-klipperscreendir = pathlib.Path(__file__).parent.resolve()
|
|
+klipperscreendir = pathlib.Path(functions.__file__).parent.parent.resolve()
|
|
|
|
|
|
def set_text_direction(lang=None):
|
|
@@ -254,7 +254,7 @@ class KlipperScreen(Gtk.Window):
|
|
def _load_panel(self, panel, *args):
|
|
if panel not in self.load_panel:
|
|
logging.debug(f"Loading panel: {panel}")
|
|
- panel_path = os.path.join(os.path.dirname(__file__), 'panels', f"{panel}.py")
|
|
+ panel_path = os.path.join(klipperscreendir, 'panels', f"{panel}.py")
|
|
logging.info(f"Panel path: {panel_path}")
|
|
if not os.path.exists(panel_path):
|
|
logging.error(f"Panel {panel} does not exist")
|