removed argument

This commit is contained in:
Andreas Preikschat 2012-06-10 15:39:45 +02:00
parent f1afae1813
commit 7281f44603
5 changed files with 10 additions and 15 deletions

View File

@ -234,10 +234,10 @@ class Renderer(object):
serviceItem = ServiceItem()
if self.force_page:
# make big page for theme edit dialog to get line count
serviceItem.add_from_text(u'', VERSE_FOR_LINE_COUNT)
serviceItem.add_from_text(VERSE_FOR_LINE_COUNT)
else:
self.image_manager.deleteImage(theme_data.theme_name)
serviceItem.add_from_text(u'', VERSE)
serviceItem.add_from_text(VERSE)
serviceItem.renderer = self
serviceItem.raw_footer = FOOTER
# if No file do not update cache

View File

@ -220,20 +220,17 @@ class ServiceItem(object):
self.image_border)
self._new_item()
def add_from_text(self, title, raw_slide, verse_tag=None):
def add_from_text(self, raw_slide, verse_tag=None):
"""
Add a text slide to the service item.
``frame_title``
The title of the slide in the service item.
``raw_slide``
The raw text of the slide.
"""
if verse_tag:
verse_tag = verse_tag.upper()
self.service_item_type = ServiceItemType.Text
title = title.split(u'\n')[0]
title = raw_slide[:30].split(u'\n')[0]
self._raw_frames.append(
{u'title': title, u'raw_slide': raw_slide, u'verseTag': verse_tag})
self._new_item()

View File

@ -417,7 +417,7 @@ class BibleMediaItem(MediaManagerItem):
``bible``
The bible to initialise (unicode).
``last_book_id``
The "book reference id" of the book which is choosen at the moment.
(int)
@ -975,7 +975,7 @@ class BibleMediaItem(MediaManagerItem):
else:
service_item.theme = self.settings.bible_theme
for slide in raw_slides:
service_item.add_from_text(slide[:30], slide)
service_item.add_from_text(slide)
return True
def formatTitle(self, start_bitem, old_bitem):

View File

@ -214,7 +214,7 @@ class CustomMediaItem(MediaManagerItem):
raw_slides = [verse[1] for verse in verseList]
service_item.title = title
for slide in raw_slides:
service_item.add_from_text(slide[:30], slide)
service_item.add_from_text(slide)
if QtCore.QSettings().value(self.settingsSection + u'/display footer',
QtCore.QVariant(True)).toBool() or credit:
service_item.raw_footer.append(u' '.join([title, credit]))

View File

@ -485,8 +485,7 @@ class SongMediaItem(MediaManagerItem):
verse_index = VerseType.from_tag(verse_tag)
verse_tag = VerseType.TranslatedTags[verse_index].upper()
verse_def = u'%s%s' % (verse_tag, verse[0][u'label'])
service_item.add_from_text(
verse[1][:30], unicode(verse[1]), verse_def)
service_item.add_from_text(unicode(verse[1]), verse_def)
else:
# Loop through the verse list and expand the song accordingly.
for order in song.verse_order.lower().split():
@ -505,12 +504,11 @@ class SongMediaItem(MediaManagerItem):
verse_tag = VerseType.TranslatedTags[verse_index]
verse_def = u'%s%s' % (verse_tag,
verse[0][u'label'])
service_item.add_from_text(
verse[1][:30], verse[1], verse_def)
service_item.add_from_text(verse[1], verse_def)
else:
verses = song.lyrics.split(u'\n\n')
for slide in verses:
service_item.add_from_text(slide[:30], unicode(slide))
service_item.add_from_text(unicode(slide))
service_item.title = song.title
author_list = [unicode(author.display_name) for author in song.authors]
service_item.raw_footer.append(song.title)