2008-01-10 Raphael Ackermann <raphael.ackermann@gmail.com>
* 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 svn: r9779
This commit is contained in:
parent
d28b01f4b0
commit
1abb8df85f
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2008-01-10 Raphael Ackermann <raphael.ackermann@gmail.com>
|
||||||
|
* 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 <raphael.ackermann@gmail.com>
|
2008-01-10 Raphael Ackermann <raphael.ackermann@gmail.com>
|
||||||
* src/MarkupText.py: in _hex_to_color removed dupe assignment to color
|
* src/MarkupText.py: in _hex_to_color removed dupe assignment to color
|
||||||
* src/PageView.py: doc typo and delete unused statements in filter_toggle
|
* src/PageView.py: doc typo and delete unused statements in filter_toggle
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# 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
|
||||||
@ -21,7 +21,9 @@
|
|||||||
# $Id$
|
# $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):
|
def gramps_upgrade(self, callback=None):
|
||||||
UpdateCallback.__init__(self, callback)
|
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()
|
t = time.time()
|
||||||
|
@ -2556,7 +2556,7 @@ def old_calc_age(database, person):
|
|||||||
and birth.get_day_valid() and death.get_day_valid() \
|
and birth.get_day_valid() and death.get_day_valid() \
|
||||||
and birth.get_day() > death.get_day():
|
and birth.get_day() > death.get_day():
|
||||||
age = death.get_day() + 31 - birth.get_day()
|
age = death.get_day() + 31 - birth.get_day()
|
||||||
unit = DAYS
|
units = DAYS
|
||||||
|
|
||||||
return (age, units)
|
return (age, units)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# 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
|
# 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
|
||||||
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
Provides the Berkeley DB (DBDir) database backend for GRAMPS
|
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):
|
def gramps_upgrade(self,callback=None):
|
||||||
UpdateCallback.__init__(self,callback)
|
UpdateCallback.__init__(self,callback)
|
||||||
|
|
||||||
child_rel_notrans = [
|
# version = self.metadata.get('version',default=_MINVERSION)
|
||||||
"None", "Birth", "Adopted", "Stepchild",
|
|
||||||
"Sponsored", "Foster", "Unknown", "Other", ]
|
|
||||||
|
|
||||||
version = self.metadata.get('version',default=_MINVERSION)
|
|
||||||
|
|
||||||
t = time.time()
|
t = time.time()
|
||||||
# if version < 13:
|
# if version < 13:
|
||||||
|
@ -249,9 +249,6 @@ class AncestorChart(Report):
|
|||||||
|
|
||||||
def write_report(self):
|
def write_report(self):
|
||||||
|
|
||||||
generation = 1
|
|
||||||
done = 0
|
|
||||||
page = 1
|
|
||||||
(maxy,maxx) = self.genchart.dimensions()
|
(maxy,maxx) = self.genchart.dimensions()
|
||||||
maxh = int(self.uh/self.box_height)
|
maxh = int(self.uh/self.box_height)
|
||||||
|
|
||||||
@ -330,12 +327,9 @@ class AncestorChart(Report):
|
|||||||
self.generations_per_page = int(log2(maxh))
|
self.generations_per_page = int(log2(maxh))
|
||||||
else:
|
else:
|
||||||
self.generations_per_page = maxw
|
self.generations_per_page = maxw
|
||||||
acty = 2**self.generations_per_page
|
|
||||||
|
|
||||||
# build array of x indices
|
# 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
|
self.delta = pt2cm(self.box_pad_pts) + self.box_width + 0.2
|
||||||
if not self.force_fit:
|
if not self.force_fit:
|
||||||
calc_width = self.box_width + 0.2 + pt2cm(self.box_pad_pts)
|
calc_width = self.box_width + 0.2 + pt2cm(self.box_pad_pts)
|
||||||
|
@ -726,7 +726,7 @@ class Xml2Obj:
|
|||||||
return
|
return
|
||||||
|
|
||||||
def Parse(self,filename):
|
def Parse(self,filename):
|
||||||
'Creat a SAX parser and parse filename '
|
'Create a SAX parser and parse filename '
|
||||||
Parser = expat.ParserCreate()
|
Parser = expat.ParserCreate()
|
||||||
# SAX event handlers
|
# SAX event handlers
|
||||||
Parser.StartElementHandler = self.StartElement
|
Parser.StartElementHandler = self.StartElement
|
||||||
|
@ -154,7 +154,6 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
|||||||
for node in self.iter_list
|
for node in self.iter_list
|
||||||
if self.model.get_value(node,0)]
|
if self.model.get_value(node,0)]
|
||||||
|
|
||||||
anychange = False
|
|
||||||
for handle in self.db.get_person_handles():
|
for handle in self.db.get_person_handles():
|
||||||
change = False
|
change = False
|
||||||
person = self.db.get_person_from_handle(handle)
|
person = self.db.get_person_from_handle(handle)
|
||||||
@ -162,7 +161,6 @@ class ChangeNames(Tool.BatchTool, ManagedWindow.ManagedWindow):
|
|||||||
sname = name.get_surname()
|
sname = name.get_surname()
|
||||||
if sname in changelist:
|
if sname in changelist:
|
||||||
change = True
|
change = True
|
||||||
anychange = True
|
|
||||||
name.set_surname(sname.capitalize())
|
name.set_surname(sname.capitalize())
|
||||||
if change:
|
if change:
|
||||||
self.db.commit_person(person,self.trans)
|
self.db.commit_person(person,self.trans)
|
||||||
|
@ -226,9 +226,6 @@ class DescendChart(Report):
|
|||||||
|
|
||||||
def write_report(self):
|
def write_report(self):
|
||||||
|
|
||||||
generation = 1
|
|
||||||
done = 0
|
|
||||||
page = 1
|
|
||||||
(maxy,maxx) = self.genchart.dimensions()
|
(maxy,maxx) = self.genchart.dimensions()
|
||||||
maxx = (maxx-1)*2
|
maxx = (maxx-1)*2
|
||||||
maxh = int((self.uh-0.75)/(self.box_height*1.25))
|
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_pad_pts = self.box_pad_pts/self.scale
|
||||||
self.box_gap = self.box_gap/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)
|
maxw = int(uw/calc_width)
|
||||||
|
|
||||||
# build array of x indices
|
# build array of x indices
|
||||||
|
|
||||||
self.generations_per_page = maxw
|
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
|
self.delta = pt2cm(self.box_pad_pts) + self.box_width + self.box_gap
|
||||||
if not self.force_fit:
|
if not self.force_fit:
|
||||||
calc_width = self.box_width + pt2cm(self.box_pad_pts)
|
calc_width = self.box_width + pt2cm(self.box_pad_pts)
|
||||||
|
@ -732,7 +732,7 @@ class FamilyLinesReport(Report):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
self.of = open(self.filename, "w")
|
self.of = open(self.filename, "w")
|
||||||
except (OSError,IOError),value:
|
except (OSError,IOError):
|
||||||
ErrorDialog(_("Could not create %s") % self.filename)
|
ErrorDialog(_("Could not create %s") % self.filename)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user