2006-05-21 Alex Roitman <shura@gramps-project.org>

* src/DisplayTabs/_PersonEventEmbedList.py
	(PersonEventEmbedList.default_type): properly process event list.
	* src/Editors/_EditEventRef.py (EditEventRef.get_custom_events):
	Use correct method.
	* src/Editors/_EditEvent.py (EditEvent.get_custom_events)
	(EditPersonEvent.get_custom_events): Use correct method.
	* src/GrampsDb/_GrampsDbBase.py: Remove obsolete methods.
	* src/GrampsDb/_GrampsInMemDB.py: Remove obsolete methods.



svn: r6735
This commit is contained in:
Alex Roitman 2006-05-21 18:17:52 +00:00
parent 5c7267e9c3
commit ba6a131489
6 changed files with 18 additions and 30 deletions

View File

@ -1,3 +1,13 @@
2006-05-21 Alex Roitman <shura@gramps-project.org>
* src/DisplayTabs/_PersonEventEmbedList.py
(PersonEventEmbedList.default_type): properly process event list.
* src/Editors/_EditEventRef.py (EditEventRef.get_custom_events):
Use correct method.
* src/Editors/_EditEvent.py (EditEvent.get_custom_events)
(EditPersonEvent.get_custom_events): Use correct method.
* src/GrampsDb/_GrampsDbBase.py: Remove obsolete methods.
* src/GrampsDb/_GrampsInMemDB.py: Remove obsolete methods.
2006-05-20 Don Allingham <don@gramps-project.org>
* src/Editors/_EditPlace.py: custom menus
* src/Editors/_EditLdsOrd.py: custom menus

View File

@ -64,8 +64,12 @@ class PersonEventEmbedList(EventEmbedList):
def default_type(self):
type_list = []
ref_list = [ ref for ref in self.return_info() if ref ]
# combine return info into a single flat sequence
ri = self.return_info()
ri = ri[0:2] + tuple(ri[2])
ref_list = [ ref for ref in ri if ref]
event = None
for event_ref in ref_list:
event = self.dbstate.db.get_event_from_handle(event_ref.ref)

View File

@ -82,7 +82,7 @@ class EditEvent(EditPrimary):
return RelLib.Event()
def get_custom_events(self):
return self.dbstate.db.get_person_event_type_list() + \
return self.dbstate.db.get_person_event_types() + \
self.dbstate.db.get_family_event_types()
def _local_init(self):
@ -238,7 +238,7 @@ class EditPersonEvent(EditEvent):
self.commit_event = self.db.commit_personal_event
def get_custom_events(self):
return self.dbstate.db.get_person_event_type_list()
return self.dbstate.db.get_person_event_types()
class EditFamilyEvent(EditEvent):

View File

@ -85,7 +85,7 @@ class EditEventRef(EditReference):
self.add_event = self.db.add_person_event
def get_custom_events(self):
return self.db.get_person_event_type_list()
return self.db.get_person_event_types()
def _connect_signals(self):
self.define_ok_button(self.top.get_widget('ok'),self.ok_clicked)

View File

@ -1564,13 +1564,6 @@ class GrampsDbBase(GrampsDBCallback):
"""
assert False, "Needs to be overridden in the derived class"
def get_person_event_type_list(self):
"""
Returns the list of personal event types contained within the
database. The function must be overridden in the derived class.
"""
return list(self.individual_event_names)
def get_bookmarks(self):
"""returns the list of Person handles in the bookmarks"""
return self.bookmarks

View File

@ -151,25 +151,6 @@ class GrampsInMemDB(GrampsDbBase):
vals.sort()
return vals
def get_person_event_type_list(self):
names = self.eventnames.keys()
a = {}
for name in names:
a[unicode(name)] = 1
vals = a.keys()
vals.sort()
return vals
def get_repository_type_list(self):
repos_types = self.repository_types.keys()
a = {}
for repos_type in repos_types:
a[unicode(repos_type)] = 1
vals = a.keys()
vals.sort()
return vals
def _del_person(self,handle):
person = self.get_person_from_handle(str(handle))
del self.id_trans[person.get_gramps_id()]