openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #00643
[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/13888
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/mediamanageritem.py'
--- openlp/core/lib/mediamanageritem.py 2009-10-23 18:48:49 +0000
+++ openlp/core/lib/mediamanageritem.py 2009-10-24 13:30:26 +0000
@@ -118,7 +118,6 @@
self.requiredIcons()
self.setupUi()
self.retranslateUi()
- #self.initialise()
def requiredIcons(self):
"""
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py 2009-10-23 16:10:09 +0000
+++ openlp/core/lib/renderer.py 2009-10-24 13:30:26 +0000
@@ -201,7 +201,7 @@
#if we have more text add up to 10 spaces on the front.
if len(line) > 0 and self._theme.font_main_indentation > 0:
line = u'%s%s' % \
- (u' '[:self._theme.font_main_indentation], line)
+ (u' '[:int(self._theme.font_main_indentation)], line)
#Text fits in a line now
for count, line in enumerate(split_lines):
page.append(line)
=== modified file 'openlp/core/lib/rendermanager.py'
--- openlp/core/lib/rendermanager.py 2009-09-26 06:46:26 +0000
+++ openlp/core/lib/rendermanager.py 2009-10-24 13:30:26 +0000
@@ -65,6 +65,7 @@
self.service_theme = u''
self.global_style = u''
self.override_background = None
+ self.themedata = None
self.save_bg_frame = None
self.override_background_changed = False
@@ -130,7 +131,7 @@
self.theme = self.service_theme
else:
self.theme = self.global_theme
- if self.theme != self.renderer.theme_name:
+ if self.theme != self.renderer.theme_name or self.themedata is None:
log.debug(u'theme is now %s', self.theme)
self.themedata = self.theme_manager.getThemeData(self.theme)
self.calculate_default(
=== modified file 'openlp/core/ui/amendthemeform.py'
--- openlp/core/ui/amendthemeform.py 2009-10-24 09:33:20 +0000
+++ openlp/core/ui/amendthemeform.py 2009-10-24 13:30:26 +0000
@@ -678,6 +678,6 @@
log.debug(u'Page Length area height %s , metrics %s , lines %s' %
(int(self.FontMainHeightSpinBox.value()), metrics.height(), page_length ))
self.FontMainLinesPageLabel.setText(
- self.trUtf8(u'Slide Height is %s rows') % page_length)
+ self.trUtf8((u'Slide Height is %s rows') % page_length))
frame = self.thememanager.generateImage(theme)
self.ThemePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py 2009-10-24 09:33:20 +0000
+++ openlp/core/ui/slidecontroller.py 2009-10-24 13:30:26 +0000
@@ -89,9 +89,12 @@
self.image_list = [
self.trUtf8(u'Start Loop'),
self.trUtf8(u'Stop Loop'),
- #self.trUtf8(u'Loop Separator'),
+ u'Loop Separator',
self.trUtf8(u'Image SpinBox')
]
+ self.song_list = [
+ self.trUtf8(u'Edit Song'),
+ ]
self.timer_id = 0
self.commandItem = None
self.Panel = QtGui.QWidget(parent.ControlSplitter)
@@ -161,6 +164,10 @@
self.Toolbar.addToolbarButton(
self.trUtf8(u'Go Live'), u':/system/system_live.png',
self.trUtf8(u'Move to live'), self.onGoLive)
+ self.Toolbar.addToolbarSeparator(u'Close Separator')
+ self.Toolbar.addToolbarButton(
+ self.trUtf8(u'Edit Song'), u':songs/song_edit.png',
+ self.trUtf8(u'Edit and re-preview Song'), self.onEditSong)
if isLive:
self.Toolbar.addToolbarSeparator(u'Loop Separator')
self.Toolbar.addToolbarButton(
@@ -216,6 +223,8 @@
Receiver().send_message(u'request_spin_delay')
if isLive:
self.Toolbar.makeWidgetsInvisible(self.image_list)
+ else:
+ self.Toolbar.makeWidgetsInvisible(self.song_list)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'slidecontroller_first'), self.onSlideSelectedFirst)
QtCore.QObject.connect(Receiver.get_receiver(),
@@ -255,7 +264,10 @@
"""
Allows the Preview toolbar to be customised
"""
- pass
+ if item.name == u'Songs':
+ self.Toolbar.makeWidgetsVisible(self.song_list)
+ else:
+ self.Toolbar.makeWidgetsInvisible(self.song_list)
def addServiceItem(self, item):
"""
@@ -389,13 +401,13 @@
log.info(u'Slide Rendering took %4s' % (time.time() - before))
if self.isLive:
self.parent.mainDisplay.frameView(frame)
-
+
def grabMainDisplay(self):
winid = QtGui.QApplication.desktop().winId()
rm = self.parent.RenderManager
rect = rm.screen_list[rm.current_display][u'size']
winimg = QtGui.QPixmap.grabWindow(winid, rect.x(), rect.y(), rect.width(), rect.height())
- self.SlidePreview.setPixmap(winimg)
+ self.SlidePreview.setPixmap(winimg)
def onSlideSelectedNext(self):
"""
@@ -461,6 +473,9 @@
if event.timerId() == self.timer_id:
self.onSlideSelectedNext()
+ def onEditSong(self):
+ Receiver().send_message(u'edit_song')
+
def onGoLive(self):
"""
If preview copy slide item to live
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2009-10-23 18:48:49 +0000
+++ openlp/core/ui/thememanager.py 2009-10-24 13:30:26 +0000
@@ -371,7 +371,7 @@
newtheme.add_font(unicode(theme.FontName),
unicode(theme.FontColor.name()),
- unicode(theme.FontProportion * 2), u'False')
+ unicode(theme.FontProportion * 3), u'False')
newtheme.add_font(unicode(theme.FontName),
unicode(theme.FontColor.name()),
unicode(12), u'False', u'footer')
=== modified file 'openlp/plugins/bibles/lib/bibleDBimpl.py'
--- openlp/plugins/bibles/lib/bibleDBimpl.py 2009-10-12 10:18:54 +0000
+++ openlp/plugins/bibles/lib/bibleDBimpl.py 2009-10-24 13:30:26 +0000
@@ -158,6 +158,11 @@
def get_bible_text(self, bookname, chapter, sverse, everse):
log.debug(u'get_bible_text %s, %s, %s, %s', bookname, chapter, sverse,
everse)
+ #Look up book name or abbreviation
+ book = self.get_bible_book(bookname)
+ if book is not None:
+ bookname = book.name
+ log.debug(u'bookname corrected to %s' % bookname)
verses = self.session.query(Verse).join(Book).filter(
Book.name == bookname).filter(Verse.chapter == chapter).filter(
Verse.verse>=sverse).filter(Verse.verse<=everse).order_by(
=== modified file 'openlp/plugins/songs/forms/editsongform.py'
--- openlp/plugins/songs/forms/editsongform.py 2009-10-23 18:48:49 +0000
+++ openlp/plugins/songs/forms/editsongform.py 2009-10-24 13:30:26 +0000
@@ -410,6 +410,7 @@
self.songmanager.save_song(self.song)
if self.title_change:
Receiver().send_message(u'load_song_list')
+ Receiver().send_message(u'preview_song')
self.close()
def processLyrics(self):
=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py 2009-10-23 18:48:49 +0000
+++ openlp/plugins/songs/lib/mediaitem.py 2009-10-24 13:30:26 +0000
@@ -55,6 +55,7 @@
self.edit_song_form = EditSongForm(self.parent.songmanager, self)
self.song_maintenance_form = SongMaintenanceForm(
self.parent.songmanager, self)
+ self.fromPreview = None
def requiredIcons(self):
MediaManagerItem.requiredIcons(self)
@@ -121,6 +122,10 @@
QtCore.SIGNAL(u'load_song_list'), self.onSearchTextButtonClick)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'config_updated'), self.configUpdated)
+ 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)
def configUpdated(self):
self.searchAsYouType = str_to_bool(
@@ -173,6 +178,10 @@
song_name = QtGui.QListWidgetItem(song_detail)
song_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(song.id))
self.ListView.addItem(song_name)
+ 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')
@@ -218,13 +227,18 @@
def onSongMaintenanceClick(self):
self.song_maintenance_form.exec_()
- def onEditClick(self):
+ def onEditClick(self, preview=False):
item = self.ListView.currentItem()
if item is not None:
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
+ if preview:
+ self.fromPreview = item_id
self.edit_song_form.loadSong(item_id)
self.edit_song_form.exec_()
+ def onEventEditSong (self):
+ self.onEditClick(True)
+
def onDeleteClick(self):
item = self.ListView.currentItem()
if item is not None:
Follow ups