diff --git a/ChangeLog b/ChangeLog index 8666397ed..902cdc8c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-01-10 Raphael Ackermann + * src/gen/db/dbdir.py: add doc, remove unused variable + * src/GrampsDbUtils/_GrampsBSDDB.py: : add doc, remove unused variable + * src/plugins/AncestorChart.py: cleanup unused vars + * src/plugins/Calendar.py: typo in doc + * src/plugins/ChangeNames.py: cleanup unused vars + * src/plugins/DescendChart.py: cleanup unused vars + * src/plugins/FamilyLines.py: cleanup unused vars + * src/ReportBase/_ReportUtils.py: fix typo in variable Name + 2008-01-10 Raphael Ackermann * src/MarkupText.py: in _hex_to_color removed dupe assignment to color * src/PageView.py: doc typo and delete unused statements in filter_toggle diff --git a/src/GrampsDbUtils/_GrampsBSDDB.py b/src/GrampsDbUtils/_GrampsBSDDB.py index 07e6c35c8..368289224 100644 --- a/src/GrampsDbUtils/_GrampsBSDDB.py +++ b/src/GrampsDbUtils/_GrampsBSDDB.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2007 Donald N. Allingham +# Copyright (C) 2000-2008 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 @@ -21,7 +21,9 @@ # $Id$ """ -Provides the Berkeley DB (BSDDB) database backend for GRAMPS +Provides the Berkeley DB (BSDDB) database backend for GRAMPS for GRAMPS up +to version 2.2.x + """ #------------------------------------------------------------------------- @@ -1610,10 +1612,6 @@ class GrampsBSDDB(GrampsDbBase, UpdateCallback): def gramps_upgrade(self, callback=None): UpdateCallback.__init__(self, callback) - child_rel_notrans = [ - "None", "Birth", "Adopted", "Stepchild", - "Sponsored", "Foster", "Unknown", "Other", ] - version = self.metadata.get('version', default=_MINVERSION) t = time.time() diff --git a/src/ReportBase/_ReportUtils.py b/src/ReportBase/_ReportUtils.py index 9f5559540..58a66c3c6 100644 --- a/src/ReportBase/_ReportUtils.py +++ b/src/ReportBase/_ReportUtils.py @@ -2556,7 +2556,7 @@ def old_calc_age(database, person): and birth.get_day_valid() and death.get_day_valid() \ and birth.get_day() > death.get_day(): age = death.get_day() + 31 - birth.get_day() - unit = DAYS + units = DAYS return (age, units) diff --git a/src/gen/db/dbdir.py b/src/gen/db/dbdir.py index 910ec877d..ef30d606d 100644 --- a/src/gen/db/dbdir.py +++ b/src/gen/db/dbdir.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2000-2007 Donald N. Allingham +# Copyright (C) 2000-2008 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 @@ -22,6 +22,8 @@ """ Provides the Berkeley DB (DBDir) database backend for GRAMPS +This is used since GRAMPS version 3.0 + """ #------------------------------------------------------------------------- @@ -1733,11 +1735,7 @@ class GrampsDBDir(GrampsDbBase, UpdateCallback): def gramps_upgrade(self,callback=None): UpdateCallback.__init__(self,callback) - child_rel_notrans = [ - "None", "Birth", "Adopted", "Stepchild", - "Sponsored", "Foster", "Unknown", "Other", ] - - version = self.metadata.get('version',default=_MINVERSION) +# version = self.metadata.get('version',default=_MINVERSION) t = time.time() # if version < 13: diff --git a/src/plugins/AncestorChart.py b/src/plugins/AncestorChart.py index 6d37ed80e..bfece004a 100644 --- a/src/plugins/AncestorChart.py +++ b/src/plugins/AncestorChart.py @@ -249,9 +249,6 @@ class AncestorChart(Report): def write_report(self): - generation = 1 - done = 0 - page = 1 (maxy,maxx) = self.genchart.dimensions() maxh = int(self.uh/self.box_height) @@ -330,12 +327,9 @@ class AncestorChart(Report): self.generations_per_page = int(log2(maxh)) else: self.generations_per_page = maxw - acty = 2**self.generations_per_page # build array of x indices - xstart = 0 - ystart = self.offset-self.box_height/2.0 self.delta = pt2cm(self.box_pad_pts) + self.box_width + 0.2 if not self.force_fit: calc_width = self.box_width + 0.2 + pt2cm(self.box_pad_pts) diff --git a/src/plugins/Calendar.py b/src/plugins/Calendar.py index ecd1f604d..24dc84414 100644 --- a/src/plugins/Calendar.py +++ b/src/plugins/Calendar.py @@ -726,7 +726,7 @@ class Xml2Obj: return def Parse(self,filename): - 'Creat a SAX parser and parse filename ' + 'Create a SAX parser and parse filename ' Parser = expat.ParserCreate() # SAX event handlers Parser.StartElementHandler = self.StartElement diff --git a/src/plugins/ChangeNames.py b/src/plugins/ChangeNames.py index bb48671f0..543c09fe7 100644 --- a/src/plugins/ChangeNames.py +++ b/src/plugins/ChangeNames.py @@ -154,7 +154,6 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow): for node in self.iter_list if self.model.get_value(node,0)] - anychange = False for handle in self.db.get_person_handles(): change = False person = self.db.get_person_from_handle(handle) @@ -162,7 +161,6 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow): sname = name.get_surname() if sname in changelist: change = True - anychange = True name.set_surname(sname.capitalize()) if change: self.db.commit_person(person,self.trans) diff --git a/src/plugins/DescendChart.py b/src/plugins/DescendChart.py index 21733bc62..8dd121e09 100644 --- a/src/plugins/DescendChart.py +++ b/src/plugins/DescendChart.py @@ -226,9 +226,6 @@ class DescendChart(Report): def write_report(self): - generation = 1 - done = 0 - page = 1 (maxy,maxx) = self.genchart.dimensions() maxx = (maxx-1)*2 maxh = int((self.uh-0.75)/(self.box_height*1.25)) @@ -302,15 +299,13 @@ class DescendChart(Report): self.box_pad_pts = self.box_pad_pts/self.scale self.box_gap = self.box_gap/self.scale - maxh = int((self.uh)/(self.box_height+self.box_gap)) +# maxh = int((self.uh)/(self.box_height+self.box_gap)) maxw = int(uw/calc_width) # build array of x indices self.generations_per_page = maxw - xstart = 0 - ystart = self.offset-self.box_height/2.0 self.delta = pt2cm(self.box_pad_pts) + self.box_width + self.box_gap if not self.force_fit: calc_width = self.box_width + pt2cm(self.box_pad_pts) diff --git a/src/plugins/FamilyLines.py b/src/plugins/FamilyLines.py index cc454ccbd..58917b58f 100644 --- a/src/plugins/FamilyLines.py +++ b/src/plugins/FamilyLines.py @@ -732,7 +732,7 @@ class FamilyLinesReport(Report): try: self.of = open(self.filename, "w") - except (OSError,IOError),value: + except (OSError,IOError): ErrorDialog(_("Could not create %s") % self.filename) return