From 0ea6138c33ad61c9c5bae59d3ba948f0c1b82525 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Thu, 19 May 2005 20:43:35 +0000 Subject: [PATCH] * src/EditSource.py (button_press): Properly test event names. svn: r4635 --- gramps2/ChangeLog | 1 + gramps2/src/EditSource.py | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 30fb8ca74..b3775984f 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -11,6 +11,7 @@ * src/mergedata.glade: Make information panes non-editable. * src/gramps.glade: Enclose date and place groups into tables, to allow proper widget order when using tab key. + * src/EditSource.py (button_press): Properly test event names. 2005-05-19 Martin Hawlisch * src/GenericFilter.py: Catch invalid input in some filters; diff --git a/gramps2/src/EditSource.py b/gramps2/src/EditSource.py index 8792bc1d4..bd2bac0e9 100644 --- a/gramps2/src/EditSource.py +++ b/gramps2/src/EditSource.py @@ -267,14 +267,19 @@ class EditSource: elif type == 2: import EventEdit event = self.db.get_event_from_handle(handle) - if event.get_name() in const.marriageEvents: + event_name = event.get_name() + if const.family_events.has_key(event_name): EventEdit.EventEditor( self,", ", const.marriageEvents, const.family_events, event, None, 0, None, None, self.db.readonly) - elif event.get_name() in const.personalEvents + [_("Birth"),_("Death")]: + elif const.personal_events.has_key(event_name): EventEdit.EventEditor( self,", ", const.personalEvents, const.personal_events, event, None, 0, None, None, self.db.readonly) + elif event_name in ["Birth","Death"]: + EventEdit.EventEditor( + self,", ", const.personalEvents, const.personal_events, + event, None, 1, None, None, self.db.readonly) elif type == 3: import EditPlace place = self.db.get_place_from_handle(handle)