* src/PedView.py: Import RelLib for accessing relationship constants.

* src/NameEdit.py: Use empty Date for newly created name.


svn: r4143
This commit is contained in:
Alex Roitman 2005-03-09 16:06:22 +00:00
parent a6cf17065a
commit 4646ad519f
3 changed files with 26 additions and 7 deletions

View File

@ -1,3 +1,7 @@
2005-03-09 Alex Roitman <shura@alex.neuro.umn.edu>
* src/PedView.py: Import RelLib for accessing relationship constants.
* src/NameEdit.py: Use empty Date for newly created name.
2005-03-08 Don Allingham <don@gramps-project.org>
* src/ChooseParents.py: change _nsort to _model
* src/GrampsBSDDB.py: fix event secondary index function to that

View File

@ -46,6 +46,7 @@ import AutoComp
import Sources
import RelLib
import NameDisplay
import Date
import DateEdit
import DateHandler
@ -84,7 +85,14 @@ class NameEditor:
self.patronymic_field = self.top.get_widget("patronymic")
self.combo = self.top.get_widget("alt_surname_list")
self.date = self.top.get_widget('date')
self.date_obj = self.name.get_date_object()
if self.name:
self.srcreflist = self.name.get_source_references()
self.date_obj = self.name.get_date_object()
else:
self.srcreflist = []
self.date_obj = Date.Date()
self.date.set_text(DateHandler.displayer.display(self.date_obj))
self.date_check = DateEdit.DateEdit(
@ -110,11 +118,6 @@ class NameEditor:
AutoComp.fill_combo(self.type_combo,types)
self.type_field = self.type_combo.get_child()
if self.name:
self.srcreflist = self.name.get_source_references()
else:
self.srcreflist = []
full_name = NameDisplay.displayer.display_name(name)
alt_title = self.top.get_widget("title")

View File

@ -20,6 +20,13 @@
# $Id$
#-------------------------------------------------------------------------
#
# Python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _
#-------------------------------------------------------------------------
#
# GTK/Gnome modules
@ -40,10 +47,15 @@ except:
#
#-------------------------------------------------------------------------
import GrampsCfg
from gettext import gettext as _
import Relationship
import NameDisplay
import RelLib
#-------------------------------------------------------------------------
#
# Constants
#
#-------------------------------------------------------------------------
_PAD = 3
_CANVASPAD = 3
_PERSON = "p"