* doc/gramps-manual/C/getstart.xml: fixed spelling
* doc/gramps-manual/C/mainwin.xml: fixed spelling * src/Errors.py: Add a DatabaseError type * src/Utils.py: detect database loops in descendants_too_old * src/WriteGedcom.py: report error message when database loop is detected * src/po/template.po: added new error message. May be too late for some translations to get this message. svn: r5149
This commit is contained in:
@ -1,4 +1,11 @@
|
|||||||
2005-08-30 Don Allingham <don@gramps-project.org>
|
2005-08-30 Don Allingham <don@gramps-project.org>
|
||||||
|
* doc/gramps-manual/C/getstart.xml: fixed spelling
|
||||||
|
* doc/gramps-manual/C/mainwin.xml: fixed spelling
|
||||||
|
* src/Errors.py: Add a DatabaseError type
|
||||||
|
* src/Utils.py: detect database loops in descendants_too_old
|
||||||
|
* src/WriteGedcom.py: report error message when database loop is detected
|
||||||
|
* src/po/template.po: added new error message. May be too late for some
|
||||||
|
translations to get this message.
|
||||||
* src/ImageSelect.py: specify mime type to get_thumbnail_image
|
* src/ImageSelect.py: specify mime type to get_thumbnail_image
|
||||||
* src/ImgManip.py: make thumbnailing routine more generic
|
* src/ImgManip.py: make thumbnailing routine more generic
|
||||||
* src/SelectObject.py: specify mime type to get_thumbnail_image
|
* src/SelectObject.py: specify mime type to get_thumbnail_image
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<title>Getting Started</title>
|
<title>Getting Started</title>
|
||||||
|
|
||||||
<para>This chapter provides the most basic information on starting &app;
|
<para>This chapter provides the most basic information on starting &app;
|
||||||
and obtaining help. Please procede to the following chapters for more
|
and obtaining help. Please proceed to the following chapters for more
|
||||||
information.</para>
|
information.</para>
|
||||||
|
|
||||||
<!-- ================ Getting Started Subsection ====== -->
|
<!-- ================ Getting Started Subsection ====== -->
|
||||||
|
@ -428,7 +428,7 @@
|
|||||||
context menu. Among other useful items, the context menu has submenus
|
context menu. Among other useful items, the context menu has submenus
|
||||||
listing <guilabel>Spouses</guilabel>, <guilabel>Siblings</guilabel>,
|
listing <guilabel>Spouses</guilabel>, <guilabel>Siblings</guilabel>,
|
||||||
<guilabel>Children</guilabel>, and <guilabel>Parents</guilabel>
|
<guilabel>Children</guilabel>, and <guilabel>Parents</guilabel>
|
||||||
of that person. Insensitive (greyed out) submenus indicate the absence
|
of that person. Insensitive (grayed out) submenus indicate the absence
|
||||||
of the data in the appropriate category. Similarly to the children menu above,
|
of the data in the appropriate category. Similarly to the children menu above,
|
||||||
children's and parents' menus distinguish continuing lines from dead ends.
|
children's and parents' menus distinguish continuing lines from dead ends.
|
||||||
</para>
|
</para>
|
||||||
|
@ -42,6 +42,15 @@ class DateError(Exception):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.value
|
return self.value
|
||||||
|
|
||||||
|
class DatabaseError(Exception):
|
||||||
|
"""Error used to report Date errors"""
|
||||||
|
def __init__(self,value=""):
|
||||||
|
Exception.__init__(self)
|
||||||
|
self.value = value
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return self.value
|
||||||
|
|
||||||
class ReportError(Exception):
|
class ReportError(Exception):
|
||||||
"""Error used to report Report errors"""
|
"""Error used to report Report errors"""
|
||||||
def __init__(self,value,value2=""):
|
def __init__(self,value,value2=""):
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import os
|
import os
|
||||||
import locale
|
import locale
|
||||||
|
import sets
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -514,7 +515,17 @@ def probably_alive(person,db,current_year=None,limit=0):
|
|||||||
max_generation = 60
|
max_generation = 60
|
||||||
max_age_difference = 60
|
max_age_difference = 60
|
||||||
|
|
||||||
def descendants_too_old (person, years):
|
def descendants_too_old (person, years, current=None):
|
||||||
|
if current == None:
|
||||||
|
current = sets.Set()
|
||||||
|
|
||||||
|
if person.handle not in current:
|
||||||
|
current.add(person.handle)
|
||||||
|
else:
|
||||||
|
import Errors
|
||||||
|
raise Errors.DatabaseError(_("Database error: %s is defined as his or her own ancestor") %
|
||||||
|
NameDisplay.displayer.display(person))
|
||||||
|
|
||||||
for family_handle in person.get_family_handle_list():
|
for family_handle in person.get_family_handle_list():
|
||||||
family = db.get_family_from_handle(family_handle)
|
family = db.get_family_from_handle(family_handle)
|
||||||
family_list = family.get_child_handle_list()
|
family_list = family.get_child_handle_list()
|
||||||
@ -539,7 +550,7 @@ def probably_alive(person,db,current_year=None,limit=0):
|
|||||||
if not not_too_old (dobj,current_year):
|
if not not_too_old (dobj,current_year):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if descendants_too_old (child, years + min_generation):
|
if descendants_too_old (child, years + min_generation,current):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
@ -1269,6 +1269,8 @@ def exportData(database,filename,person,option_box):
|
|||||||
try:
|
try:
|
||||||
gw = GedcomWriter(database,person,0,filename,option_box)
|
gw = GedcomWriter(database,person,0,filename,option_box)
|
||||||
ret = gw.export_data(filename)
|
ret = gw.export_data(filename)
|
||||||
|
except Errors.DatabaseError,msg:
|
||||||
|
ErrorDialog(_("Export failed"),str(msg))
|
||||||
except:
|
except:
|
||||||
import DisplayTrace
|
import DisplayTrace
|
||||||
DisplayTrace.DisplayTrace()
|
DisplayTrace.DisplayTrace()
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user