* src/Report.py (BareReportDialog.build_style_menu):

Initialize menu to self.style_name;
(ReportDialog.__init__): Set self.style_name to "default"
for standalone reports.
* src/plugins/DetDescendantReport.py: Define self.style_name before
calling Report.BareReportDialog.__init__().
* src/plugins/AncestorReport.py: Likewise.
* src/plugins/Ancestors.py: Likewise.
* src/plugins/DescendReport.py: Likewise.
* src/plugins/FtmStyleAncestors.py: Likewise.
* src/plugins/FtmStyleDescendants.py: Likewise.
* src/plugins/IndivComplete.py: Likewise.
* src/plugins/IndivSummary.py: Likewise.
* src/plugins/FamilyGroup.py: Likewise.
* src/plugins/DetAncestralReport.py: Likewise.


svn: r1861
This commit is contained in:
Alex Roitman 2003-07-11 03:29:33 +00:00
parent a73fbae639
commit b6cac0abba
12 changed files with 37 additions and 13 deletions

View File

@ -7,6 +7,21 @@
Call setup() to obtain complete style information. Call setup() to obtain complete style information.
* src/plugins/IndivComplete.py (IndivComplete.__init__): Likewise. * src/plugins/IndivComplete.py (IndivComplete.__init__): Likewise.
* src/plugins/IndivSummary.py (IndivSummary.__init__): Likewise. * src/plugins/IndivSummary.py (IndivSummary.__init__): Likewise.
* src/Report.py (BareReportDialog.build_style_menu):
Initialize menu to self.style_name;
(ReportDialog.__init__): Set self.style_name to "default"
for standalone reports.
* src/plugins/DetDescendantReport.py: Define self.style_name before
calling Report.BareReportDialog.__init__().
* src/plugins/AncestorReport.py: Likewise.
* src/plugins/Ancestors.py: Likewise.
* src/plugins/DescendReport.py: Likewise.
* src/plugins/FtmStyleAncestors.py: Likewise.
* src/plugins/FtmStyleDescendants.py: Likewise.
* src/plugins/IndivComplete.py: Likewise.
* src/plugins/IndivSummary.py: Likewise.
* src/plugins/FamilyGroup.py: Likewise.
* src/plugins/DetAncestralReport.py: Likewise.
2003-07-10 Tim Waugh <twaugh@redhat.com> 2003-07-10 Tim Waugh <twaugh@redhat.com>
* src/Relationship.py: Fix '[...]teenth' relationship name typos. * src/Relationship.py: Fix '[...]teenth' relationship name typos.

View File

@ -354,7 +354,7 @@ class BareReportDialog:
frame, because it must be recreated to reflect any changes frame, because it must be recreated to reflect any changes
whenever the user closes the style editor dialog.""" whenever the user closes the style editor dialog."""
style_sheet_map = self.style_sheet_list.get_style_sheet_map() style_sheet_map = self.style_sheet_list.get_style_sheet_map()
myMenu = Utils.build_string_optmenu(style_sheet_map, "default") myMenu = Utils.build_string_optmenu(style_sheet_map, self.style_name)
self.style_menu.set_menu(myMenu) self.style_menu.set_menu(myMenu)
#------------------------------------------------------------------------ #------------------------------------------------------------------------
@ -750,6 +750,7 @@ class ReportDialog(BareReportDialog):
"""Initialize a dialog to request that the user select options """Initialize a dialog to request that the user select options
for a basic *stand-alone* report.""" for a basic *stand-alone* report."""
self.style_name = "default"
BareReportDialog.__init__(self,database,person) BareReportDialog.__init__(self,database,person)
# Allow for post processing of the format frame, since the # Allow for post processing of the format frame, since the
@ -870,7 +871,6 @@ class ReportDialog(BareReportDialog):
self.style_button.set_sensitive(obj.get_data("styles")) self.style_button.set_sensitive(obj.get_data("styles"))
self.style_menu.set_sensitive(obj.get_data("styles")) self.style_menu.set_sensitive(obj.get_data("styles"))
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #
# Functions related to setting up the dialog window. # Functions related to setting up the dialog window.

View File

@ -307,11 +307,12 @@ class AncestorBareReportDialog(Report.BareReportDialog):
self.person = self.db.getPerson(self.options[0]) self.person = self.db.getPerson(self.options[0])
else: else:
self.person = person self.person = person
self.style_name = stl
Report.BareReportDialog.__init__(self,database,self.person) Report.BareReportDialog.__init__(self,database,self.person)
self.max_gen = int(self.options[1]) self.max_gen = int(self.options[1])
self.pg_brk = int(self.options[2]) self.pg_brk = int(self.options[2])
self.style_name = stl
self.new_person = None self.new_person = None
self.generations_spinbox.set_value(self.max_gen) self.generations_spinbox.set_value(self.max_gen)

View File

@ -771,12 +771,13 @@ class AncestorsBareReportDialog(Report.BareReportDialog):
self.person = self.db.getPerson(self.options[0]) self.person = self.db.getPerson(self.options[0])
else: else:
self.person = person self.person = person
self.style_name = stl
Report.BareReportDialog.__init__(self,database,self.person) Report.BareReportDialog.__init__(self,database,self.person)
self.max_gen = int(self.options[1]) self.max_gen = int(self.options[1])
self.pg_brk = int(self.options[2]) self.pg_brk = int(self.options[2])
self.opt_cite = int(self.options[3]) self.opt_cite = int(self.options[3])
self.style_name = stl
self.new_person = None self.new_person = None
self.generations_spinbox.set_value(self.max_gen) self.generations_spinbox.set_value(self.max_gen)

View File

