← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~googol-hush/openlp/fixes into lp:openlp

 

Andreas Preikschat has proposed merging lp:~googol-hush/openlp/fixes into lp:openlp.

Requested reviews:
  Tim Bentley (trb143)
  Jon Tibble (meths)
Related bugs:
  #598393 After adding a new image to a selected (image) item in the service manager it is not selected anymore
  https://bugs.launchpad.net/bugs/598393

For more details, see:
https://code.launchpad.net/~googol-hush/openlp/fixes/+merge/52108

Hello!

Only cosmetic code changes.

Cheers
-- 
https://code.launchpad.net/~googol-hush/openlp/fixes/+merge/52108
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py	2011-02-24 05:47:38 +0000
+++ openlp/core/lib/serviceitem.py	2011-03-03 18:26:06 +0000
@@ -162,9 +162,7 @@
         line_break = True
         if self.is_capable(ItemCapabilities.NoLineBreaks):
             line_break = False
-        theme = None
-        if self.theme:
-            theme = self.theme
+        theme = self.theme if self.theme else None
         self.main, self.footer = \
             self.render_manager.set_override_theme(theme, useOverride)
         self.themedata = self.render_manager.renderer._theme
@@ -187,11 +185,7 @@
         self.title = clean_tags(self.title)
         self.foot_text = None
         if self.raw_footer:
-            for foot in self.raw_footer:
-                if not self.foot_text:
-                    self.foot_text = foot
-                else:
-                    self.foot_text = u'%s<br>%s' % (self.foot_text, foot)
+            self.foot_text = u'<br>'.join(self.raw_footer)
 
     def add_from_image(self, path, title):
         """
@@ -204,8 +198,7 @@
             A title for the slide in the service item.
         """
         self.service_item_type = ServiceItemType.Image
-        self._raw_frames.append(
-            {u'title': title, u'path': path})
+        self._raw_frames.append({u'title': title, u'path': path})
         self.render_manager.image_manager.add_image(title, path)
         self._new_item()
 


Follow ups