* src/Witness.py (WitnessEditor.__init__): Work around missing

reference.


svn: r4251
This commit is contained in:
Alex Roitman 2005-03-29 16:05:50 +00:00
parent cc8eb16bfc
commit f3041afc72
2 changed files with 19 additions and 5 deletions

View File

@ -1,3 +1,7 @@
2005-03-29 Alex Roitman <shura@gramps-project.org>
* src/Witness.py (WitnessEditor.__init__): Work around missing
reference.
2005-03-29 Richard Taylor <rjt-gramps@thegrindstone.me.uk>
* src/plugins/ScratchPad.py (on_object_select_row): fixed the drop of
text into TextView widgets.

View File

@ -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()
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)