From 79ab8cc1c0db012396da7053a513de5d22948906 Mon Sep 17 00:00:00 2001 From: Stevan Pettit Date: Sun, 21 Aug 2011 10:05:24 -0400 Subject: [PATCH] Added code to always create a filename.INI file. --- openlp/core/ui/mainwindow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 0a51c2bf3..0811c34bd 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -977,7 +977,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): QtGui.QMessageBox.Ok)) self.settingsImported = True self.cleanUp() - sys.exit() + sys.exit(0) def onSettingsExportItemClicked(self, exportFileName=None): """ @@ -990,6 +990,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): 'OpenLP Export Settings File (*.ini)'))) if not exportFileName: return + # Make sure it's an .ini file. + if not exportFileName.endswith(u'ini'): + exportFileName =+ u'.ini' self.saveSettings() headerSection = u'SettingsExport' settingSections = []