openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #00660
[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)
--
https://code.launchpad.net/~trb143/openlp/fixes/+merge/13911
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp-1to2-converter.py' (properties changed: -x to +x)
--- openlp-1to2-converter.py 2009-10-24 07:14:11 +0000
+++ openlp-1to2-converter.py 2009-10-25 08:15:23 +0000
@@ -25,7 +25,13 @@
import sys
import os
-import sqlite
+try:
+ import sqlite
+except:
+ try:
+ import pysqlite2
+ except:
+ print 'No Sqlite2 package available'
import sqlite3
import re
from optparse import OptionParser
=== modified file 'openlp/core/lib/eventreceiver.py'
--- openlp/core/lib/eventreceiver.py 2009-10-17 05:47:17 +0000
+++ openlp/core/lib/eventreceiver.py 2009-10-25 08:15:23 +0000
@@ -86,6 +86,13 @@
``config_updated``
Informs components the config has changed
+
+ ``edit_song``
+ Requests the current song on the preview display be loaded for edit
+
+ ``preview_song``
+ Tells the song plugin the edit has finished and the song can be previewed
+ Only available if the edit was triggered by the Preview button.
"""
global log
log = logging.getLogger(u'EventReceiver')
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2009-10-24 16:40:36 +0000
+++ openlp/core/ui/slidecontroller.py 2009-10-25 08:15:23 +0000
@@ -97,6 +97,8 @@
]
self.timer_id = 0
self.commandItem = None
+ self.songEdit = False
+ self.row = 0
self.Panel = QtGui.QWidget(parent.ControlSplitter)
# Layout for holding panel
self.PanelLayout = QtGui.QVBoxLayout(self.Panel)
@@ -180,6 +182,7 @@
self.Toolbar.addToolbarWidget(
u'Image SpinBox', self.DelaySpinBox)
self.DelaySpinBox.setSuffix(self.trUtf8(u's'))
+ self.DelaySpinBox.setToolTip(self.trUtf8(u'Delay between slides in seconds'))
self.ControllerLayout.addWidget(self.Toolbar)
# Screen preview area
@@ -289,7 +292,12 @@
Receiver().send_message(u'%s_start' % item.name.lower(), \
[item.shortname, item.service_item_path,
item.service_frames[0][u'title']])
- self.displayServiceManagerItems(item, 0)
+ slideno = 0
+ if self.songEdit:
+ slideno = self.row
+ self.songEdit = False
+ self.displayServiceManagerItems(item, slideno)
+
def addServiceManagerItem(self, item, slideno):
"""
@@ -297,7 +305,7 @@
request the correct the toolbar of the plugin
Called by ServiceManager
"""
- log.debug(u'addServiceItem')
+ log.debug(u'addServiceManagerItem')
#If old item was a command tell it to stop
if self.commandItem is not None and \
self.commandItem.service_item_type == ServiceType.Command:
@@ -387,12 +395,13 @@
if this is the Live Controller also display on the screen
"""
row = self.PreviewListWidget.currentRow()
+ self.row = 0
if row > -1 and row < self.PreviewListWidget.rowCount():
if self.commandItem.service_item_type == ServiceType.Command:
Receiver().send_message(u'%s_slide'% self.commandItem.name.lower(), [row])
- QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
+ if isLive:
+ QtCore.QTimer.singleShot(0.5, self.grabMainDisplay)
else:
- #label = self.PreviewListWidget.cellWidget(row, 0)
frame = self.serviceitem.frames[row][u'image']
before = time.time()
if frame is None:
@@ -401,6 +410,7 @@
log.info(u'Slide Rendering took %4s' % (time.time() - before))
if self.isLive:
self.parent.mainDisplay.frameView(frame)
+ self.row = row
def grabMainDisplay(self):
winid = QtGui.QApplication.desktop().winId()
@@ -474,6 +484,7 @@
self.onSlideSelectedNext()
def onEditSong(self):
+ self.songEdit = True
Receiver().send_message(u'edit_song')
def onGoLive(self):
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2009-10-24 16:40:36 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2009-10-25 08:15:23 +0000
@@ -125,7 +125,7 @@
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'edit_song'), self.onEventEditSong)
QtCore.QObject.connect(Receiver.get_receiver(),
- QtCore.SIGNAL(u'proview_song'), self.onPreviewClick)
+ QtCore.SIGNAL(u'preview_song'), self.onPreviewClick)
def configUpdated(self):
self.searchAsYouType = str_to_bool(
@@ -181,7 +181,6 @@
if song.id == self.fromPreview:
self.fromPreview = 0
self.ListView.setCurrentItem(song_name)
- self.onPreviewClick()
def displayResultsAuthor(self, searchresults):
log.debug(u'display results Author')
Follow ups