Disable styles for LaTeX and change xml file name

svn: r101
This commit is contained in:
Don Allingham 2001-06-07 22:04:42 +00:00
parent c1f0ef1ac6
commit 7a2ab5ec38
4 changed files with 24 additions and 8 deletions

View File

@ -316,10 +316,10 @@ def report(database,person):
styles.add_style("Generation",para)
para = ParagraphStyle()
para.set(first_indent=-0.75,lmargin=1.0,pad=1)
para.set(first_indent=-2.0,lmargin=2.0,pad=1)
styles.add_style("Entry",para)
style_sheet_list = StyleSheetList("ancestor_report",styles)
style_sheet_list = StyleSheetList("ancestor_report.xml",styles)
build_menu(None)
topDialog.get_widget("labelTitle").set_text("Ahnentafel Report for " + name)
@ -352,11 +352,13 @@ def build_menu(object):
#------------------------------------------------------------------------
def option_switch(obj):
val = obj.get_data("paper")
st = obj.get_data("styles")
notebook = topDialog.get_widget("option_notebook")
if val == 1:
notebook.set_page(0)
else:
notebook.set_page(1)
topDialog.get_widget("style_frame").set_sensitive(st)
#------------------------------------------------------------------------
#

View File

@ -111,9 +111,14 @@ class DescendantReport:
self.doc.write_text(')')
self.doc.end_paragraph()
childlist = []
for family in person.getFamilyList():
for child in family.getChildList():
self.dump(level+1,child)
childlist.append(child)
childlist.sort(sort.by_birthdate)
for child in childlist:
self.dump(level+1,child)
#------------------------------------------------------------------------
#
@ -134,11 +139,12 @@ class DesReportWindow:
"on_save_clicked": on_save_clicked
})
notebook = self.top.get_widget("option_notebook")
notebook.set_data("frame",self.top.get_widget("style_frame"))
PaperMenu.make_paper_menu(self.top.get_widget("papersize"))
PaperMenu.make_orientation_menu(self.top.get_widget("orientation"))
FindDoc.get_text_doc_menu(self.top.get_widget("format"),0,\
option_switch,\
self.top.get_widget("option_notebook"))
option_switch,notebook)
mytop = self.top.get_widget("dialog1")
@ -147,6 +153,7 @@ class DesReportWindow:
f.set_type_face(FONT_SANS_SERIF)
f.set_bold(1)
p = ParagraphStyle()
p.set_header_level(1)
p.set_font(f)
sheet = StyleSheet()
@ -159,7 +166,7 @@ class DesReportWindow:
p.set_left_margin(float(i-1))
sheet.add_style("Level" + str(i),p)
self.style_sheet_list = StyleSheetList("descend_report",sheet)
self.style_sheet_list = StyleSheetList("descend_report.xml",sheet)
build_menu(self)
mytop.set_data("o",self)
@ -190,11 +197,14 @@ def build_menu(object):
#------------------------------------------------------------------------
def option_switch(obj):
val = obj.get_data("paper")
st = obj.get_data("styles")
notebook = obj.get_data("obj")
frame = notebook.get_data("frame")
if val == 1:
notebook.set_page(0)
else:
notebook.set_page(1)
frame.set_sensitive(st)
#------------------------------------------------------------------------
#

View File

@ -411,7 +411,7 @@ def report(database,person):
para = ParagraphStyle()
para.set_font(font)
styles.add_style('ParentName',para)
style_sheet_list = StyleSheetList("family_group",styles)
style_sheet_list = StyleSheetList("family_group.xml",styles)
build_menu(None)
frame = topDialog.get_widget("spouse")
@ -468,12 +468,14 @@ def build_menu(object):
#------------------------------------------------------------------------
def option_switch(obj):
val = obj.get_data("paper")
st = obj.get_data("styles")
notebook = topDialog.get_widget("option_notebook")
if val == 1:
notebook.set_page(0)
else:
notebook.set_page(1)
topDialog.get_widget("style_frame").set_sensitive(st)
#------------------------------------------------------------------------
#

View File

@ -388,7 +388,7 @@ def report(database,person):
p.set_font(font)
styles.add_style("Normal",p)
style_sheet_list = StyleSheetList("individual_summary",styles)
style_sheet_list = StyleSheetList("individual_summary.xml",styles)
build_menu(None)
topDialog.signal_autoconnect({
@ -428,11 +428,13 @@ def on_style_edit_clicked(obj):
#------------------------------------------------------------------------
def option_switch(obj):
val = obj.get_data("paper")
st = obj.get_data("styles")
notebook = topDialog.get_widget("option_notebook")
if val == 1:
notebook.set_page(0)
else:
notebook.set_page(1)
topDialog.get_widget("style_frame").set_sensitive(st)
#------------------------------------------------------------------------
#