forked from openlp/openlp
Sort out number of buttons on SlideController to match song and make more KITT like
This commit is contained in:
parent
4eaa7a1535
commit
258bf403c8
@ -176,16 +176,16 @@ class SlideController(QtGui.QWidget):
|
|||||||
if isLive:
|
if isLive:
|
||||||
self.Songbar = OpenLPToolbar(self)
|
self.Songbar = OpenLPToolbar(self)
|
||||||
self.Songbar.addToolbarButton(
|
self.Songbar.addToolbarButton(
|
||||||
u'Bridge', u':/media/media_time.png',
|
u'Bridge', u':/slides/slide_close.png',
|
||||||
self.trUtf8(u'Bridge'),
|
self.trUtf8(u'Bridge'),
|
||||||
self.onSongBarHandler)
|
self.onSongBarHandler)
|
||||||
self.Songbar.addToolbarButton(
|
self.Songbar.addToolbarButton(
|
||||||
u'Chorus', u':/media/media_time.png',
|
u'Chorus', u':/slides/slide_close.png',
|
||||||
self.trUtf8(u'Chorus'),
|
self.trUtf8(u'Chorus'),
|
||||||
self.onSongBarHandler)
|
self.onSongBarHandler)
|
||||||
for verse in range(1, 9):
|
for verse in range(1, 20):
|
||||||
self.Songbar.addToolbarButton(
|
self.Songbar.addToolbarButton(
|
||||||
unicode(verse), u':/media/media_time.png',
|
unicode(verse), u':/slides/slide_close.png',
|
||||||
unicode(self.trUtf8(u'Verse %s'))%verse,
|
unicode(self.trUtf8(u'Verse %s'))%verse,
|
||||||
self.onSongBarHandler)
|
self.onSongBarHandler)
|
||||||
self.ControllerLayout.addWidget(self.Songbar)
|
self.ControllerLayout.addWidget(self.Songbar)
|
||||||
@ -282,7 +282,15 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.Toolbar.makeWidgetsInvisible(self.image_list)
|
self.Toolbar.makeWidgetsInvisible(self.image_list)
|
||||||
if item.name == u'Songs' and \
|
if item.name == u'Songs' and \
|
||||||
str_to_bool(self.songsconfig.get_config(u'display songbar', True)):
|
str_to_bool(self.songsconfig.get_config(u'display songbar', True)):
|
||||||
print item.verse_order
|
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)
|
self.Songbar.setVisible(True)
|
||||||
elif item.service_item_type == ServiceType.Image:
|
elif item.service_item_type == ServiceType.Image:
|
||||||
#Not sensible to allow loops with 1 frame
|
#Not sensible to allow loops with 1 frame
|
||||||
|
Loading…
Reference in New Issue
Block a user