openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #05708
[Merge] lp:~meths/openlp/trivialfixes into lp:openlp
Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.
Requested reviews:
Tim Bentley (trb143)
Andreas Preikschat (googol-hush)
For more details, see:
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/46766
Fix duplicate checks (Bug #703149)
(An explanation has been added to the bug report for more information)
Cleanup config change responses (Bug 697215)
--
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/46766
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2011-01-15 20:06:25 +0000
+++ openlp/core/ui/servicemanager.py 2011-01-19 14:47:30 +0000
@@ -246,6 +246,9 @@
QtCore.QObject.connect(Receiver.get_receiver(),
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.SIGNAL(u'theme_update_global'), self.themeChange)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'service_item_update'), self.serviceItemUpdate)
@@ -289,7 +292,7 @@
self.themeMenu = QtGui.QMenu(
translate('OpenLP.ServiceManager', '&Change Item Theme'))
self.menu.addMenu(self.themeMenu)
- self.configUpdated(True)
+ self.configUpdated()
def setModified(self, modified=True):
"""
@@ -328,15 +331,13 @@
"""
return split_filename(self._fileName)[1]
- def configUpdated(self, firstTime=False):
+ def configUpdated(self):
"""
Triggered when Config dialog is updated.
"""
self.expandTabs = QtCore.QSettings().value(
u'advanced/expand service item',
QtCore.QVariant(u'False')).toBool()
- if not firstTime:
- self.regenerateServiceItems()
def supportedSuffixes(self, suffix):
self.suffixes.append(suffix)
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2011-01-14 17:02:06 +0000
+++ openlp/core/ui/slidecontroller.py 2011-01-19 14:47:30 +0000
@@ -377,8 +377,6 @@
QtCore.SIGNAL(u'slidecontroller_%s_text_request' % self.typePrefix),
self.onTextRequest)
QtCore.QObject.connect(Receiver.get_receiver(),
- QtCore.SIGNAL(u'config_updated'), self.refreshServiceItem)
- QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'config_screen_changed'), self.screenSizeChanged)
def screenSizeChanged(self):
@@ -395,6 +393,8 @@
self.ratio = float(self.screens.current[u'size'].width()) / \
float(self.screens.current[u'size'].height())
self.previewSizeChanged()
+ if self.serviceItem:
+ self.refreshServiceItem()
def previewSizeChanged(self):
"""
@@ -493,11 +493,10 @@
Method to update the service item if the screen has changed
"""
log.debug(u'refreshServiceItem live = %s' % self.isLive)
- if self.serviceItem:
- if self.serviceItem.is_text() or self.serviceItem.is_image():
- item = self.serviceItem
- item.render()
- self._processItem(item, self.selectedRow)
+ if self.serviceItem.is_text() or self.serviceItem.is_image():
+ item = self.serviceItem
+ item.render()
+ self._processItem(item, self.selectedRow)
def addServiceItem(self, item):
"""
=== modified file 'openlp/plugins/songs/forms/songmaintenanceform.py'
--- openlp/plugins/songs/forms/songmaintenanceform.py 2011-01-15 20:06:25 +0000
+++ openlp/plugins/songs/forms/songmaintenanceform.py 2011-01-19 14:47:30 +0000
@@ -171,10 +171,10 @@
# not return False when nothing has changed (because this would
# cause an error message later on).
if edit:
- if authors[0].id == new_author.id:
- return True
- else:
- return False
+ for author in authors:
+ if author.id != new_author.id:
+ return False
+ return True
else:
return False
else:
@@ -191,10 +191,10 @@
# not return False when nothing has changed (because this would
# cause an error message later on).
if edit:
- if topics[0].id == new_topic.id:
- return True
- else:
- return False
+ for topic in topics:
+ if topic.id != new_topic.id:
+ return False
+ return True
else:
return False
else:
@@ -212,10 +212,10 @@
# not return False when nothing has changed (because this would
# cause an error message later on).
if edit:
- if books[0].id == new_book.id:
- return True
- else:
- return False
+ for book in books:
+ if book.id != new_book.id:
+ return False
+ return True
else:
return False
else:
Follow ups