* src/EditSource.py (button_press): Properly test event names.

svn: r4635
This commit is contained in:
Alex Roitman 2005-05-19 20:43:35 +00:00
parent 9ddf7edbd7
commit 0ea6138c33
2 changed files with 8 additions and 2 deletions

View File

@ -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 <Martin.Hawlisch@gmx.de>
* src/GenericFilter.py: Catch invalid input in some filters;

View File

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