reverted some changes to avoid conflicts + clean up

This commit is contained in:
Andreas Preikschat 2012-05-17 22:26:31 +02:00
parent 0b9923742e
commit 779a1201fc
2 changed files with 13 additions and 16 deletions

View File

@ -26,12 +26,6 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Temple Place, Suite 330, Boston, MA 02111-1307 USA #
############################################################################### ###############################################################################
# Import uuid now, to avoid the rare bug described in the support system:
# http://support.openlp.org/issues/102
# If https://bugs.gentoo.org/show_bug.cgi?id=317557 is fixed, the import can be
# removed.
import uuid
from openlp.core import main from openlp.core import main

View File

@ -352,8 +352,8 @@ class ServiceManager(QtGui.QWidget):
self._fileName = unicode(fileName) self._fileName = unicode(fileName)
self.mainwindow.setServiceModified(self.isModified(), self.mainwindow.setServiceModified(self.isModified(),
self.shortFileName()) self.shortFileName())
QtCore.QSettings().setValue( QtCore.QSettings(). \
u'servicemanager/last file',QtCore.QVariant(fileName)) setValue(u'servicemanager/last file',QtCore.QVariant(fileName))
def fileName(self): def fileName(self):
""" """
@ -372,7 +372,8 @@ class ServiceManager(QtGui.QWidget):
Triggered when Config dialog is updated. Triggered when Config dialog is updated.
""" """
self.expandTabs = QtCore.QSettings().value( self.expandTabs = QtCore.QSettings().value(
u'advanced/expand service item', QtCore.QVariant(u'False')).toBool() u'advanced/expand service item',
QtCore.QVariant(u'False')).toBool()
def supportedSuffixes(self, suffix): def supportedSuffixes(self, suffix):
self.suffixes.append(suffix) self.suffixes.append(suffix)
@ -443,8 +444,8 @@ class ServiceManager(QtGui.QWidget):
self.setFileName(u'') self.setFileName(u'')
self.serviceId += 1 self.serviceId += 1
self.setModified(False) self.setModified(False)
QtCore.QSettings().setValue( QtCore.QSettings(). \
u'servicemanager/last file',QtCore.QVariant(u'')) setValue(u'servicemanager/last file',QtCore.QVariant(u''))
Receiver.send_message(u'servicemanager_new_service') Receiver.send_message(u'servicemanager_new_service')
def saveFile(self): def saveFile(self):
@ -468,7 +469,8 @@ class ServiceManager(QtGui.QWidget):
service_file_name = '%s.osd' % basename service_file_name = '%s.osd' % basename
log.debug(u'ServiceManager.saveFile - %s', path_file_name) log.debug(u'ServiceManager.saveFile - %s', path_file_name)
SettingsManager.set_last_dir( SettingsManager.set_last_dir(
self.mainwindow.serviceManagerSettingsSection, path) self.mainwindow.serviceManagerSettingsSection,
path)
service = [] service = []
write_list = [] write_list = []
audio_files = [] audio_files = []
@ -730,8 +732,8 @@ class ServiceManager(QtGui.QWidget):
service was last closed. Can be blank if there was no service service was last closed. Can be blank if there was no service
present. present.
""" """
fileName = QtCore.QSettings().value( fileName = QtCore.QSettings(). \
u'servicemanager/last file',QtCore.QVariant(u'')).toString() value(u'servicemanager/last file',QtCore.QVariant(u'')).toString()
if fileName: if fileName:
self.loadFile(fileName) self.loadFile(fileName)
@ -748,7 +750,7 @@ class ServiceManager(QtGui.QWidget):
self.maintainAction.setVisible(False) self.maintainAction.setVisible(False)
self.notesAction.setVisible(False) self.notesAction.setVisible(False)
self.timeAction.setVisible(False) self.timeAction.setVisible(False)
if serviceItem[u'service_item'].is_capable(ItemCapabilities.CanEdit) \ if serviceItem[u'service_item'].is_capable(ItemCapabilities.CanEdit)\
and serviceItem[u'service_item'].edit_id: and serviceItem[u'service_item'].edit_id:
self.editAction.setVisible(True) self.editAction.setVisible(True)
if serviceItem[u'service_item']\ if serviceItem[u'service_item']\
@ -1103,7 +1105,8 @@ class ServiceManager(QtGui.QWidget):
self.service_theme = unicode(self.themeComboBox.currentText()) self.service_theme = unicode(self.themeComboBox.currentText())
self.mainwindow.renderer.set_service_theme(self.service_theme) self.mainwindow.renderer.set_service_theme(self.service_theme)
QtCore.QSettings().setValue( QtCore.QSettings().setValue(
self.mainwindow.serviceManagerSettingsSection + u'/service theme', self.mainwindow.serviceManagerSettingsSection +
u'/service theme',
QtCore.QVariant(self.service_theme)) QtCore.QVariant(self.service_theme))
self.regenerateServiceItems(True) self.regenerateServiceItems(True)