* src/BaseDoc.py: save/load paragraph description (#850)

svn: r7945
This commit is contained in:
Don Allingham 2007-01-21 04:14:59 +00:00
parent a41031ddef
commit 10c75e48b6
2 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,5 @@
2007-01-20 Don Allingham <don@gramps-project.org>
* src/BaseDoc.py: save/load paragraph description (#850)
* src/QuestionDialog.py: close window before calling callback
* src/DataViews/_PersonView.py (PersonView.change_db): apply
dirty flag to initial build to prevent forcing of build on load

View File

@ -890,6 +890,7 @@ class StyleSheetList:
tmargin = float(para.get_top_margin())
bmargin = float(para.get_bottom_margin())
padding = float(para.get_padding())
xml_file.write('description="%s" ' % para.get_description())
xml_file.write('rmargin="%s" ' % Utils.gformat(rmargin))
xml_file.write('lmargin="%s" ' % Utils.gformat(lmargin))
xml_file.write('first="%s" ' % Utils.gformat(findent))
@ -1027,6 +1028,9 @@ class SheetParser(handler.ContentHandler):
self.f.set_underline(int(attrs['underline']))
self.f.set_color(cnv2color(attrs['color']))
elif tag == "para":
if attrs.has_key('description'):
self.p.set_description(attrs['description'])
self.p.set_right_margin(Utils.gfloat(attrs['rmargin']))
self.p.set_right_margin(Utils.gfloat(attrs['rmargin']))
self.p.set_left_margin(Utils.gfloat(attrs['lmargin']))
self.p.set_first_indent(Utils.gfloat(attrs['first']))