From b6db2e3659420b6ff9ee60583465354f227b92ce Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Wed, 5 Jan 2011 16:55:28 +0000 Subject: [PATCH] Fixes --- openlp/core/lib/theme.py | 20 ++++++++++---------- openlp/core/ui/themeform.py | 4 ++++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/openlp/core/lib/theme.py b/openlp/core/lib/theme.py index 1e4a9854e..619d991c7 100644 --- a/openlp/core/lib/theme.py +++ b/openlp/core/lib/theme.py @@ -527,15 +527,15 @@ class ThemeXML(object): value = u'' setattr(self, tag, unicode(value).strip().lstrip()) - def __str__(self): - """ - Return a string representation of this object. - """ - theme_strings = [] - for key in dir(self): - if key[0:1] != u'_': - theme_strings.append(u'%30s: %s' % (key, getattr(self, key))) - return u'\n'.join(theme_strings) +# def __str__(self): +# """ +# Return a string representation of this object. +# """ +# theme_strings = [] +# for key in dir(self): +# if key[0:1] != u'_': +# theme_strings.append(u'%30s: %s' % (key, getattr(self, key))) +# return u'\n'.join(theme_strings) def _de_hump(self, name): """ @@ -598,4 +598,4 @@ class ThemeXML(object): self.font_footer_shadow_size) self.add_display(self.display_horizontal_align, self.display_vertical_align, - self.display_slide_transition) \ No newline at end of file + self.display_slide_transition) diff --git a/openlp/core/ui/themeform.py b/openlp/core/ui/themeform.py index f5b119fa8..ca33cd628 100644 --- a/openlp/core/ui/themeform.py +++ b/openlp/core/ui/themeform.py @@ -125,8 +125,10 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): """ Set up display at start of theme edit. """ + print "setdefaults 1", self.theme, self.theme.theme_name self.restart() self.accepted = False + print "setdefaults 2", self.theme, self.theme.theme_name self.setBackgroundPageValues() self.setMainAreaPageValues() self.setFooterAreaPageValues() @@ -286,6 +288,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): Run the wizard. """ log.debug(u'Editing theme %s' % self.theme.theme_name) + print "exec_", self.theme, self.theme.theme_name self.updateThemeAllowed = False self.setDefaults() self.updateThemeAllowed = True @@ -321,6 +324,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard): """ Handle the display and state of the Background page. """ + print "setBPV", self.theme, self.theme.theme_name if self.theme.background_type == \ BackgroundType.to_string(BackgroundType.Solid): self.colorButton.setStyleSheet(u'background-color: %s' %