From 1f45296ff7cf0fccdc87c4917393af7675a4abb9 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Fri, 11 Jul 2003 03:29:33 +0000 Subject: [PATCH] * 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 --- gramps2/ChangeLog | 15 +++++++++++++++ gramps2/src/Report.py | 4 ++-- gramps2/src/plugins/AncestorReport.py | 3 ++- gramps2/src/plugins/Ancestors.py | 3 ++- gramps2/src/plugins/DescendReport.py | 4 +++- gramps2/src/plugins/DetAncestralReport.py | 2 +- gramps2/src/plugins/DetDescendantReport.py | 3 ++- gramps2/src/plugins/FamilyGroup.py | 3 ++- gramps2/src/plugins/FtmStyleAncestors.py | 3 ++- gramps2/src/plugins/FtmStyleDescendants.py | 2 +- gramps2/src/plugins/IndivComplete.py | 3 ++- gramps2/src/plugins/IndivSummary.py | 5 +++-- 12 files changed, 37 insertions(+), 13 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 0118f5237..e45ef2c8d 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -7,6 +7,21 @@ Call setup() to obtain complete style information. * src/plugins/IndivComplete.py (IndivComplete.__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 * src/Relationship.py: Fix '[...]teenth' relationship name typos. diff --git a/gramps2/src/Report.py b/gramps2/src/Report.py index 10b145506..49bd85047 100644 --- a/gramps2/src/Report.py +++ b/gramps2/src/Report.py @@ -354,7 +354,7 @@ class BareReportDialog: frame, because it must be recreated to reflect any changes whenever the user closes the style editor dialog.""" 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) #------------------------------------------------------------------------ @@ -750,6 +750,7 @@ class ReportDialog(BareReportDialog): """Initialize a dialog to request that the user select options for a basic *stand-alone* report.""" + self.style_name = "default" BareReportDialog.__init__(self,database,person) # 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_menu.set_sensitive(obj.get_data("styles")) - #------------------------------------------------------------------------ # # Functions related to setting up the dialog window. diff --git a/gramps2/src/plugins/AncestorReport.py b/gramps2/src/plugins/AncestorReport.py index a0b14a739..a3f531229 100644 --- a/gramps2/src/plugins/AncestorReport.py +++ b/gramps2/src/plugins/AncestorReport.py @@ -307,11 +307,12 @@ class AncestorBareReportDialog(Report.BareReportDialog): self.person = self.db.getPerson(self.options[0]) else: self.person = person + self.style_name = stl + Report.BareReportDialog.__init__(self,database,self.person) self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) - self.style_name = stl self.new_person = None self.generations_spinbox.set_value(self.max_gen) diff --git a/gramps2/src/plugins/Ancestors.py b/gramps2/src/plugins/Ancestors.py index 391fdcc7a..fd7ea7e3c 100644 --- a/gramps2/src/plugins/Ancestors.py +++ b/gramps2/src/plugins/Ancestors.py @@ -771,12 +771,13 @@ class AncestorsBareReportDialog(Report.BareReportDialog): self.person = self.db.getPerson(self.options[0]) else: self.person = person + self.style_name = stl + Report.BareReportDialog.__init__(self,database,self.person) self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) self.opt_cite = int(self.options[3]) - self.style_name = stl self.new_person = None self.generations_spinbox.set_value(self.max_gen) diff --git a/gramps2/src/plugins/DescendReport.py b/gramps2/src/plugins/DescendReport.py index 46f2b4610..8c85c0cea 100644 --- a/gramps2/src/plugins/DescendReport.py +++ b/gramps2/src/plugins/DescendReport.py @@ -201,11 +201,13 @@ class DescendantBareReportDialog(Report.BareReportDialog): self.person = self.db.getPerson(self.options[0]) else: self.person = person + + self.style_name = stl + Report.BareReportDialog.__init__(self,database,self.person) self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) - self.style_name = stl self.new_person = None self.generations_spinbox.set_value(self.max_gen) diff --git a/gramps2/src/plugins/DetAncestralReport.py b/gramps2/src/plugins/DetAncestralReport.py index c758feb6a..4ea9e3df0 100644 --- a/gramps2/src/plugins/DetAncestralReport.py +++ b/gramps2/src/plugins/DetAncestralReport.py @@ -960,6 +960,7 @@ class DetAncestorBareReportDialog(Report.BareReportDialog): self.person = self.db.getPerson(self.options[0]) else: self.person = person + self.style_name = stl self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) @@ -976,7 +977,6 @@ class DetAncestorBareReportDialog(Report.BareReportDialog): Report.BareReportDialog.__init__(self,database,self.person) - self.style_name = stl self.new_person = None self.window.run() diff --git a/gramps2/src/plugins/DetDescendantReport.py b/gramps2/src/plugins/DetDescendantReport.py index a02057a28..10767bdcc 100644 --- a/gramps2/src/plugins/DetDescendantReport.py +++ b/gramps2/src/plugins/DetDescendantReport.py @@ -982,9 +982,10 @@ class DetDescendantBareReportDialog(Report.BareReportDialog): self.child_ref = int(self.options[11]) self.images = int(self.options[12]) + self.style_name = stl + Report.BareReportDialog.__init__(self,database,self.person) - self.style_name = stl self.new_person = None self.window.run() diff --git a/gramps2/src/plugins/FamilyGroup.py b/gramps2/src/plugins/FamilyGroup.py index 9fc9f4a2a..da66e843b 100644 --- a/gramps2/src/plugins/FamilyGroup.py +++ b/gramps2/src/plugins/FamilyGroup.py @@ -450,11 +450,12 @@ class FamilyGroupBareDialog(Report.BareReportDialog): self.person = self.db.getPerson(self.options[0]) else: self.person = person + self.style_name = stl + Report.BareReportDialog.__init__(self,database,self.person) self.spouse_name = self.options[1] - self.style_name = stl self.new_person = None self.spouse_map = _build_spouse_map(self.person) diff --git a/gramps2/src/plugins/FtmStyleAncestors.py b/gramps2/src/plugins/FtmStyleAncestors.py index e36097022..38835427b 100644 --- a/gramps2/src/plugins/FtmStyleAncestors.py +++ b/gramps2/src/plugins/FtmStyleAncestors.py @@ -854,11 +854,12 @@ class FtmAncestorBareReportDialog(Report.BareReportDialog): self.person = self.db.getPerson(self.options[0]) else: self.person = person + self.style_name = stl + Report.BareReportDialog.__init__(self,database,self.person) self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) - self.style_name = stl self.new_person = None self.generations_spinbox.set_value(self.max_gen) diff --git a/gramps2/src/plugins/FtmStyleDescendants.py b/gramps2/src/plugins/FtmStyleDescendants.py index f97ace38e..1772c124c 100644 --- a/gramps2/src/plugins/FtmStyleDescendants.py +++ b/gramps2/src/plugins/FtmStyleDescendants.py @@ -1260,12 +1260,12 @@ class FtmDescendantBareReportDialog(Report.BareReportDialog): self.person = self.db.getPerson(self.options[0]) else: self.person = person + self.style_name = stl Report.BareReportDialog.__init__(self,database,self.person) self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) - self.style_name = stl self.new_person = None self.generations_spinbox.set_value(self.max_gen) diff --git a/gramps2/src/plugins/IndivComplete.py b/gramps2/src/plugins/IndivComplete.py index 9ebec7955..b54ece7f1 100644 --- a/gramps2/src/plugins/IndivComplete.py +++ b/gramps2/src/plugins/IndivComplete.py @@ -556,12 +556,13 @@ class IndivCompleteBareReportDialog(Report.BareReportDialog): self.person = self.db.getPerson(self.options[0]) else: self.person = person + self.style_name = stl + Report.BareReportDialog.__init__(self,database,self.person) self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) self.filter_num = int(self.options[3]) - self.style_name = stl self.new_person = None self.generations_spinbox.set_value(self.max_gen) diff --git a/gramps2/src/plugins/IndivSummary.py b/gramps2/src/plugins/IndivSummary.py index 2e3438b60..459c88e8d 100644 --- a/gramps2/src/plugins/IndivSummary.py +++ b/gramps2/src/plugins/IndivSummary.py @@ -1,7 +1,7 @@ # # 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 # 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]) else: self.person = person + self.style_name = stl + Report.BareReportDialog.__init__(self,database,self.person) self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) - self.style_name = stl self.new_person = None self.generations_spinbox.set_value(self.max_gen)