@ -201,11 +201,13 @@ class DescendantBareReportDialog(Report.BareReportDialog):
self.person = self.db.getPerson(self.options[0]) self.person = self.db.getPerson(self.options[0])
else: else:
self.person = person self.person = person
self.style_name = stl
Report.BareReportDialog.__init__(self,database,self.person) Report.BareReportDialog.__init__(self,database,self.person)
self.max_gen = int(self.options[1]) self.max_gen = int(self.options[1])
self.pg_brk = int(self.options[2]) self.pg_brk = int(self.options[2])
self.style_name = stl
self.new_person = None self.new_person = None
self.generations_spinbox.set_value(self.max_gen) self.generations_spinbox.set_value(self.max_gen)

View File

@ -960,6 +960,7 @@ class DetAncestorBareReportDialog(Report.BareReportDialog):
self.person = self.db.getPerson(self.options[0]) self.person = self.db.getPerson(self.options[0])
else: else:
self.person = person self.person = person
self.style_name = stl
self.max_gen = int(self.options[1]) self.max_gen = int(self.options[1])
self.pg_brk = int(self.options[2]) self.pg_brk = int(self.options[2])
@ -976,7 +977,6 @@ class DetAncestorBareReportDialog(Report.BareReportDialog):
Report.BareReportDialog.__init__(self,database,self.person) Report.BareReportDialog.__init__(self,database,self.person)
self.style_name = stl
self.new_person = None self.new_person = None
self.window.run() self.window.run()

View File

@ -982,9 +982,10 @@ class DetDescendantBareReportDialog(Report.BareReportDialog):
self.child_ref = int(self.options[11]) self.child_ref = int(self.options[11])
self.images = int(self.options[12]) self.images = int(self.options[12])
self.style_name = stl
Report.BareReportDialog.__init__(self,database,self.person) Report.BareReportDialog.__init__(self,database,self.person)
self.style_name = stl
self.new_person = None self.new_person = None
self.window.run() self.window.run()

View File

@ -450,11 +450,12 @@ class FamilyGroupBareDialog(Report.BareReportDialog):
self.person = self.db.getPerson(self.options[0]) self.person = self.db.getPerson(self.options[0])
else: else:
self.person = person self.person = person
self.style_name = stl
Report.BareReportDialog.__init__(self,database,self.person) Report.BareReportDialog.__init__(self,database,self.person)
self.spouse_name = self.options[1] self.spouse_name = self.options[1]
self.style_name = stl
self.new_person = None self.new_person = None
self.spouse_map = _build_spouse_map(self.person) self.spouse_map = _build_spouse_map(self.person)

View File

@ -854,11 +854,12 @@ class FtmAncestorBareReportDialog(Report.BareReportDialog):
self.person = self.db.getPerson(self.options[0]) self.person = self.db.getPerson(self.options[0])
else: else:
self.person = person self.person = person
self.style_name = stl
Report.BareReportDialog.__init__(self,database,self.person) Report.BareReportDialog.__init__(self,database,self.person)
self.max_gen = int(self.options[1]) self.max_gen = int(self.options[1])
self.pg_brk = int(self.options[2]) self.pg_brk = int(self.options[2])
self.style_name = stl
self.new_person = None self.new_person = None
self.generations_spinbox.set_value(self.max_gen) self.generations_spinbox.set_value(self.max_gen)

View File

@ -1260,12 +1260,12 @@ class FtmDescendantBareReportDialog(Report.BareReportDialog):
self.person = self.db.getPerson(self.options[0]) self.person = self.db.getPerson(self.options[0])
else: else:
self.person = person self.person = person
self.style_name = stl
Report.BareReportDialog.__init__(self,database,self.person) Report.BareReportDialog.__init__(self,database,self.person)
self.max_gen = int(self.options[1]) self.max_gen = int(self.options[1])
self.pg_brk = int(self.options[2]) self.pg_brk = int(self.options[2])
self.style_name = stl
self.new_person = None self.new_person = None
self.generations_spinbox.set_value(self.max_gen) self.generations_spinbox.set_value(self.max_gen)

View File

@ -556,12 +556,13 @@ class IndivCompleteBareReportDialog(Report.BareReportDialog):
self.person = self.db.getPerson(self.options[0]) self.person = self.db.getPerson(self.options[0])
else: else:
self.person = person self.person = person
self.style_name = stl
Report.BareReportDialog.__init__(self,database,self.person) Report.BareReportDialog.__init__(self,database,self.person)
self.max_gen = int(self.options[1]) self.max_gen = int(self.options[1])
self.pg_brk = int(self.options[2]) self.pg_brk = int(self.options[2])
self.filter_num = int(self.options[3]) self.filter_num = int(self.options[3])
self.style_name = stl
self.new_person = None self.new_person = None
self.generations_spinbox.set_value(self.max_gen) self.generations_spinbox.set_value(self.max_gen)

View File

@ -1,7 +1,7 @@
# #
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
# Copyright (C) 2000 Donald N. Allingham # Copyright (C) 2000-2003 Donald N. Allingham
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@ -493,11 +493,12 @@ class IndivSummaryBareReportDialog(Report.BareReportDialog):
self.person = self.db.getPerson(self.options[0]) self.person = self.db.getPerson(self.options[0])
else: else:
self.person = person self.person = person
self.style_name = stl
Report.BareReportDialog.__init__(self,database,self.person) Report.BareReportDialog.__init__(self,database,self.person)
self.max_gen = int(self.options[1]) self.max_gen = int(self.options[1])
self.pg_brk = int(self.options[2]) self.pg_brk = int(self.options[2])
self.style_name = stl
self.new_person = None self.new_person = None
self.generations_spinbox.set_value(self.max_gen) self.generations_spinbox.set_value(self.max_gen)