clean ups

This commit is contained in:
Andreas Preikschat 2011-03-02 19:20:47 +01:00
parent 6c310efd52
commit 1fda0e371a

View File

@ -162,9 +162,7 @@ class ServiceItem(object):
line_break = True line_break = True
if self.is_capable(ItemCapabilities.NoLineBreaks): if self.is_capable(ItemCapabilities.NoLineBreaks):
line_break = False line_break = False
theme = None theme = self.theme if self.theme else None
if self.theme:
theme = self.theme
self.main, self.footer = \ self.main, self.footer = \
self.render_manager.set_override_theme(theme, useOverride) self.render_manager.set_override_theme(theme, useOverride)
self.themedata = self.render_manager.renderer._theme self.themedata = self.render_manager.renderer._theme
@ -187,11 +185,7 @@ class ServiceItem(object):
self.title = clean_tags(self.title) self.title = clean_tags(self.title)
self.foot_text = None self.foot_text = None
if self.raw_footer: if self.raw_footer:
for foot in self.raw_footer: self.foot_text = u'<br>'.join(self.raw_footer)
if not self.foot_text:
self.foot_text = foot
else:
self.foot_text = u'%s<br>%s' % (self.foot_text, foot)
def add_from_image(self, path, title): def add_from_image(self, path, title):
""" """
@ -204,8 +198,7 @@ class ServiceItem(object):
A title for the slide in the service item. A title for the slide in the service item.
""" """
self.service_item_type = ServiceItemType.Image self.service_item_type = ServiceItemType.Image
self._raw_frames.append( self._raw_frames.append({u'title': title, u'path': path})
{u'title': title, u'path': path})
self.render_manager.image_manager.add_image(title, path) self.render_manager.image_manager.add_image(title, path)
self._new_item() self._new_item()