This commit is contained in:
Tim Bentley 2011-01-05 16:55:28 +00:00
parent 0c793a123e
commit b6db2e3659
2 changed files with 14 additions and 10 deletions

View File

@ -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)
self.display_slide_transition)

View File

@ -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' %