parent
59b7b0c550
commit
d6e2b9d935
@ -2,6 +2,7 @@
|
||||
# Gramps - a GTK+/GNOME based genealogy program
|
||||
#
|
||||
# Copyright (C) 2007-2008 Brian G. Matherly
|
||||
# Copyright (C) 2007-2008 Stephane Charette
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -195,14 +196,23 @@ class GVDocBase(BaseDoc.BaseDoc,BaseDoc.GVDoc):
|
||||
actually generate a file.
|
||||
"""
|
||||
if self.note:
|
||||
self.write( 'labelloc="%s";\n' % self.noteloc )
|
||||
self.write( 'label="' )
|
||||
for line in self.note:
|
||||
self.write( '%s\\n' % line.replace('"', '\\\"') )
|
||||
self.write( '";\n')
|
||||
self.write( 'fontsize="%d";\n' % self.notesize )
|
||||
# build up the label
|
||||
label = u''
|
||||
for line in self.note: # for every line in the note...
|
||||
line = line.strip() # ...strip whitespace from this line...
|
||||
if line != '': # ...and if we still have a line...
|
||||
if label != '': # ...see if we need to insert a newline...
|
||||
label += '\\n'
|
||||
label += line.replace('"', '\\\"')
|
||||
|
||||
self.write( '}' )
|
||||
# after all that, see if we have a label to display
|
||||
if label != '':
|
||||
self.write( '\n')
|
||||
self.write( ' label="%s";\n' % label )
|
||||
self.write( ' labelloc="%s";\n' % self.noteloc )
|
||||
self.write( ' fontsize="%d";\n' % self.notesize )
|
||||
|
||||
self.write( '}\n\n' )
|
||||
|
||||
def add_node(self, id, label, shape="", color="",
|
||||
style="", fillcolor="", url="", htmloutput=False ):
|
||||
@ -286,6 +296,7 @@ class GVDocBase(BaseDoc.BaseDoc,BaseDoc.GVDoc):
|
||||
def start_subgraph(self,id):
|
||||
self.write(' subgraph cluster_%s\n' % id)
|
||||
self.write(' {\n')
|
||||
self.write(' style="invis";\n') # no border around subgraph (#0002176)
|
||||
|
||||
def end_subgraph(self):
|
||||
self.write(' }\n')
|
||||
|
@ -141,20 +141,17 @@ class FamilyLinesOptions(MenuReportOptions):
|
||||
|
||||
self.limit_parents = BooleanOption(_('Limit the number of parents'),
|
||||
False)
|
||||
self.limit_parents.set_help(
|
||||
_('The maximum number of ancestors to include.'))
|
||||
self.limit_parents.set_help( _('The maximum number of ancestors to include.'))
|
||||
menu.add_option(category, 'FLlimitParents', self.limit_parents)
|
||||
self.limit_parents.connect('value-changed', self.limit_changed)
|
||||
|
||||
self.max_parents = NumberOption('', 50, 10, 9999)
|
||||
self.max_parents.set_help(
|
||||
_('The maximum number of ancestors to include.'))
|
||||
self.max_parents.set_help( _('The maximum number of ancestors to include.'))
|
||||
menu.add_option(category, 'FLmaxParents', self.max_parents)
|
||||
|
||||
self.limit_children = BooleanOption(_('Limit the number of children'),
|
||||
False)
|
||||
self.limit_children.set_help(
|
||||
_('The maximum number of children to include.'))
|
||||
self.limit_children.set_help( _('The maximum number of children to include.'))
|
||||
menu.add_option(category, 'FLlimitChildren', self.limit_children)
|
||||
self.limit_children.connect('value-changed', self.limit_changed)
|
||||
|
||||
@ -169,8 +166,7 @@ class FamilyLinesOptions(MenuReportOptions):
|
||||
|
||||
self.include_images = BooleanOption(
|
||||
_('Include thumbnail images of people'), True)
|
||||
self.include_images.set_help(
|
||||
_('The maximum number of children to include.'))
|
||||
self.include_images.set_help( _('The maximum number of children to include.'))
|
||||
menu.add_option(category, 'FLincludeImages', self.include_images)
|
||||
self.include_images.connect('value-changed', self.images_changed)
|
||||
|
||||
@ -204,10 +200,6 @@ class FamilyLinesOptions(MenuReportOptions):
|
||||
includeNumChildren.set_help( _('Whether to include the number of children for families with more than 1 child.'))
|
||||
menu.add_option(category, 'FLincludeNumChildren', includeNumChildren)
|
||||
|
||||
includeResearcher = BooleanOption( _('Include researcher and date'), True)
|
||||
includeResearcher.set_help( _('Whether to include at the bottom the researcher''s name, e-mail, and the date the graph was generated.'))
|
||||
menu.add_option(category, 'FLincludeResearcher', includeResearcher)
|
||||
|
||||
includePrivate = BooleanOption( _('Include private records'), False)
|
||||
includePrivate.set_help( _('Whether to include names, dates, and families that are marked as private.'))
|
||||
menu.add_option(category, 'FLincludePrivate', includePrivate)
|
||||
@ -272,7 +264,6 @@ class FamilyLinesReport(Report):
|
||||
self.includeDates = options.handler.options_dict['FLincludeDates' ]
|
||||
self.includePlaces = options.handler.options_dict['FLincludePlaces' ]
|
||||
self.includeNumChildren = options.handler.options_dict['FLincludeNumChildren' ]
|
||||
self.includeResearcher = options.handler.options_dict['FLincludeResearcher' ]
|
||||
self.includePrivate = options.handler.options_dict['FLincludePrivate' ]
|
||||
|
||||
# the gidlist is annoying for us to use since we always have to convert
|
||||
@ -287,7 +278,7 @@ class FamilyLinesReport(Report):
|
||||
self.surnameColours = {}
|
||||
tmp = options.handler.options_dict['FLsurnameColours'].split()
|
||||
while len(tmp) > 1:
|
||||
surname = tmp.pop(0).encode('iso-8859-1','xmlcharrefreplace')
|
||||
surname = tmp.pop(0).encode('iso-8859-1', 'xmlcharrefreplace')
|
||||
colour = tmp.pop(0)
|
||||
self.surnameColours[surname] = colour
|
||||
|
||||
@ -298,7 +289,7 @@ class FamilyLinesReport(Report):
|
||||
# this is where we'll do all of the work of figuring out who
|
||||
# from the database is going to be output into the report
|
||||
|
||||
self.progress = Utils.ProgressMeter(_('Generating Family Lines'),_('Starting'))
|
||||
self.progress = Utils.ProgressMeter(_('Generating Family Lines'), _('Starting'))
|
||||
|
||||
# starting with the people of interest, we then add parents:
|
||||
self.peopleToOutput.clear()
|
||||
@ -834,11 +825,11 @@ class FamilyLinesReport(Report):
|
||||
fatherHandle = family.get_father_handle()
|
||||
motherHandle = family.get_mother_handle()
|
||||
|
||||
self.doc.add_comment('')
|
||||
|
||||
if self.useSubgraphs and fatherHandle and motherHandle:
|
||||
self.doc.start_subgraph(fgid)
|
||||
|
||||
self.doc.add_comment('')
|
||||
|
||||
# see if we have a father to link to this family
|
||||
if fatherHandle:
|
||||
if fatherHandle in self.peopleToOutput:
|
||||
|
Loading…
x
Reference in New Issue
Block a user