fixed servicemanager bugs preventing saving/opening a service

This commit is contained in:
Andreas Preikschat 2013-02-07 19:00:40 +01:00
parent ecb991535a
commit 28ea251866
2 changed files with 3 additions and 3 deletions

View File

@ -143,6 +143,7 @@ class Settings(QtCore.QSettings):
u'media/players': u'webkit',
u'media/override player': QtCore.Qt.Unchecked,
u'players/background color': u'#000000',
u'servicemanager/last directory': u'',
u'servicemanager/last file': u'',
u'servicemanager/service theme': u'',
u'SettingsImport/file_date_created': datetime.datetime.now().strftime("%Y-%m-%d %H:%M"),
@ -242,7 +243,6 @@ class Settings(QtCore.QSettings):
(u'media/background color', u'players/background color', []),
(u'themes/last directory', u'themes/last directory import', []),
(u'themes/last directory 1', u'themes/last directory export', []),
(u'servicemanager/last directory', u'', []),
(u'songs/last directory 1', u'songs/last directory import', []),
(u'songusage/last directory 1', u'songusage/last directory export', []),
(u'user interface/mainwindow splitter geometry', u'user interface/main window splitter geometry', []),

View File

@ -661,11 +661,11 @@ class ServiceManager(QtGui.QWidget, ServiceManagerDialog):
# SaveAs from osz to oszl is not valid as the files will be deleted
# on exit which is not sensible or usable in the long term.
if self._file_name.endswith(u'oszl') or self.service_has_all_original_files:
file_name = QtGui.QFileDialog.getSavefile_name(self.main_window, UiStrings().SaveService, path,
file_name = QtGui.QFileDialog.getSaveFileName(self.main_window, UiStrings().SaveService, path,
translate('OpenLP.ServiceManager',
'OpenLP Service Files (*.osz);; OpenLP Service Files - lite (*.oszl)'))
else:
file_name = QtGui.QFileDialog.getSavefile_name(self.main_window, UiStrings().SaveService, path,
file_name = QtGui.QFileDialog.getSaveFileName(self.main_window, UiStrings().SaveService, path,
translate('OpenLP.ServiceManager', 'OpenLP Service Files (*.osz);;'))
if not file_name:
return False