diff options
author | Papoteur <papoteur@mageia.org> | 2024-03-03 22:35:09 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2024-03-03 22:35:09 +0100 |
commit | 0b4432a5950b6c34bf496d0c6399b74612c89bb7 (patch) | |
tree | 868dc54830f649e7f5050ef0ec7593ca279165e5 | |
parent | 75806a349537b5fc3c844e2745df8ed52e13ae7d (diff) | |
download | MageiaSync-0b4432a5950b6c34bf496d0c6399b74612c89bb7.tar MageiaSync-0b4432a5950b6c34bf496d0c6399b74612c89bb7.tar.gz MageiaSync-0b4432a5950b6c34bf496d0c6399b74612c89bb7.tar.bz2 MageiaSync-0b4432a5950b6c34bf496d0c6399b74612c89bb7.tar.xz MageiaSync-0b4432a5950b6c34bf496d0c6399b74612c89bb7.zip |
Fix loading of ui files
-rw-r--r-- | mageiaSync/mageiasync.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mageiaSync/mageiasync.py b/mageiaSync/mageiasync.py index e634e4c..a214f9a 100644 --- a/mageiaSync/mageiasync.py +++ b/mageiaSync/mageiasync.py @@ -25,17 +25,19 @@ try: except: import mageiaSyncExt +UI_PATH = os.path.dirname(__file__) + class prefsDialog(QDialog): def __init__(self, parent=None): QDialog.__init__(self, parent) - self.ui = uic.loadUi("mageiaSyncDBprefs.ui", self) + self.ui = uic.loadUi(os.path.join(UI_PATH, "mageiaSyncDBprefs.ui"), self) self.ui.selectDest.clicked.connect(isosSync.selectDestination) class prefsDialog0(QDialog): def __init__(self, parent=None): QDialog.__init__(self, parent) - self.ui = uic.loadUi("mageiaSyncDBprefs0.ui", self) + self.ui = uic.loadUi(os.path.join(UI_PATH, "mageiaSyncDBprefs0.ui"), self) class renameDialog(QDialog): @@ -43,21 +45,21 @@ class renameDialog(QDialog): def __init__(self, parent=None): QDialog.__init__(self, parent) - self.ui = uic.loadUi("mageiaSyncDBrename.ui", self) + self.ui = uic.loadUi(os.path.join(UI_PATH, "mageiaSyncDBrename.ui"), self) self.ui.chooseDir.clicked.connect(isosSync.renameDir) class aboutDialog(QDialog): def __init__(self, parent=None): QDialog.__init__(self, parent) - self.ui = uic.loadUi("mageiaSyncAbout.ui", self) + self.ui = uic.loadUi(os.path.join(UI_PATH, "mageiaSyncAbout.ui"), self) self.ui.creditsButton.clicked.connect(isosSync.credits) class creditsDialog(QDialog): def __init__(self, parent=None): QDialog.__init__(self, parent) - self.ui = uic.loadUi("mageiaSyncCredits.ui", self) + self.ui = uic.loadUi(os.path.join(UI_PATH, "mageiaSyncCredits.ui"), self) text = "" try: with open("/usr/share/doc/mageiasync/README.md", "r") as f: @@ -91,7 +93,7 @@ class IsosViewer(QMainWindow): # Display the main window def __init__(self, parent=None): super(IsosViewer, self).__init__(parent) - self.ui = uic.loadUi("mageiaSyncUI.ui", self) + self.ui = uic.loadUi(os.path.join(UI_PATH, "mageiaSyncUI.ui"), self) self.connectActions() self.ui.IprogressBar.setMinimum(0) self.ui.IprogressBar.setMaximum(100) |