openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #00739
[Merge] lp:~trb143/openlp/fixes into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/fixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Fixed KITT's lights
Finished remote editing
Some minor cleanups
--
https://code.launchpad.net/~trb143/openlp/fixes/+merge/14248
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2009-10-30 21:47:15 +0000
+++ openlp/core/ui/mainwindow.py 2009-10-31 09:30:26 +0000
@@ -525,7 +525,7 @@
self.settingsForm.postSetUp()
def versionCheck(self):
- applicationVersion = self.generalConfig.get_config(u'Application version', u'1.9.0-595')
+ applicationVersion = self.generalConfig.get_config(u'Application version', u'1.9.0-640')
version = check_latest_version(self.generalConfig, applicationVersion)
if applicationVersion != version:
version_text = unicode(self.trUtf8(u'OpenLP version %s has been updated '
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2009-10-30 22:03:09 +0000
+++ openlp/core/ui/servicemanager.py 2009-10-31 09:30:26 +0000
@@ -27,6 +27,7 @@
import logging
import cPickle
import zipfile
+import uuid
from PyQt4 import QtCore, QtGui
from openlp.core.lib import PluginConfig, OpenLPToolbar, ServiceItem, \
@@ -556,17 +557,22 @@
sitem, count = self.findServiceItem()
item.render()
if self.remoteEditTriggered:
+ item.uuid = self.serviceItems[sitem][u'data'].uuid
self.serviceItems[sitem][u'data'] = item
self.remoteEditTriggered = False
self.repaintServiceList(sitem + 1, 0)
+ self.parent.LiveController.replaceServiceManagerItem(item)
else:
+ item.uuid = unicode(uuid.uuid1())
if sitem == -1:
self.serviceItems.append({u'data': item,
- u'order': len(self.serviceItems) + 1, u'expanded':True})
+ u'order': len(self.serviceItems) + 1,
+ u'expanded':True})
self.repaintServiceList(len(self.serviceItems) + 1, 0)
else:
self.serviceItems.insert(sitem + 1, {u'data': item,
- u'order': len(self.serviceItems)+1, u'expanded':True})
+ u'order': len(self.serviceItems)+1,
+ u'expanded':True})
self.repaintServiceList(sitem + 1, 0)
self.parent.serviceChanged(False, self.serviceName)
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2009-10-29 15:57:58 +0000
+++ openlp/core/ui/slidecontroller.py 2009-10-31 09:30:26 +0000
@@ -176,16 +176,16 @@
if isLive:
self.Songbar = OpenLPToolbar(self)
self.Songbar.addToolbarButton(
- u'Bridge', u':/media/media_time.png',
+ u'Bridge', u':/slides/slide_close.png',
self.trUtf8(u'Bridge'),
self.onSongBarHandler)
self.Songbar.addToolbarButton(
- u'Chorus', u':/media/media_time.png',
+ u'Chorus', u':/slides/slide_close.png',
self.trUtf8(u'Chorus'),
self.onSongBarHandler)
- for verse in range(1, 9):
+ for verse in range(1, 20):
self.Songbar.addToolbarButton(
- unicode(verse), u':/media/media_time.png',
+ unicode(verse), u':/slides/slide_close.png',
unicode(self.trUtf8(u'Verse %s'))%verse,
self.onSongBarHandler)
self.ControllerLayout.addWidget(self.Songbar)
@@ -282,6 +282,15 @@
self.Toolbar.makeWidgetsInvisible(self.image_list)
if item.name == u'Songs' and \
str_to_bool(self.songsconfig.get_config(u'display songbar', True)):
+ for action in self.Songbar.actions:
+ self.Songbar.actions[action].setVisible(False)
+ verses = item.verse_order.split(u' ')
+ for verse in verses:
+ try:
+ self.Songbar.actions[verse].setVisible(True)
+ except:
+ #More than 20 verses hard luck
+ pass
self.Songbar.setVisible(True)
elif item.service_item_type == ServiceType.Image:
#Not sensible to allow loops with 1 frame
@@ -323,6 +332,13 @@
self.songEdit = False
self.displayServiceManagerItems(item, slideno)
+ def replaceServiceManagerItem(self, item):
+ """
+ Replacement item following a remote edit
+ """
+ if self.commandItem is not None and \
+ item.uuid == self.commandItem.uuid:
+ self.addServiceManagerItem(item, self.PreviewListWidget.currentRow())
def addServiceManagerItem(self, item, slideno):
"""
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2009-10-30 20:14:55 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2009-10-31 09:30:26 +0000
@@ -115,7 +115,6 @@
self.VerseDeleteButton.setEnabled(False)
self.AuthorRemoveButton.setEnabled(False)
self.TopicRemoveButton.setEnabled(False)
- self.title_change = False
def loadAuthors(self):
authors = self.songmanager.get_authors()
@@ -162,7 +161,6 @@
self.VerseListWidget.clear()
self.AuthorsListView.clear()
self.TopicsListView.clear()
- self.title_change = False
self.TitleEditItem.setFocus(QtCore.Qt.OtherFocusReason)
self.loadAuthors()
self.loadTopics()
@@ -235,7 +233,6 @@
topic_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(topic.id))
self.TopicsListView.addItem(topic_name)
self._validate_song()
- self.title_change = False
self.TitleEditItem.setFocus(QtCore.Qt.OtherFocusReason)
#if not preview hide the preview button
self.previewButton.setVisible(False)
@@ -378,7 +375,6 @@
def onTitleEditItemLostFocus(self):
self.song.title = self.TitleEditItem.text()
- self.title_change = True
def onVerseOrderEditLostFocus(self):
self.song.verse_order = self.VerseOrderEdit.text()
@@ -431,6 +427,7 @@
self.song.search_title = unicode(self.TitleEditItem.displayText()) + \
u'@'+ unicode(self.AlternativeEdit.displayText())
self.song.comments = unicode(self.CommentsEdit.toPlainText())
+ self.song.verse_order = unicode(self.VerseOrderEdit.text())
self.song.ccli_number = unicode(self.CCLNumberEdit.displayText())
self.processLyrics()
self.processTitle()
=== modified file 'openlp/plugins/songs/lib/manager.py'
--- openlp/plugins/songs/lib/manager.py 2009-09-25 23:06:54 +0000
+++ openlp/plugins/songs/lib/manager.py 2009-10-31 09:30:26 +0000
@@ -106,6 +106,7 @@
self.session.commit()
return True
except:
+ log.exception(u'Could not save song to song database')
self.session.rollback()
log.exception(u'Could not save song to song database')
return False
Follow ups