diff --git a/comictaggerlib/applicationlogwindow.py b/comictaggerlib/applicationlogwindow.py index 7505595..e216bd5 100644 --- a/comictaggerlib/applicationlogwindow.py +++ b/comictaggerlib/applicationlogwindow.py @@ -1,6 +1,7 @@ from __future__ import annotations import logging +import pathlib from PyQt5 import QtCore, QtGui, QtWidgets, uic @@ -23,9 +24,11 @@ class QTextEditLogger(QtCore.QObject, logging.Handler): class ApplicationLogWindow(QtWidgets.QDialog): - def __init__(self, log_handler: QTextEditLogger, parent: QtCore.QObject | None = None) -> None: + def __init__( + self, log_folder: pathlib.Path, log_handler: QTextEditLogger, parent: QtCore.QObject | None = None + ) -> None: super().__init__(parent) - with (ui_path / "logwindow.ui").open(encoding="utf-8") as uifile: + with (ui_path / "applicationlogwindow.ui").open(encoding="utf-8") as uifile: uic.loadUi(uifile, self) self.log_handler = log_handler @@ -37,6 +40,9 @@ class ApplicationLogWindow(QtWidgets.QDialog): self._button = QtWidgets.QPushButton(self) self._button.setText("Test Me") + self.log_folder = log_folder + self.lblLogLocation.setText(f'Log Location: {log_folder}') + layout = self.layout() layout.addWidget(self._button) diff --git a/comictaggerlib/ui/applicationlogwindow.ui b/comictaggerlib/ui/applicationlogwindow.ui index 77d8741..bc8b19e 100644 --- a/comictaggerlib/ui/applicationlogwindow.ui +++ b/comictaggerlib/ui/applicationlogwindow.ui @@ -14,6 +14,16 @@ Log Window + + + + Log Location: + + + true + + +