Remove unused private table variable
This commit is contained in:
@@ -72,108 +72,6 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
if person:
|
if person:
|
||||||
self.flist.update(person.get_family_handle_list())
|
self.flist.update(person.get_family_handle_list())
|
||||||
self.flist.update(person.get_parent_family_handle_list())
|
self.flist.update(person.get_parent_family_handle_list())
|
||||||
self.__tables = {
|
|
||||||
'Person':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_person_from_handle,
|
|
||||||
"gramps_id_func": self.get_person_from_gramps_id,
|
|
||||||
"class_func": Person,
|
|
||||||
"cursor_func": self.get_person_cursor,
|
|
||||||
"handles_func": self.get_person_handles,
|
|
||||||
"iter_func": self.iter_people,
|
|
||||||
"count_func": self.get_number_of_people,
|
|
||||||
},
|
|
||||||
'Family':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_family_from_handle,
|
|
||||||
"gramps_id_func": self.get_family_from_gramps_id,
|
|
||||||
"class_func": Family,
|
|
||||||
"cursor_func": self.get_family_cursor,
|
|
||||||
"handles_func": self.get_family_handles,
|
|
||||||
"iter_func": self.iter_families,
|
|
||||||
"count_func": self.get_number_of_families,
|
|
||||||
},
|
|
||||||
'Source':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_source_from_handle,
|
|
||||||
"gramps_id_func": self.get_source_from_gramps_id,
|
|
||||||
"class_func": Source,
|
|
||||||
"cursor_func": self.get_source_cursor,
|
|
||||||
"handles_func": self.get_source_handles,
|
|
||||||
"iter_func": self.iter_sources,
|
|
||||||
"count_func": self.get_number_of_sources,
|
|
||||||
},
|
|
||||||
'Citation':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_citation_from_handle,
|
|
||||||
"gramps_id_func": self.get_citation_from_gramps_id,
|
|
||||||
"class_func": Citation,
|
|
||||||
"cursor_func": self.get_citation_cursor,
|
|
||||||
"handles_func": self.get_citation_handles,
|
|
||||||
"iter_func": self.iter_citations,
|
|
||||||
"count_func": self.get_number_of_citations,
|
|
||||||
},
|
|
||||||
'Event':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_event_from_handle,
|
|
||||||
"gramps_id_func": self.get_event_from_gramps_id,
|
|
||||||
"class_func": Event,
|
|
||||||
"cursor_func": self.get_event_cursor,
|
|
||||||
"handles_func": self.get_event_handles,
|
|
||||||
"iter_func": self.iter_events,
|
|
||||||
"count_func": self.get_number_of_events,
|
|
||||||
},
|
|
||||||
'Media':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_media_from_handle,
|
|
||||||
"gramps_id_func": self.get_media_from_gramps_id,
|
|
||||||
"class_func": Media,
|
|
||||||
"cursor_func": self.get_media_cursor,
|
|
||||||
"handles_func": self.get_media_handles,
|
|
||||||
"iter_func": self.iter_media,
|
|
||||||
"count_func": self.get_number_of_media,
|
|
||||||
},
|
|
||||||
'Place':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_place_from_handle,
|
|
||||||
"gramps_id_func": self.get_place_from_gramps_id,
|
|
||||||
"class_func": Place,
|
|
||||||
"cursor_func": self.get_place_cursor,
|
|
||||||
"handles_func": self.get_place_handles,
|
|
||||||
"iter_func": self.iter_places,
|
|
||||||
"count_func": self.get_number_of_places,
|
|
||||||
},
|
|
||||||
'Repository':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_repository_from_handle,
|
|
||||||
"gramps_id_func": self.get_repository_from_gramps_id,
|
|
||||||
"class_func": Repository,
|
|
||||||
"cursor_func": self.get_repository_cursor,
|
|
||||||
"handles_func": self.get_repository_handles,
|
|
||||||
"iter_func": self.iter_repositories,
|
|
||||||
"count_func": self.get_number_of_repositories,
|
|
||||||
},
|
|
||||||
'Note':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_note_from_handle,
|
|
||||||
"gramps_id_func": self.get_note_from_gramps_id,
|
|
||||||
"class_func": Note,
|
|
||||||
"cursor_func": self.get_note_cursor,
|
|
||||||
"handles_func": self.get_note_handles,
|
|
||||||
"iter_func": self.iter_notes,
|
|
||||||
"count_func": self.get_number_of_notes,
|
|
||||||
},
|
|
||||||
'Tag':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_tag_from_handle,
|
|
||||||
"gramps_id_func": None,
|
|
||||||
"class_func": Tag,
|
|
||||||
"cursor_func": self.get_tag_cursor,
|
|
||||||
"handles_func": self.get_tag_handles,
|
|
||||||
"iter_func": self.iter_tags,
|
|
||||||
"count_func": self.get_number_of_tags,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def get_person_from_handle(self, handle):
|
def get_person_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
|
@@ -95,109 +95,6 @@ class LivingProxyDb(ProxyDbBase):
|
|||||||
self._p_f_n = self._(config.get('preferences.private-given-text'))
|
self._p_f_n = self._(config.get('preferences.private-given-text'))
|
||||||
self._p_s_n = self._(config.get('preferences.private-surname-text'))
|
self._p_s_n = self._(config.get('preferences.private-surname-text'))
|
||||||
|
|
||||||
self.__tables = {
|
|
||||||
'Person':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_person_from_handle,
|
|
||||||
"gramps_id_func": self.get_person_from_gramps_id,
|
|
||||||
"class_func": Person,
|
|
||||||
"cursor_func": self.get_person_cursor,
|
|
||||||
"handles_func": self.get_person_handles,
|
|
||||||
"iter_func": self.iter_people,
|
|
||||||
"count_func": self.get_number_of_people,
|
|
||||||
},
|
|
||||||
'Family':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_family_from_handle,
|
|
||||||
"gramps_id_func": self.get_family_from_gramps_id,
|
|
||||||
"class_func": Family,
|
|
||||||
"cursor_func": self.get_family_cursor,
|
|
||||||
"handles_func": self.get_family_handles,
|
|
||||||
"iter_func": self.iter_families,
|
|
||||||
"count_func": self.get_number_of_families,
|
|
||||||
},
|
|
||||||
'Source':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_source_from_handle,
|
|
||||||
"gramps_id_func": self.get_source_from_gramps_id,
|
|
||||||
"class_func": Source,
|
|
||||||
"cursor_func": self.get_source_cursor,
|
|
||||||
"handles_func": self.get_source_handles,
|
|
||||||
"iter_func": self.iter_sources,
|
|
||||||
"count_func": self.get_number_of_sources,
|
|
||||||
},
|
|
||||||
'Citation':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_citation_from_handle,
|
|
||||||
"gramps_id_func": self.get_citation_from_gramps_id,
|
|
||||||
"class_func": Citation,
|
|
||||||
"cursor_func": self.get_citation_cursor,
|
|
||||||
"handles_func": self.get_citation_handles,
|
|
||||||
"iter_func": self.iter_citations,
|
|
||||||
"count_func": self.get_number_of_citations,
|
|
||||||
},
|
|
||||||
'Event':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_event_from_handle,
|
|
||||||
"gramps_id_func": self.get_event_from_gramps_id,
|
|
||||||
"class_func": Event,
|
|
||||||
"cursor_func": self.get_event_cursor,
|
|
||||||
"handles_func": self.get_event_handles,
|
|
||||||
"iter_func": self.iter_events,
|
|
||||||
"count_func": self.get_number_of_events,
|
|
||||||
},
|
|
||||||
'Media':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_media_from_handle,
|
|
||||||
"gramps_id_func": self.get_media_from_gramps_id,
|
|
||||||
"class_func": Media,
|
|
||||||
"cursor_func": self.get_media_cursor,
|
|
||||||
"handles_func": self.get_media_handles,
|
|
||||||
"iter_func": self.iter_media,
|
|
||||||
"count_func": self.get_number_of_media,
|
|
||||||
},
|
|
||||||
'Place':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_place_from_handle,
|
|
||||||
"gramps_id_func": self.get_place_from_gramps_id,
|
|
||||||
"class_func": Place,
|
|
||||||
"cursor_func": self.get_place_cursor,
|
|
||||||
"handles_func": self.get_place_handles,
|
|
||||||
"iter_func": self.iter_places,
|
|
||||||
"count_func": self.get_number_of_places,
|
|
||||||
},
|
|
||||||
'Repository':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_repository_from_handle,
|
|
||||||
"gramps_id_func": self.get_repository_from_gramps_id,
|
|
||||||
"class_func": Repository,
|
|
||||||
"cursor_func": self.get_repository_cursor,
|
|
||||||
"handles_func": self.get_repository_handles,
|
|
||||||
"iter_func": self.iter_repositories,
|
|
||||||
"count_func": self.get_number_of_repositories,
|
|
||||||
},
|
|
||||||
'Note':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_note_from_handle,
|
|
||||||
"gramps_id_func": self.get_note_from_gramps_id,
|
|
||||||
"class_func": Note,
|
|
||||||
"cursor_func": self.get_note_cursor,
|
|
||||||
"handles_func": self.get_note_handles,
|
|
||||||
"iter_func": self.iter_notes,
|
|
||||||
"count_func": self.get_number_of_notes,
|
|
||||||
},
|
|
||||||
'Tag':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_tag_from_handle,
|
|
||||||
"gramps_id_func": None,
|
|
||||||
"class_func": Tag,
|
|
||||||
"cursor_func": self.get_tag_cursor,
|
|
||||||
"handles_func": self.get_tag_handles,
|
|
||||||
"iter_func": self.iter_tags,
|
|
||||||
"count_func": self.get_number_of_tags,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def get_person_from_handle(self, handle):
|
def get_person_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Person in the database from the passed Gramps ID.
|
Finds a Person in the database from the passed Gramps ID.
|
||||||
|
@@ -56,108 +56,6 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
Create a new PrivateProxyDb instance.
|
Create a new PrivateProxyDb instance.
|
||||||
"""
|
"""
|
||||||
ProxyDbBase.__init__(self, db)
|
ProxyDbBase.__init__(self, db)
|
||||||
self.__tables = {
|
|
||||||
'Person':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_person_from_handle,
|
|
||||||
"gramps_id_func": self.get_person_from_gramps_id,
|
|
||||||
"class_func": Person,
|
|
||||||
"cursor_func": self.get_person_cursor,
|
|
||||||
"handles_func": self.get_person_handles,
|
|
||||||
"iter_func": self.iter_people,
|
|
||||||
"count_func": self.get_number_of_people,
|
|
||||||
},
|
|
||||||
'Family':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_family_from_handle,
|
|
||||||
"gramps_id_func": self.get_family_from_gramps_id,
|
|
||||||
"class_func": Family,
|
|
||||||
"cursor_func": self.get_family_cursor,
|
|
||||||
"handles_func": self.get_family_handles,
|
|
||||||
"iter_func": self.iter_families,
|
|
||||||
"count_func": self.get_number_of_families,
|
|
||||||
},
|
|
||||||
'Source':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_source_from_handle,
|
|
||||||
"gramps_id_func": self.get_source_from_gramps_id,
|
|
||||||
"class_func": Source,
|
|
||||||
"cursor_func": self.get_source_cursor,
|
|
||||||
"handles_func": self.get_source_handles,
|
|
||||||
"iter_func": self.iter_sources,
|
|
||||||
"count_func": self.get_number_of_sources,
|
|
||||||
},
|
|
||||||
'Citation':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_citation_from_handle,
|
|
||||||
"gramps_id_func": self.get_citation_from_gramps_id,
|
|
||||||
"class_func": Citation,
|
|
||||||
"cursor_func": self.get_citation_cursor,
|
|
||||||
"handles_func": self.get_citation_handles,
|
|
||||||
"iter_func": self.iter_citations,
|
|
||||||
"count_func": self.get_number_of_citations,
|
|
||||||
},
|
|
||||||
'Event':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_event_from_handle,
|
|
||||||
"gramps_id_func": self.get_event_from_gramps_id,
|
|
||||||
"class_func": Event,
|
|
||||||
"cursor_func": self.get_event_cursor,
|
|
||||||
"handles_func": self.get_event_handles,
|
|
||||||
"iter_func": self.iter_events,
|
|
||||||
"count_func": self.get_number_of_events,
|
|
||||||
},
|
|
||||||
'Media':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_media_from_handle,
|
|
||||||
"gramps_id_func": self.get_media_from_gramps_id,
|
|
||||||
"class_func": Media,
|
|
||||||
"cursor_func": self.get_media_cursor,
|
|
||||||
"handles_func": self.get_media_handles,
|
|
||||||
"iter_func": self.iter_media,
|
|
||||||
"count_func": self.get_number_of_media,
|
|
||||||
},
|
|
||||||
'Place':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_place_from_handle,
|
|
||||||
"gramps_id_func": self.get_place_from_gramps_id,
|
|
||||||
"class_func": Place,
|
|
||||||
"cursor_func": self.get_place_cursor,
|
|
||||||
"handles_func": self.get_place_handles,
|
|
||||||
"iter_func": self.iter_places,
|
|
||||||
"count_func": self.get_number_of_places,
|
|
||||||
},
|
|
||||||
'Repository':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_repository_from_handle,
|
|
||||||
"gramps_id_func": self.get_repository_from_gramps_id,
|
|
||||||
"class_func": Repository,
|
|
||||||
"cursor_func": self.get_repository_cursor,
|
|
||||||
"handles_func": self.get_repository_handles,
|
|
||||||
"iter_func": self.iter_repositories,
|
|
||||||
"count_func": self.get_number_of_repositories,
|
|
||||||
},
|
|
||||||
'Note':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_note_from_handle,
|
|
||||||
"gramps_id_func": self.get_note_from_gramps_id,
|
|
||||||
"class_func": Note,
|
|
||||||
"cursor_func": self.get_note_cursor,
|
|
||||||
"handles_func": self.get_note_handles,
|
|
||||||
"iter_func": self.iter_notes,
|
|
||||||
"count_func": self.get_number_of_notes,
|
|
||||||
},
|
|
||||||
'Tag':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_tag_from_handle,
|
|
||||||
"gramps_id_func": None,
|
|
||||||
"class_func": Tag,
|
|
||||||
"cursor_func": self.get_tag_cursor,
|
|
||||||
"handles_func": self.get_tag_handles,
|
|
||||||
"iter_func": self.iter_tags,
|
|
||||||
"count_func": self.get_number_of_tags,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def get_person_from_handle(self, handle):
|
def get_person_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
|
@@ -85,109 +85,6 @@ class ReferencedBySelectionProxyDb(ProxyDbBase):
|
|||||||
obj_type, handle, reference = self.queue.pop()
|
obj_type, handle, reference = self.queue.pop()
|
||||||
self.process_object(obj_type, handle, reference)
|
self.process_object(obj_type, handle, reference)
|
||||||
|
|
||||||
self.__tables = {
|
|
||||||
'Person':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_person_from_handle,
|
|
||||||
"gramps_id_func": self.get_person_from_gramps_id,
|
|
||||||
"class_func": Person,
|
|
||||||
"cursor_func": self.get_person_cursor,
|
|
||||||
"handles_func": self.get_person_handles,
|
|
||||||
"iter_func": self.iter_people,
|
|
||||||
"count_func": self.get_number_of_people,
|
|
||||||
},
|
|
||||||
'Family':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_family_from_handle,
|
|
||||||
"gramps_id_func": self.get_family_from_gramps_id,
|
|
||||||
"class_func": Family,
|
|
||||||
"cursor_func": self.get_family_cursor,
|
|
||||||
"handles_func": self.get_family_handles,
|
|
||||||
"iter_func": self.iter_families,
|
|
||||||
"count_func": self.get_number_of_families,
|
|
||||||
},
|
|
||||||
'Source':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_source_from_handle,
|
|
||||||
"gramps_id_func": self.get_source_from_gramps_id,
|
|
||||||
"class_func": Source,
|
|
||||||
"cursor_func": self.get_source_cursor,
|
|
||||||
"handles_func": self.get_source_handles,
|
|
||||||
"iter_func": self.iter_sources,
|
|
||||||
"count_func": self.get_number_of_sources,
|
|
||||||
},
|
|
||||||
'Citation':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_citation_from_handle,
|
|
||||||
"gramps_id_func": self.get_citation_from_gramps_id,
|
|
||||||
"class_func": Citation,
|
|
||||||
"cursor_func": self.get_citation_cursor,
|
|
||||||
"handles_func": self.get_citation_handles,
|
|
||||||
"iter_func": self.iter_citations,
|
|
||||||
"count_func": self.get_number_of_citations,
|
|
||||||
},
|
|
||||||
'Event':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_event_from_handle,
|
|
||||||
"gramps_id_func": self.get_event_from_gramps_id,
|
|
||||||
"class_func": Event,
|
|
||||||
"cursor_func": self.get_event_cursor,
|
|
||||||
"handles_func": self.get_event_handles,
|
|
||||||
"iter_func": self.iter_events,
|
|
||||||
"count_func": self.get_number_of_events,
|
|
||||||
},
|
|
||||||
'Media':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_media_from_handle,
|
|
||||||
"gramps_id_func": self.get_media_from_gramps_id,
|
|
||||||
"class_func": Media,
|
|
||||||
"cursor_func": self.get_media_cursor,
|
|
||||||
"handles_func": self.get_media_handles,
|
|
||||||
"iter_func": self.iter_media,
|
|
||||||
"count_func": self.get_number_of_media,
|
|
||||||
},
|
|
||||||
'Place':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_place_from_handle,
|
|
||||||
"gramps_id_func": self.get_place_from_gramps_id,
|
|
||||||
"class_func": Place,
|
|
||||||
"cursor_func": self.get_place_cursor,
|
|
||||||
"handles_func": self.get_place_handles,
|
|
||||||
"iter_func": self.iter_places,
|
|
||||||
"count_func": self.get_number_of_places,
|
|
||||||
},
|
|
||||||
'Repository':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_repository_from_handle,
|
|
||||||
"gramps_id_func": self.get_repository_from_gramps_id,
|
|
||||||
"class_func": Repository,
|
|
||||||
"cursor_func": self.get_repository_cursor,
|
|
||||||
"handles_func": self.get_repository_handles,
|
|
||||||
"iter_func": self.iter_repositories,
|
|
||||||
"count_func": self.get_number_of_repositories,
|
|
||||||
},
|
|
||||||
'Note':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_note_from_handle,
|
|
||||||
"gramps_id_func": self.get_note_from_gramps_id,
|
|
||||||
"class_func": Note,
|
|
||||||
"cursor_func": self.get_note_cursor,
|
|
||||||
"handles_func": self.get_note_handles,
|
|
||||||
"iter_func": self.iter_notes,
|
|
||||||
"count_func": self.get_number_of_notes,
|
|
||||||
},
|
|
||||||
'Tag':
|
|
||||||
{
|
|
||||||
"handle_func": self.get_tag_from_handle,
|
|
||||||
"gramps_id_func": None,
|
|
||||||
"class_func": Tag,
|
|
||||||
"cursor_func": self.get_tag_cursor,
|
|
||||||
"handles_func": self.get_tag_handles,
|
|
||||||
"iter_func": self.iter_tags,
|
|
||||||
"count_func": self.get_number_of_tags,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def queue_object(self, obj_type, handle, reference=True):
|
def queue_object(self, obj_type, handle, reference=True):
|
||||||
self.queue.append((obj_type, handle, reference))
|
self.queue.append((obj_type, handle, reference))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user