fixed problem with license file open

This commit is contained in:
Rinaldus 2016-03-23 13:35:52 +03:00
parent 91ced51326
commit c069562b18
1 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ import time
#variables #variables
programTitle = "Mail Notifier" programTitle = "Mail Notifier"
programVersion = "2.0" programVersion = "2.0"
programDir=os.path.dirname(__file__)
settings = QSettings(os.path.expanduser("~")+"/.config/mail-notifier/settings.conf", QSettings.NativeFormat) settings = QSettings(os.path.expanduser("~")+"/.config/mail-notifier/settings.conf", QSettings.NativeFormat)
def GlobalSettingsExist(): def GlobalSettingsExist():
if ((settings.contains("CheckInterval") and settings.value("CheckInterval") != "") and if ((settings.contains("CheckInterval") and settings.value("CheckInterval") != "") and
@ -225,7 +226,7 @@ class About(QDialog):
self.ui.lblNameVersion.setText(programTitle + " " + programVersion) self.ui.lblNameVersion.setText(programTitle + " " + programVersion)
f = open('LICENSE.txt', 'r') f = open(os.path.join(programDir,'LICENSE.txt'), 'r')
self.ui.txtLicense.setPlainText(f.read()) self.ui.txtLicense.setPlainText(f.read())
def closeEvent(self, event): def closeEvent(self, event):