2006-09-12 Don Allingham <don@gramps-project.org>

* src/DataViews/_RelationView.py: provide a waring if a broken
	family is detected
	* src/plugins/Check.py: Don't remove families with no parents 
	unless no children exist



svn: r7321
This commit is contained in:
Don Allingham
2006-09-13 02:57:45 +00:00
parent 86ba2f1338
commit 43fc029947
3 changed files with 26 additions and 24 deletions

View File

@@ -723,20 +723,30 @@ class RelationshipView(PageView.PersonNavView):
if dobj:
if pname:
self.write_data(vbox, _('%(event_type)s: %(date)s in %(place)s') %
value, start_col, stop_col)
self.write_data(
vbox, _('%(event_type)s: %(date)s in %(place)s') %
value, start_col, stop_col)
else:
self.write_data(vbox, _('%(event_type)s: %(date)s') % value,
start_col, stop_col)
self.write_data(
vbox, _('%(event_type)s: %(date)s') % value,
start_col, stop_col)
elif pname:
self.write_data(vbox, _('%(event_type)s: %(place)s') % value,
start_col, stop_col)
self.write_data(
vbox, _('%(event_type)s: %(place)s') % value,
start_col, stop_col)
else:
self.write_data(vbox, _('%(event_type)s:') % value,
start_col, stop_col)
self.write_data(
vbox, _('%(event_type)s:') % value, start_col, stop_col)
def write_family(self, family_handle):
family = self.dbstate.db.get_family_from_handle(family_handle)
if family == None:
from QuestionDialog import WarningDialog
WarningDialog(
_('Broken family detected'),
_('Please run the Check and Repair Database tool'))
return
father_handle = family.get_father_handle()
mother_handle = family.get_mother_handle()
if self.dbstate.active.handle == father_handle: