diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 38d772f6e..2b03b6265 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,5 +1,16 @@ 2003-07-07 Alex Roitman * src/plugins/DetDescendantReport.py: Enable book functionality. + Fix styles in book. Switch to tuple of options. + * src/plugins/AncestorReport.py: Fix styles in book. + * src/plugins/Ancestors.py: Fix styles in book. + * src/plugins/DescendReport.py: Fix styles in book. + * src/plugins/FtmStyleAncestors.py: Fix styles in book. + * src/plugins/FtmStyleDescendants.py: Fix styles in book. + * src/plugins/IndivComplete.py: Switch to tuple of options. + * src/plugins/IndivSummary.py: Switch to tuple of options. + * src/plugins/SimpleBookTitle.py: Fix styles in book. + * src/plugins/FamilyGroup.py: Fix styles in book. + * src/plugins/DetAncestralReport.py: Fix styles in book. 2003-07-07 Tim Waugh * src/plugins/WriteGedcom.py: Fix GEDCOM export. Fixed date diff --git a/gramps2/src/plugins/AncestorReport.py b/gramps2/src/plugins/AncestorReport.py index 319eeace5..a0b14a739 100644 --- a/gramps2/src/plugins/AncestorReport.py +++ b/gramps2/src/plugins/AncestorReport.py @@ -309,9 +309,6 @@ class AncestorBareReportDialog(Report.BareReportDialog): self.person = person Report.BareReportDialog.__init__(self,database,self.person) - def make_default_style(self): - _make_default_style(self.default_style) - self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) self.style_name = stl @@ -327,6 +324,9 @@ class AncestorBareReportDialog(Report.BareReportDialog): # Customization hooks # #------------------------------------------------------------------------ + def make_default_style(self): + _make_default_style(self.default_style) + def get_title(self): """The window title for this dialog""" return "%s - GRAMPS Book" % (_("Ahnentafel Report")) @@ -352,7 +352,7 @@ class AncestorBareReportDialog(Report.BareReportDialog): if self.new_person: self.person = self.new_person - self.options = [ self.person.getId(), self.max_gen, self.pg_brk ] + self.options = ( self.person.getId(), self.max_gen, self.pg_brk ) self.style_name = self.selected_style.get_name() #------------------------------------------------------------------------ diff --git a/gramps2/src/plugins/Ancestors.py b/gramps2/src/plugins/Ancestors.py index 865bd9d94..391fdcc7a 100644 --- a/gramps2/src/plugins/Ancestors.py +++ b/gramps2/src/plugins/Ancestors.py @@ -773,9 +773,6 @@ class AncestorsBareReportDialog(Report.BareReportDialog): self.person = person Report.BareReportDialog.__init__(self,database,self.person) - def make_default_style(self): - _make_default_style(self.default_style) - self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) self.opt_cite = int(self.options[3]) @@ -793,6 +790,9 @@ class AncestorsBareReportDialog(Report.BareReportDialog): # Customization hooks # #------------------------------------------------------------------------ + def make_default_style(self): + _make_default_style(self.default_style) + def get_title(self): """The window title for this dialog""" return "%s - GRAMPS Book" % (_("Ancestors Report")) @@ -827,7 +827,7 @@ class AncestorsBareReportDialog(Report.BareReportDialog): if self.new_person: self.person = self.new_person - self.options = [ self.person.getId(), self.max_gen, self.pg_brk, self.opt_cite ] + self.options = ( self.person.getId(), self.max_gen, self.pg_brk, self.opt_cite ) self.style_name = self.selected_style.get_name() #------------------------------------------------------------------------ diff --git a/gramps2/src/plugins/DescendReport.py b/gramps2/src/plugins/DescendReport.py index eec8b55bf..46f2b4610 100644 --- a/gramps2/src/plugins/DescendReport.py +++ b/gramps2/src/plugins/DescendReport.py @@ -203,9 +203,6 @@ class DescendantBareReportDialog(Report.BareReportDialog): self.person = person Report.BareReportDialog.__init__(self,database,self.person) - def make_default_style(self): - _make_default_style(self.default_style) - self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) self.style_name = stl @@ -221,6 +218,9 @@ class DescendantBareReportDialog(Report.BareReportDialog): # Customization hooks # #------------------------------------------------------------------------ + def make_default_style(self): + _make_default_style(self.default_style) + def get_title(self): """The window title for this dialog""" return "%s - GRAMPS Book" % (_("Descendant Report")) @@ -246,7 +246,7 @@ class DescendantBareReportDialog(Report.BareReportDialog): if self.new_person: self.person = self.new_person - self.options = [ self.person.getId(), self.max_gen, self.pg_brk ] + self.options = ( self.person.getId(), self.max_gen, self.pg_brk ) self.style_name = self.selected_style.get_name() #------------------------------------------------------------------------ diff --git a/gramps2/src/plugins/DetAncestralReport.py b/gramps2/src/plugins/DetAncestralReport.py index d239c8ea1..db20974e1 100644 --- a/gramps2/src/plugins/DetAncestralReport.py +++ b/gramps2/src/plugins/DetAncestralReport.py @@ -29,9 +29,7 @@ from intl import gettext as _ from QuestionDialog import ErrorDialog import Report -#from Report import * import TextDoc -#from TextDoc import * import gtk import gnome.ui @@ -977,9 +975,6 @@ class DetAncestorBareReportDialog(Report.BareReportDialog): Report.BareReportDialog.__init__(self,database,self.person) - def make_default_style(self): - _make_default_style(self.default_style) - self.style_name = stl self.new_person = None @@ -990,6 +985,9 @@ class DetAncestorBareReportDialog(Report.BareReportDialog): # Customization hooks # #------------------------------------------------------------------------ + def make_default_style(self): + _make_default_style(self.default_style) + def get_title(self): """The window title for this dialog""" return "%s - GRAMPS Book" % (_("Detailed Ancestral Report")) @@ -1130,10 +1128,10 @@ class DetAncestorBareReportDialog(Report.BareReportDialog): if self.new_person: self.person = self.new_person - self.options = [ self.person.getId(), self.max_gen, self.pg_brk, + self.options = ( self.person.getId(), self.max_gen, self.pg_brk, self.first_name, self.full_date, self.list_children, self.include_notes, self.place, self.date, self.age, - self.dup_persons, self.child_ref, self.images ] + self.dup_persons, self.child_ref, self.images ) self.style_name = self.selected_style.get_name() diff --git a/gramps2/src/plugins/DetDescendantReport.py b/gramps2/src/plugins/DetDescendantReport.py index 6aaf6d284..0be7e914a 100644 --- a/gramps2/src/plugins/DetDescendantReport.py +++ b/gramps2/src/plugins/DetDescendantReport.py @@ -982,9 +982,6 @@ class DetDescendantBareReportDialog(Report.BareReportDialog): Report.BareReportDialog.__init__(self,database,self.person) - def make_default_style(self): - _make_default_style(self.default_style) - self.style_name = stl self.new_person = None @@ -995,6 +992,9 @@ class DetDescendantBareReportDialog(Report.BareReportDialog): # Customization hooks # #------------------------------------------------------------------------ + def make_default_style(self): + _make_default_style(self.default_style) + def get_title(self): """The window title for this dialog""" return "%s - GRAMPS Book" % (_("Detailed Descendant Report")) @@ -1135,10 +1135,10 @@ class DetDescendantBareReportDialog(Report.BareReportDialog): if self.new_person: self.person = self.new_person - self.options = [ self.person.getId(), self.max_gen, self.pg_brk, + self.options = ( self.person.getId(), self.max_gen, self.pg_brk, self.first_name, self.full_date, self.list_children, self.include_notes, self.place, self.date, self.age, - self.dup_persons, self.child_ref, self.images ] + self.dup_persons, self.child_ref, self.images ) self.style_name = self.selected_style.get_name() #------------------------------------------------------------------------ diff --git a/gramps2/src/plugins/FamilyGroup.py b/gramps2/src/plugins/FamilyGroup.py index 416cec79d..9fc9f4a2a 100644 --- a/gramps2/src/plugins/FamilyGroup.py +++ b/gramps2/src/plugins/FamilyGroup.py @@ -452,9 +452,6 @@ class FamilyGroupBareDialog(Report.BareReportDialog): self.person = person Report.BareReportDialog.__init__(self,database,self.person) - def make_default_style(self): - _make_default_style(self.default_style) - self.spouse_name = self.options[1] self.style_name = stl @@ -473,6 +470,9 @@ class FamilyGroupBareDialog(Report.BareReportDialog): # Customization hooks # #------------------------------------------------------------------------ + def make_default_style(self): + _make_default_style(self.default_style) + def get_title(self): """The window title for this dialog""" return "%s - GRAMPS Book" % (_("Family Group Report")) @@ -551,7 +551,7 @@ class FamilyGroupBareDialog(Report.BareReportDialog): else: self.spouse_name = "" - self.options = [ self.person.getId(), self.spouse_name ] + self.options = ( self.person.getId(), self.spouse_name ) self.style_name = self.selected_style.get_name() #------------------------------------------------------------------------ diff --git a/gramps2/src/plugins/FtmStyleAncestors.py b/gramps2/src/plugins/FtmStyleAncestors.py index 516540e90..e36097022 100644 --- a/gramps2/src/plugins/FtmStyleAncestors.py +++ b/gramps2/src/plugins/FtmStyleAncestors.py @@ -856,9 +856,6 @@ class FtmAncestorBareReportDialog(Report.BareReportDialog): self.person = person Report.BareReportDialog.__init__(self,database,self.person) - def make_default_style(self): - _make_default_style(self.default_style) - self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) self.style_name = stl @@ -874,6 +871,9 @@ class FtmAncestorBareReportDialog(Report.BareReportDialog): # Customization hooks # #------------------------------------------------------------------------ + def make_default_style(self): + _make_default_style(self.default_style) + def get_title(self): """The window title for this dialog""" return "%s - GRAMPS Book" % (_("FTM Style Ancestor Report")) @@ -899,7 +899,7 @@ class FtmAncestorBareReportDialog(Report.BareReportDialog): if self.new_person: self.person = self.new_person - self.options = [ self.person.getId(), self.max_gen, self.pg_brk ] + self.options = ( self.person.getId(), self.max_gen, self.pg_brk ) self.style_name = self.selected_style.get_name() diff --git a/gramps2/src/plugins/FtmStyleDescendants.py b/gramps2/src/plugins/FtmStyleDescendants.py index 05485693d..63677a3e2 100644 --- a/gramps2/src/plugins/FtmStyleDescendants.py +++ b/gramps2/src/plugins/FtmStyleDescendants.py @@ -1260,10 +1260,8 @@ class FtmDescendantBareReportDialog(Report.BareReportDialog): self.person = self.db.getPerson(self.options[0]) else: self.person = person - Report.BareReportDialog.__init__(self,database,self.person) - def make_default_style(self): - _make_default_style(self.default_style) + Report.BareReportDialog.__init__(self,database,self.person) self.max_gen = int(self.options[1]) self.pg_brk = int(self.options[2]) @@ -1292,6 +1290,9 @@ class FtmDescendantBareReportDialog(Report.BareReportDialog): """Where to save styles for this report.""" return _style_file + def make_default_style(self): + _make_default_style(self.default_style) + def on_cancel(self, obj): pass @@ -1305,7 +1306,7 @@ class FtmDescendantBareReportDialog(Report.BareReportDialog): if self.new_person: self.person = self.new_person - self.options = [ self.person.getId(), self.max_gen, self.pg_brk ] + self.options = ( self.person.getId(), self.max_gen, self.pg_brk ) self.style_name = self.selected_style.get_name() #------------------------------------------------------------------------ diff --git a/gramps2/src/plugins/IndivComplete.py b/gramps2/src/plugins/IndivComplete.py index 29636d614..a7ba4795f 100644 --- a/gramps2/src/plugins/IndivComplete.py +++ b/gramps2/src/plugins/IndivComplete.py @@ -606,7 +606,7 @@ class IndivCompleteBareReportDialog(Report.BareReportDialog): if self.new_person: self.person = self.new_person self.filter_num = self.filter_combo.get_history() - self.options = [ self.person.getId(), self.max_gen, self.pg_brk, self.filter_num] + self.options = ( self.person.getId(), self.max_gen, self.pg_brk, self.filter_num ) self.style_name = self.selected_style.get_name() diff --git a/gramps2/src/plugins/IndivSummary.py b/gramps2/src/plugins/IndivSummary.py index 9d2f9cd15..f11a9236a 100644 --- a/gramps2/src/plugins/IndivSummary.py +++ b/gramps2/src/plugins/IndivSummary.py @@ -540,7 +540,7 @@ class IndivSummaryBareReportDialog(Report.BareReportDialog): if self.new_person: self.person = self.new_person - self.options = [ self.person.getId(), self.max_gen, self.pg_brk ] + self.options = ( self.person.getId(), self.max_gen, self.pg_brk ) self.style_name = self.selected_style.get_name() diff --git a/gramps2/src/plugins/SimpleBookTitle.py b/gramps2/src/plugins/SimpleBookTitle.py index 784d65e9c..199ada639 100644 --- a/gramps2/src/plugins/SimpleBookTitle.py +++ b/gramps2/src/plugins/SimpleBookTitle.py @@ -139,9 +139,6 @@ class SimpleBookTitleDialog(Report.BareReportDialog): self.person = person Report.BareReportDialog.__init__(self,database,self.person) - def make_default_style(self): - _make_default_style(self.default_style) - if self.options[1]: self.title_string = self.options[1] else: @@ -168,6 +165,9 @@ class SimpleBookTitleDialog(Report.BareReportDialog): # Customization hooks # #------------------------------------------------------------------------ + def make_default_style(self): + _make_default_style(self.default_style) + def get_title(self): """The window title for this dialog""" return "%s - GRAMPS Book" % (_("Simple Book Title")) @@ -218,7 +218,7 @@ class SimpleBookTitleDialog(Report.BareReportDialog): if self.new_person: self.person = self.new_person - self.options = [ self.person.getId() , self.title_string, self.copyright_string ] + self.options = ( self.person.getId() , self.title_string, self.copyright_string ) self.style_name = self.selected_style.get_name()