diff --git a/ChangeLog b/ChangeLog index be9e40ce0..1e1648d8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2005-03-29 Alex Roitman + * src/Witness.py (WitnessEditor.__init__): Work around missing + reference. + 2005-03-29 Richard Taylor * src/plugins/ScratchPad.py (on_object_select_row): fixed the drop of text into TextView widgets. diff --git a/src/Witness.py b/src/Witness.py index 8640bb0dd..d8f2abc4f 100644 --- a/src/Witness.py +++ b/src/Witness.py @@ -1,7 +1,7 @@ # # Gramps - a GTK+/GNOME based genealogy program # -# Copyright (C) 2003-2004 Donald N. Allingham +# Copyright (C) 2003-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 @@ -20,6 +20,13 @@ # $Id$ +#------------------------------------------------------------------------- +# +# Python modules +# +#------------------------------------------------------------------------- +from gettext import gettext as _ + #------------------------------------------------------------------------- # # GTK/Gnome modules @@ -39,7 +46,6 @@ import Utils import RelLib import ListModel import NameDisplay -from gettext import gettext as _ #------------------------------------------------------------------------- # @@ -151,10 +157,14 @@ class WitnessEditor: if self.ref: if self.ref.get_type(): - self.in_db.set_active(1) self.idval = self.ref.get_value() - person = self.db.get_person_from_handle(self.idval) - self.name.set_text(person.get_primary_name().get_regular_name()) + if self.db.has_person_handle(self.idval): + person = self.db.get_person_from_handle(self.idval) + self.name.set_text(person.get_primary_name().get_regular_name()) + self.in_db.set_active(1) + else: + self.name.set_text(_("Unknown")) + self.in_db.set_active(0) else: self.name.set_text(self.ref.get_value()) self.in_db.set_active(0)