* src/DateEdit.py (update_after_editor): Add method.

* src/EditPerson.py: Always have birth/death events (never None);
Use new update method for dates; Only commit death/birth if changed;
Only add new birth/death if non-empty.
* src/EventEdit.py: Translate stored event names before including in
menu; Exclude birth/death from menu; Do not add birth/death to the
custom event types; Only detect type change for non-birth/death.
* src/GrampsDbBase.py: Do not commit objects with empty handles.
* src/GrampsInMemDB.py: Do not commit objects with empty handles.
* src/Utils.py (family_name): Add clause for unknown parents.


svn: r4172
This commit is contained in:
Alex Roitman
2005-03-13 22:10:40 +00:00
parent a40629dbbc
commit 35bc979e8e
7 changed files with 80 additions and 58 deletions

View File

@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2004 Donald N. Allingham
# Copyright (C) 2002-2005 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
@ -156,8 +156,14 @@ class DateEdit:
"""
date_dialog = DateEditorDialog(self.date_obj,self.parent_window)
the_date = date_dialog.return_date
if the_date:
self.date_obj.copy(the_date)
self.update_after_editor(the_date)
def update_after_editor(self,date_obj):
"""
Update text field and LED button to reflect the given date instance.
"""
if date_obj:
self.date_obj.copy(date_obj)
self.text_obj.set_text(DateHandler.displayer.display(self.date_obj))
self.check()