From 0102500e4787e116ceaea7a24801fadd8fba67c3 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sat, 6 Nov 2010 07:58:46 +0000 Subject: [PATCH] Fix saving --- openlp/core/lib/theme.py | 8 ++++---- openlp/core/ui/themeform.py | 2 -- openlp/core/ui/thememanager.py | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index c752c6d7d..d9d8dfd22 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -160,7 +160,7 @@ class VerticalType(object): boolean_list = [u'italics', u'override', u'outline', u'shadow', u'slide_transition'] -integer_list = [u'proportion', u'line_adjustment', u'x', u'height', u'y', +integer_list = [u'size', u'line_adjustment', u'x', u'height', u'y', u'width', u'shadow_size', u'outline_size', u'horizontal_align', u'vertical_align', u'wrap_style'] @@ -259,7 +259,7 @@ class ThemeXML(object): # Create Filename element self.child_element(background, u'filename', filename) - def add_font(self, name, color, proportion, override, fonttype=u'main', + def add_font(self, name, color, size, override, fonttype=u'main', bold=u'False', italics=u'False', line_adjustment=0, xpos=0, ypos=0, width=0, height=0 , outline=u'False', outline_color=u'#ffffff', outline_pixel=2, shadow=u'False', shadow_color=u'#ffffff', shadow_pixel=5): @@ -272,7 +272,7 @@ class ThemeXML(object): ``color`` The colour of the font. - ``proportion`` + ``size`` The size of the font. ``override`` @@ -327,7 +327,7 @@ class ThemeXML(object): # Create Font color element self.child_element(background, u'color', color) # Create Proportion name element - self.child_element(background, u'size', unicode(proportion)) + self.child_element(background, u'size', unicode(size)) # Create weight name element self.child_element(background, u'bold', unicode(bold)) # Create italics name element diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index c38715991..d06716701 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -536,8 +536,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeDialog): os.path.split(unicode(self.theme.background_filename))[1] save_to = os.path.join(self.path, self.theme.theme_name, filename) save_from = self.theme.background_filename - #theme_xml = self.theme.extract_xml() - #pretty_theme = self.theme.extract_formatted_xml() if self.thememanager.saveTheme(self.theme, save_from, save_to): return QtGui.QDialog.accept(self) diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 588c20f22..0f472a6f8 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -710,6 +710,7 @@ class ThemeManager(QtGui.QWidget): self.global_theme) self.editingDefault = False self.pushThemes() + return True else: # Don't close the dialog - allow the user to change the name of # the theme or to cancel the theme dialog completely.