Commit 2dcce0b9 authored by AJ Fite's avatar AJ Fite 🛫

PLEASE FIX PATHS

parent b85f46dd
0.0.5-ALPHA4
\ No newline at end of file
0.0.5-ALPHA5
\ No newline at end of file
import pkg_resources
from PyQt5 import uic
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QDialog
......@@ -7,9 +8,9 @@ import os
class AboutDialog(QDialog):
def __init__(self):
super().__init__(flags=Qt.WindowStaysOnTopHint)
version_file = open(os.path.join('.', 'VERSION'))
version_file = open(pkg_resources.resource_filename(__name__, "VERSION"))
version = version_file.read().strip()
ui_file = os.path.join('.', 'AboutDialog.ui')
ui_file = pkg_resources.resource_filename(__name__, "AboutDialog.ui")
uic.loadUi(ui_file, self)
self.show()
self.versionLabel.setText("Version: " + version)
import os
from configparser import SafeConfigParser
from pathlib import Path
import pkg_resources
from PyQt5 import uic
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QDialog, QDialogButtonBox
......@@ -7,7 +9,8 @@ from PyQt5.QtWidgets import QDialog, QDialogButtonBox
class Config:
# TODO: Comment generated config file
config_name = 'config.ini'
# TODO: Recover gracefully from faulty config
config_name = str(Path.home()) + '/.simfgui.ini'
""" READ ME BEFORE EDITING BELOW
These are the **default** values, if you want to change
......@@ -141,7 +144,7 @@ class Config:
class ConfigEditor(QDialog):
def __init__(self):
super().__init__(flags=Qt.WindowStaysOnTopHint)
ui_file = os.path.join('.', 'SettingsDialog.ui')
ui_file = pkg_resources.resource_filename(__name__, "SettingsDialog.ui")
uic.loadUi(ui_file, self)
self.show()
......
......@@ -3,7 +3,7 @@ import os
import sys
import webbrowser
from PyQt5 import uic
from pkg_resources import resource_filename
import pkg_resources
from PyQt5.QtCore import QProcess, QProcessEnvironment, Qt
from PyQt5.QtWidgets import QMainWindow, QApplication
from watchdog.observers import Observer
......@@ -19,7 +19,8 @@ class MainWindow(QMainWindow):
def __init__(self):
super().__init__(flags=Qt.Window)
ui_file = os.path.join('.', 'MainWindow.ui')
ui_file = pkg_resources.resource_filename(__name__, "MainWindow.ui")
uic.loadUi(ui_file, self)
self.passprompt = None
......
# This file handles the sudo password dialog
import pkg_resources
from PyQt5 import uic
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QDialog
......@@ -9,7 +10,9 @@ class PasswordWindow(QDialog):
def __init__(self):
super().__init__(flags=Qt.WindowStaysOnTopHint)
uic.loadUi('PasswordDialog.ui', self)
ui_file = pkg_resources.resource_filename(__name__,
"PasswordDialog.ui")
uic.loadUi(ui_file, self)
self.show()
self.rejected.connect(self.pass_reject)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment