← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~phill-ridout/openlp/issue1000 into lp:openlp

 

phill has proposed merging lp:~phill-ridout/openlp/issue1000 into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #1039221 in OpenLP: "No validation on background image field in theme wizard"
  https://bugs.launchpad.net/openlp/+bug/1039221

For more details, see:
https://code.launchpad.net/~phill-ridout/openlp/issue1000/+merge/121118

Fixes bug 1039221 No validation on background image field in theme wizard
Also normalise the path
-- 
https://code.launchpad.net/~phill-ridout/openlp/issue1000/+merge/121118
Your team OpenLP Core is requested to review the proposed merge of lp:~phill-ridout/openlp/issue1000 into lp:openlp.
=== modified file 'openlp/core/ui/themeform.py'
--- openlp/core/ui/themeform.py	2012-07-08 08:23:56 +0000
+++ openlp/core/ui/themeform.py	2012-08-24 05:42:24 +0000
@@ -524,7 +524,8 @@
             translate('OpenLP.ThemeForm', 'Select Image'), u'',
             images_filter)
         if filename:
-            self.theme.background_filename = unicode(filename)
+            self.theme.background_filename = \
+                os.path.normpath(unicode(filename))
         self.setBackgroundPageValues()
 
     def onMainColorButtonClicked(self):
@@ -617,6 +618,8 @@
         saveTo = None
         if self.theme.background_type == \
             BackgroundType.to_string(BackgroundType.Image):
+           # if os.path.isfile(self.theme.background_filename):
+            #
             filename = \
                 os.path.split(unicode(self.theme.background_filename))[1]
             saveTo = os.path.join(self.path, self.theme.theme_name, filename)


Follow ups