Fix bugs with servicemanager settings

bzr-revno: 2174
This commit is contained in:
Andreas Preikschat 2013-02-07 21:48:37 +00:00 committed by Tim Bentley
commit 75fbfe3edd
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/players': u'webkit',
u'media/override player': QtCore.Qt.Unchecked, u'media/override player': QtCore.Qt.Unchecked,
u'players/background color': u'#000000', u'players/background color': u'#000000',
u'servicemanager/last directory': u'',
u'servicemanager/last file': u'', u'servicemanager/last file': u'',
u'servicemanager/service theme': u'', u'servicemanager/service theme': u'',
u'SettingsImport/file_date_created': datetime.datetime.now().strftime("%Y-%m-%d %H:%M"), 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'media/background color', u'players/background color', []),
(u'themes/last directory', u'themes/last directory import', []), (u'themes/last directory', u'themes/last directory import', []),
(u'themes/last directory 1', u'themes/last directory export', []), (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'songs/last directory 1', u'songs/last directory import', []),
(u'songusage/last directory 1', u'songusage/last directory export', []), (u'songusage/last directory 1', u'songusage/last directory export', []),
(u'user interface/mainwindow splitter geometry', u'user interface/main window splitter geometry', []), (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 # 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. # 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: 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', translate('OpenLP.ServiceManager',
'OpenLP Service Files (*.osz);; OpenLP Service Files - lite (*.oszl)')) 'OpenLP Service Files (*.osz);; OpenLP Service Files - lite (*.oszl)'))
else: 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);;')) translate('OpenLP.ServiceManager', 'OpenLP Service Files (*.osz);;'))
if not file_name: if not file_name:
return False return False