forked from openlp/openlp
Fix up song tagging so case does not matter
Fix bug in transitions when using images Remove MediaTab as not wanted
This commit is contained in:
parent
b8149cc826
commit
480fc4771f
@ -198,11 +198,13 @@ class MainDisplay(DisplayWidget):
|
|||||||
self.displayAlert()
|
self.displayAlert()
|
||||||
elif not self.displayBlank:
|
elif not self.displayBlank:
|
||||||
if transition:
|
if transition:
|
||||||
if self.hasTransition and self.frame[u'trans'] is not None:
|
if self.hasTransition:
|
||||||
self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame[u'trans']))
|
if self.frame[u'trans'] is not None:
|
||||||
self.repaint()
|
self.display.setPixmap(QtGui.QPixmap.fromImage(self.frame[u'trans']))
|
||||||
self.display.setPixmap(QtGui.QPixmap.fromImage(frame[u'trans']))
|
self.repaint()
|
||||||
self.repaint()
|
if frame[u'trans'] is not None:
|
||||||
|
self.display.setPixmap(QtGui.QPixmap.fromImage(frame[u'trans']))
|
||||||
|
self.repaint()
|
||||||
self.hasTransition = True
|
self.hasTransition = True
|
||||||
self.display.setPixmap(QtGui.QPixmap.fromImage(frame[u'main']))
|
self.display.setPixmap(QtGui.QPixmap.fromImage(frame[u'main']))
|
||||||
self.repaint()
|
self.repaint()
|
||||||
|
@ -354,9 +354,12 @@ class SlideController(QtGui.QWidget):
|
|||||||
str_to_bool(self.songsconfig.get_config(u'show songbar', True)):
|
str_to_bool(self.songsconfig.get_config(u'show songbar', True)):
|
||||||
for action in self.Songbar.actions:
|
for action in self.Songbar.actions:
|
||||||
self.Songbar.actions[action].setVisible(False)
|
self.Songbar.actions[action].setVisible(False)
|
||||||
if item.verse_order:
|
hasButtons = False
|
||||||
for slide in self.slideList:
|
for slide in self.slideList:
|
||||||
self.Songbar.actions[slide.lower()].setVisible(True)
|
if slide is not None:
|
||||||
|
self.Songbar.actions[slide].setVisible(True)
|
||||||
|
hasButtons = True
|
||||||
|
if hasButtons:
|
||||||
self.Songbar.setVisible(True)
|
self.Songbar.setVisible(True)
|
||||||
elif item.is_image():
|
elif item.is_image():
|
||||||
#Not sensible to allow loops with 1 frame
|
#Not sensible to allow loops with 1 frame
|
||||||
@ -447,9 +450,9 @@ class SlideController(QtGui.QWidget):
|
|||||||
if self.serviceItem.is_text():
|
if self.serviceItem.is_text():
|
||||||
#only load the slot once
|
#only load the slot once
|
||||||
try:
|
try:
|
||||||
test = self.slideList[frame[u'verseTag'].lower()]
|
test = self.slideList[frame[u'verseTag']]
|
||||||
except:
|
except:
|
||||||
self.slideList[frame[u'verseTag'].lower()] = framenumber
|
self.slideList[frame[u'verseTag']] = framenumber
|
||||||
item.setText(frame[u'text'])
|
item.setText(frame[u'text'])
|
||||||
else:
|
else:
|
||||||
label = QtGui.QLabel()
|
label = QtGui.QLabel()
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2009 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2009 Tim Bentley, Jonathan Corwin, Michael #
|
|
||||||
# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
|
|
||||||
# Carsten Tinggaard #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
|
||||||
|
|
||||||
from openlp.core.lib import SettingsTab, str_to_bool
|
|
||||||
|
|
||||||
class MediaTab(SettingsTab):
|
|
||||||
"""
|
|
||||||
mediaTab is the media settings tab in the settings dialog.
|
|
||||||
"""
|
|
||||||
def __init__(self, title, section=None):
|
|
||||||
SettingsTab.__init__(self, title, section)
|
|
||||||
|
|
||||||
def setupUi(self):
|
|
||||||
self.setObjectName(u'MediaTab')
|
|
||||||
self.tabTitleVisible = self.trUtf8('Media')
|
|
||||||
#self.MediaLayout = QtGui.QFormLayout(self)
|
|
||||||
#self.MediaLayout.setObjectName(u'MediaLayout')
|
|
||||||
|
|
||||||
def retranslateUi(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def load(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def save(self):
|
|
||||||
pass
|
|
||||||
|
|
@ -40,9 +40,6 @@ class MediaPlugin(Plugin):
|
|||||||
# passed with drag and drop messages
|
# passed with drag and drop messages
|
||||||
self.dnd_id = u'Media'
|
self.dnd_id = u'Media'
|
||||||
|
|
||||||
def get_settings_tab(self):
|
|
||||||
return MediaTab(self.name)
|
|
||||||
|
|
||||||
def initialise(self):
|
def initialise(self):
|
||||||
log.info(u'Plugin Initialising')
|
log.info(u'Plugin Initialising')
|
||||||
Plugin.initialise(self)
|
Plugin.initialise(self)
|
||||||
|
@ -369,7 +369,9 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
for count, parts in enumerate(match.split(u']---\n')):
|
for count, parts in enumerate(match.split(u']---\n')):
|
||||||
if len(parts) > 1:
|
if len(parts) > 1:
|
||||||
if count == 0:
|
if count == 0:
|
||||||
variant = parts
|
#make sure the tag is correctly cased
|
||||||
|
variant = u'%s%s' % \
|
||||||
|
(parts[0:1].upper(), parts[1:].lower())
|
||||||
else:
|
else:
|
||||||
if parts.endswith(u'\n'):
|
if parts.endswith(u'\n'):
|
||||||
parts = parts.rstrip(u'\n')
|
parts = parts.rstrip(u'\n')
|
||||||
|
@ -289,28 +289,29 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
service_item.theme = song.theme_name
|
service_item.theme = song.theme_name
|
||||||
service_item.edit_enabled = True
|
service_item.edit_enabled = True
|
||||||
service_item.editId = item_id
|
service_item.editId = item_id
|
||||||
service_item.verse_order = song.verse_order
|
|
||||||
if song.lyrics.startswith(u'<?xml version='):
|
if song.lyrics.startswith(u'<?xml version='):
|
||||||
songXML = SongXMLParser(song.lyrics)
|
songXML = SongXMLParser(song.lyrics)
|
||||||
verseList = songXML.get_verses()
|
verseList = songXML.get_verses()
|
||||||
#no verse list or only 1 space (in error)
|
#no verse list or only 1 space (in error)
|
||||||
if service_item.verse_order is None or \
|
if song.verse_order is None or \
|
||||||
service_item.verse_order == u'' or service_item.verse_order == u' ':
|
song.verse_order == u'' or song.verse_order == u' ':
|
||||||
for verse in verseList:
|
for verse in verseList:
|
||||||
service_item.add_from_text(verse[1][:30], unicode(verse[1]))
|
service_item.add_from_text(verse[1][:30], unicode(verse[1]))
|
||||||
else:
|
else:
|
||||||
#Loop through the verse list and expand the song accordingly.
|
#Loop through the verse list and expand the song accordingly.
|
||||||
for order in service_item.verse_order.split(u' '):
|
for order in song.verse_order.upper().split(u' '):
|
||||||
|
if len(order) == 0:
|
||||||
|
break
|
||||||
for verse in verseList:
|
for verse in verseList:
|
||||||
if verse[1]:
|
if verse[1]:
|
||||||
if verse[0][u'type'].lower() == "verse" and \
|
if verse[0][u'type'] == "Verse":
|
||||||
verse[0][u'label'][0].lower() == order[1:].lower():
|
if verse[0][u'label'][0] == order[1:]:
|
||||||
verseTag = u'%s:%s' % \
|
verseTag = u'%s:%s' % \
|
||||||
(verse[0][u'type'], verse[0][u'label'])
|
(verse[0][u'type'], verse[0][u'label'])
|
||||||
service_item.add_from_text\
|
service_item.add_from_text\
|
||||||
(verse[1][:30], verse[1], verseTag)
|
(verse[1][:30], verse[1], verseTag)
|
||||||
else:
|
else:
|
||||||
if verse[0][u'type'][0].lower() == order[0].lower():
|
if verse[0][u'type'][0] == order[0]:
|
||||||
verseTag = u'%s:%s' % \
|
verseTag = u'%s:%s' % \
|
||||||
(verse[0][u'type'], verse[0][u'label'])
|
(verse[0][u'type'], verse[0][u'label'])
|
||||||
service_item.add_from_text\
|
service_item.add_from_text\
|
||||||
|
Loading…
Reference in New Issue
Block a user