forked from openlp/openlp
Fix saving
This commit is contained in:
parent
73692e9e9f
commit
0102500e47
@ -160,7 +160,7 @@ class VerticalType(object):
|
|||||||
boolean_list = [u'italics', u'override', u'outline', u'shadow',
|
boolean_list = [u'italics', u'override', u'outline', u'shadow',
|
||||||
u'slide_transition']
|
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'width', u'shadow_size', u'outline_size', u'horizontal_align',
|
||||||
u'vertical_align', u'wrap_style']
|
u'vertical_align', u'wrap_style']
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ class ThemeXML(object):
|
|||||||
# Create Filename element
|
# Create Filename element
|
||||||
self.child_element(background, u'filename', filename)
|
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,
|
bold=u'False', italics=u'False', line_adjustment=0,
|
||||||
xpos=0, ypos=0, width=0, height=0 , outline=u'False', outline_color=u'#ffffff',
|
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):
|
outline_pixel=2, shadow=u'False', shadow_color=u'#ffffff', shadow_pixel=5):
|
||||||
@ -272,7 +272,7 @@ class ThemeXML(object):
|
|||||||
``color``
|
``color``
|
||||||
The colour of the font.
|
The colour of the font.
|
||||||
|
|
||||||
``proportion``
|
``size``
|
||||||
The size of the font.
|
The size of the font.
|
||||||
|
|
||||||
``override``
|
``override``
|
||||||
@ -327,7 +327,7 @@ class ThemeXML(object):
|
|||||||
# Create Font color element
|
# Create Font color element
|
||||||
self.child_element(background, u'color', color)
|
self.child_element(background, u'color', color)
|
||||||
# Create Proportion name element
|
# Create Proportion name element
|
||||||
self.child_element(background, u'size', unicode(proportion))
|
self.child_element(background, u'size', unicode(size))
|
||||||
# Create weight name element
|
# Create weight name element
|
||||||
self.child_element(background, u'bold', unicode(bold))
|
self.child_element(background, u'bold', unicode(bold))
|
||||||
# Create italics name element
|
# Create italics name element
|
||||||
|
@ -536,8 +536,6 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeDialog):
|
|||||||
os.path.split(unicode(self.theme.background_filename))[1]
|
os.path.split(unicode(self.theme.background_filename))[1]
|
||||||
save_to = os.path.join(self.path, self.theme.theme_name, filename)
|
save_to = os.path.join(self.path, self.theme.theme_name, filename)
|
||||||
save_from = self.theme.background_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):
|
if self.thememanager.saveTheme(self.theme, save_from, save_to):
|
||||||
return QtGui.QDialog.accept(self)
|
return QtGui.QDialog.accept(self)
|
||||||
|
|
||||||
|
@ -710,6 +710,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
self.global_theme)
|
self.global_theme)
|
||||||
self.editingDefault = False
|
self.editingDefault = False
|
||||||
self.pushThemes()
|
self.pushThemes()
|
||||||
|
return True
|
||||||
else:
|
else:
|
||||||
# Don't close the dialog - allow the user to change the name of
|
# Don't close the dialog - allow the user to change the name of
|
||||||
# the theme or to cancel the theme dialog completely.
|
# the theme or to cancel the theme dialog completely.
|
||||||
|
Loading…
Reference in New Issue
Block a user