Disable styles for LaTeX and change xml file name
svn: r101
This commit is contained in:
@ -316,10 +316,10 @@ def report(database,person):
|
|||||||
styles.add_style("Generation",para)
|
styles.add_style("Generation",para)
|
||||||
|
|
||||||
para = ParagraphStyle()
|
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)
|
styles.add_style("Entry",para)
|
||||||
|
|
||||||
style_sheet_list = StyleSheetList("ancestor_report",styles)
|
style_sheet_list = StyleSheetList("ancestor_report.xml",styles)
|
||||||
build_menu(None)
|
build_menu(None)
|
||||||
|
|
||||||
topDialog.get_widget("labelTitle").set_text("Ahnentafel Report for " + name)
|
topDialog.get_widget("labelTitle").set_text("Ahnentafel Report for " + name)
|
||||||
@ -352,11 +352,13 @@ def build_menu(object):
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
def option_switch(obj):
|
def option_switch(obj):
|
||||||
val = obj.get_data("paper")
|
val = obj.get_data("paper")
|
||||||
|
st = obj.get_data("styles")
|
||||||
notebook = topDialog.get_widget("option_notebook")
|
notebook = topDialog.get_widget("option_notebook")
|
||||||
if val == 1:
|
if val == 1:
|
||||||
notebook.set_page(0)
|
notebook.set_page(0)
|
||||||
else:
|
else:
|
||||||
notebook.set_page(1)
|
notebook.set_page(1)
|
||||||
|
topDialog.get_widget("style_frame").set_sensitive(st)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -111,8 +111,13 @@ class DescendantReport:
|
|||||||
self.doc.write_text(')')
|
self.doc.write_text(')')
|
||||||
self.doc.end_paragraph()
|
self.doc.end_paragraph()
|
||||||
|
|
||||||
|
childlist = []
|
||||||
for family in person.getFamilyList():
|
for family in person.getFamilyList():
|
||||||
for child in family.getChildList():
|
for child in family.getChildList():
|
||||||
|
childlist.append(child)
|
||||||
|
|
||||||
|
childlist.sort(sort.by_birthdate)
|
||||||
|
for child in childlist:
|
||||||
self.dump(level+1,child)
|
self.dump(level+1,child)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
@ -134,11 +139,12 @@ class DesReportWindow:
|
|||||||
"on_save_clicked": on_save_clicked
|
"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_paper_menu(self.top.get_widget("papersize"))
|
||||||
PaperMenu.make_orientation_menu(self.top.get_widget("orientation"))
|
PaperMenu.make_orientation_menu(self.top.get_widget("orientation"))
|
||||||
FindDoc.get_text_doc_menu(self.top.get_widget("format"),0,\
|
FindDoc.get_text_doc_menu(self.top.get_widget("format"),0,\
|
||||||
option_switch,\
|
option_switch,notebook)
|
||||||
self.top.get_widget("option_notebook"))
|
|
||||||
|
|
||||||
mytop = self.top.get_widget("dialog1")
|
mytop = self.top.get_widget("dialog1")
|
||||||
|
|
||||||
@ -147,6 +153,7 @@ class DesReportWindow:
|
|||||||
f.set_type_face(FONT_SANS_SERIF)
|
f.set_type_face(FONT_SANS_SERIF)
|
||||||
f.set_bold(1)
|
f.set_bold(1)
|
||||||
p = ParagraphStyle()
|
p = ParagraphStyle()
|
||||||
|
p.set_header_level(1)
|
||||||
p.set_font(f)
|
p.set_font(f)
|
||||||
|
|
||||||
sheet = StyleSheet()
|
sheet = StyleSheet()
|
||||||
@ -159,7 +166,7 @@ class DesReportWindow:
|
|||||||
p.set_left_margin(float(i-1))
|
p.set_left_margin(float(i-1))
|
||||||
sheet.add_style("Level" + str(i),p)
|
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)
|
build_menu(self)
|
||||||
|
|
||||||
mytop.set_data("o",self)
|
mytop.set_data("o",self)
|
||||||
@ -190,11 +197,14 @@ def build_menu(object):
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
def option_switch(obj):
|
def option_switch(obj):
|
||||||
val = obj.get_data("paper")
|
val = obj.get_data("paper")
|
||||||
|
st = obj.get_data("styles")
|
||||||
notebook = obj.get_data("obj")
|
notebook = obj.get_data("obj")
|
||||||
|
frame = notebook.get_data("frame")
|
||||||
if val == 1:
|
if val == 1:
|
||||||
notebook.set_page(0)
|
notebook.set_page(0)
|
||||||
else:
|
else:
|
||||||
notebook.set_page(1)
|
notebook.set_page(1)
|
||||||
|
frame.set_sensitive(st)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -411,7 +411,7 @@ def report(database,person):
|
|||||||
para = ParagraphStyle()
|
para = ParagraphStyle()
|
||||||
para.set_font(font)
|
para.set_font(font)
|
||||||
styles.add_style('ParentName',para)
|
styles.add_style('ParentName',para)
|
||||||
style_sheet_list = StyleSheetList("family_group",styles)
|
style_sheet_list = StyleSheetList("family_group.xml",styles)
|
||||||
build_menu(None)
|
build_menu(None)
|
||||||
|
|
||||||
frame = topDialog.get_widget("spouse")
|
frame = topDialog.get_widget("spouse")
|
||||||
@ -468,12 +468,14 @@ def build_menu(object):
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
def option_switch(obj):
|
def option_switch(obj):
|
||||||
val = obj.get_data("paper")
|
val = obj.get_data("paper")
|
||||||
|
st = obj.get_data("styles")
|
||||||
notebook = topDialog.get_widget("option_notebook")
|
notebook = topDialog.get_widget("option_notebook")
|
||||||
|
|
||||||
if val == 1:
|
if val == 1:
|
||||||
notebook.set_page(0)
|
notebook.set_page(0)
|
||||||
else:
|
else:
|
||||||
notebook.set_page(1)
|
notebook.set_page(1)
|
||||||
|
topDialog.get_widget("style_frame").set_sensitive(st)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -388,7 +388,7 @@ def report(database,person):
|
|||||||
p.set_font(font)
|
p.set_font(font)
|
||||||
styles.add_style("Normal",p)
|
styles.add_style("Normal",p)
|
||||||
|
|
||||||
style_sheet_list = StyleSheetList("individual_summary",styles)
|
style_sheet_list = StyleSheetList("individual_summary.xml",styles)
|
||||||
build_menu(None)
|
build_menu(None)
|
||||||
|
|
||||||
topDialog.signal_autoconnect({
|
topDialog.signal_autoconnect({
|
||||||
@ -428,11 +428,13 @@ def on_style_edit_clicked(obj):
|
|||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
def option_switch(obj):
|
def option_switch(obj):
|
||||||
val = obj.get_data("paper")
|
val = obj.get_data("paper")
|
||||||
|
st = obj.get_data("styles")
|
||||||
notebook = topDialog.get_widget("option_notebook")
|
notebook = topDialog.get_widget("option_notebook")
|
||||||
if val == 1:
|
if val == 1:
|
||||||
notebook.set_page(0)
|
notebook.set_page(0)
|
||||||
else:
|
else:
|
||||||
notebook.set_page(1)
|
notebook.set_page(1)
|
||||||
|
topDialog.get_widget("style_frame").set_sensitive(st)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user