forked from openlp/openlp
Fix duplicate checks (Bug #703149)
Cleanup config change responses (Bug #697215) bzr-revno: 1230
This commit is contained in:
commit
0f113631ac
@ -245,6 +245,9 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
QtCore.SIGNAL(u'servicemanager_list_request'), self.listRequest)
|
QtCore.SIGNAL(u'servicemanager_list_request'), self.listRequest)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'config_updated'), self.configUpdated)
|
QtCore.SIGNAL(u'config_updated'), self.configUpdated)
|
||||||
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
|
QtCore.SIGNAL(u'config_screen_changed'),
|
||||||
|
self.regenerateServiceItems)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'theme_update_global'), self.themeChange)
|
QtCore.SIGNAL(u'theme_update_global'), self.themeChange)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
@ -289,7 +292,7 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
self.themeMenu = QtGui.QMenu(
|
self.themeMenu = QtGui.QMenu(
|
||||||
translate('OpenLP.ServiceManager', '&Change Item Theme'))
|
translate('OpenLP.ServiceManager', '&Change Item Theme'))
|
||||||
self.menu.addMenu(self.themeMenu)
|
self.menu.addMenu(self.themeMenu)
|
||||||
self.configUpdated(True)
|
self.configUpdated()
|
||||||
|
|
||||||
def setModified(self, modified=True):
|
def setModified(self, modified=True):
|
||||||
"""
|
"""
|
||||||
@ -328,15 +331,13 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
return split_filename(self._fileName)[1]
|
return split_filename(self._fileName)[1]
|
||||||
|
|
||||||
def configUpdated(self, firstTime=False):
|
def configUpdated(self):
|
||||||
"""
|
"""
|
||||||
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',
|
u'advanced/expand service item',
|
||||||
QtCore.QVariant(u'False')).toBool()
|
QtCore.QVariant(u'False')).toBool()
|
||||||
if not firstTime:
|
|
||||||
self.regenerateServiceItems()
|
|
||||||
|
|
||||||
def supportedSuffixes(self, suffix):
|
def supportedSuffixes(self, suffix):
|
||||||
self.suffixes.append(suffix)
|
self.suffixes.append(suffix)
|
||||||
|
@ -376,8 +376,6 @@ class SlideController(QtGui.QWidget):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'slidecontroller_%s_text_request' % self.typePrefix),
|
QtCore.SIGNAL(u'slidecontroller_%s_text_request' % self.typePrefix),
|
||||||
self.onTextRequest)
|
self.onTextRequest)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
|
||||||
QtCore.SIGNAL(u'config_updated'), self.refreshServiceItem)
|
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged)
|
QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged)
|
||||||
|
|
||||||
@ -395,6 +393,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.ratio = float(self.screens.current[u'size'].width()) / \
|
self.ratio = float(self.screens.current[u'size'].width()) / \
|
||||||
float(self.screens.current[u'size'].height())
|
float(self.screens.current[u'size'].height())
|
||||||
self.previewSizeChanged()
|
self.previewSizeChanged()
|
||||||
|
if self.serviceItem:
|
||||||
|
self.refreshServiceItem()
|
||||||
|
|
||||||
def previewSizeChanged(self):
|
def previewSizeChanged(self):
|
||||||
"""
|
"""
|
||||||
@ -493,7 +493,6 @@ class SlideController(QtGui.QWidget):
|
|||||||
Method to update the service item if the screen has changed
|
Method to update the service item if the screen has changed
|
||||||
"""
|
"""
|
||||||
log.debug(u'refreshServiceItem live = %s' % self.isLive)
|
log.debug(u'refreshServiceItem live = %s' % self.isLive)
|
||||||
if self.serviceItem:
|
|
||||||
if self.serviceItem.is_text() or self.serviceItem.is_image():
|
if self.serviceItem.is_text() or self.serviceItem.is_image():
|
||||||
item = self.serviceItem
|
item = self.serviceItem
|
||||||
item.render()
|
item.render()
|
||||||
|
@ -171,10 +171,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
# not return False when nothing has changed (because this would
|
# not return False when nothing has changed (because this would
|
||||||
# cause an error message later on).
|
# cause an error message later on).
|
||||||
if edit:
|
if edit:
|
||||||
if authors[0].id == new_author.id:
|
for author in authors:
|
||||||
return True
|
if author.id != new_author.id:
|
||||||
else:
|
|
||||||
return False
|
return False
|
||||||
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
@ -191,10 +191,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
# not return False when nothing has changed (because this would
|
# not return False when nothing has changed (because this would
|
||||||
# cause an error message later on).
|
# cause an error message later on).
|
||||||
if edit:
|
if edit:
|
||||||
if topics[0].id == new_topic.id:
|
for topic in topics:
|
||||||
return True
|
if topic.id != new_topic.id:
|
||||||
else:
|
|
||||||
return False
|
return False
|
||||||
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
@ -212,10 +212,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
# not return False when nothing has changed (because this would
|
# not return False when nothing has changed (because this would
|
||||||
# cause an error message later on).
|
# cause an error message later on).
|
||||||
if edit:
|
if edit:
|
||||||
if books[0].id == new_book.id:
|
for book in books:
|
||||||
return True
|
if book.id != new_book.id:
|
||||||
else:
|
|
||||||
return False
|
return False
|
||||||
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user