Move src/Selectors to src/gui/selectors. Rename files to lower case in conformance with the Gramps coding style.

svn: r13806
This commit is contained in:
Brian Matherly 2009-12-15 03:45:09 +00:00
parent 224c8c1ffc
commit baa13df670
27 changed files with 87 additions and 97 deletions

@ -192,6 +192,20 @@ src/gui/pluginmanager.py
src/gui/utils.py src/gui/utils.py
src/gui/viewmanager.py src/gui/viewmanager.py
# guie/selectors - the GUI selectors package
src/gui/selectors/baseselector.py
src/gui/selectors/selectevent.py
src/gui/selectors/selectfamily.py
src/gui/selectors/selectnote.py
src/gui/selectors/selectobject.py
src/gui/selectors/selectperson.py
src/gui/selectors/selectplace.py
src/gui/selectors/selectrepository.py
src/gui/selectors/selectsource.py
src/gui/selectors/selectorexceptions.py
src/gui/selectors/selectorfactory.py
src/gui/selectors/__init__.py
# gui/views - the GUI views package # gui/views - the GUI views package
src/gui/views/__init__.py src/gui/views/__init__.py
src/gui/views/listview.py src/gui/views/listview.py
@ -354,20 +368,6 @@ src/Mime/_GnomeMime.py
src/Mime/__init__.py src/Mime/__init__.py
src/Mime/_PythonMime.py src/Mime/_PythonMime.py
# Selectors package
src/Selectors/_BaseSelector.py
src/Selectors/_SelectEvent.py
src/Selectors/_SelectFamily.py
src/Selectors/_SelectNote.py
src/Selectors/_SelectObject.py
src/Selectors/_SelectPerson.py
src/Selectors/_SelectPlace.py
src/Selectors/_SelectRepository.py
src/Selectors/_SelectSource.py
src/Selectors/_SelectorExceptions.py
src/Selectors/_SelectorFactory.py
src/Selectors/__init__.py
# plugins directory # plugins directory
src/plugins/BookReport.py src/plugins/BookReport.py
src/plugins/bookreport.gpr.py src/plugins/bookreport.gpr.py

@ -40,6 +40,7 @@ from DdTargets import DdTargets
from _GroupEmbeddedList import GroupEmbeddedList from _GroupEmbeddedList import GroupEmbeddedList
from _EventRefModel import EventRefModel from _EventRefModel import EventRefModel
from gui.dbguielement import DbGUIElement from gui.dbguielement import DbGUIElement
from gui.selectors import SelectorFactory
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -215,8 +216,7 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList):
"reference, you need to close the event.") "reference, you need to close the event.")
def share_button_clicked(self, obj): def share_button_clicked(self, obj):
from Selectors import selector_factory SelectEvent = SelectorFactory('Event')
SelectEvent = selector_factory('Event')
sel = SelectEvent(self.dbstate, self.uistate, self.track) sel = SelectEvent(self.dbstate, self.uistate, self.track)
event = sel.run() event = sel.run()

@ -47,6 +47,7 @@ import gobject
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gui.utils import open_file_with_default_application from gui.utils import open_file_with_default_application
from gui.dbguielement import DbGUIElement from gui.dbguielement import DbGUIElement
from gui.selectors import SelectorFactory
import gen.lib import gen.lib
import Utils import Utils
import ThumbNails import ThumbNails
@ -287,8 +288,7 @@ class GalleryTab(ButtonTab, DbGUIElement):
This function should be overridden by the derived class. This function should be overridden by the derived class.
""" """
from Selectors import selector_factory SelectObject = SelectorFactory('MediaObject')
SelectObject = selector_factory('MediaObject')
sel = SelectObject(self.dbstate, self.uistate, self.track) sel = SelectObject(self.dbstate, self.uistate, self.track)
src = sel.run() src = sel.run()

@ -41,6 +41,7 @@ from gettext import gettext as _
import Errors import Errors
import gen.lib import gen.lib
from gui.dbguielement import DbGUIElement from gui.dbguielement import DbGUIElement
from gui.selectors import SelectorFactory
from _NoteModel import NoteModel from _NoteModel import NoteModel
from _EmbeddedList import EmbeddedList from _EmbeddedList import EmbeddedList
from DdTargets import DdTargets from DdTargets import DdTargets
@ -166,8 +167,7 @@ class NoteTab(EmbeddedList, DbGUIElement):
pass pass
def share_button_clicked(self, obj): def share_button_clicked(self, obj):
from Selectors import selector_factory SelectNote = SelectorFactory('Note')
SelectNote = selector_factory('Note')
sel = SelectNote(self.dbstate,self.uistate,self.track) sel = SelectNote(self.dbstate,self.uistate,self.track)
note = sel.run() note = sel.run()

@ -34,6 +34,7 @@ from gettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gen.lib import gen.lib
from gui.dbguielement import DbGUIElement from gui.dbguielement import DbGUIElement
from gui.selectors import SelectorFactory
import Errors import Errors
from DdTargets import DdTargets from DdTargets import DdTargets
from _RepoRefModel import RepoRefModel from _RepoRefModel import RepoRefModel
@ -122,8 +123,7 @@ class RepoEmbedList(EmbeddedList, DbGUIElement):
pass pass
def share_button_clicked(self, obj): def share_button_clicked(self, obj):
from Selectors import selector_factory SelectRepository = SelectorFactory('Repository')
SelectRepository = selector_factory('Repository')
sel = SelectRepository( sel = SelectRepository(
self.dbstate, self.dbstate,

@ -34,6 +34,7 @@ from gettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gen.lib import gen.lib
from gui.dbguielement import DbGUIElement from gui.dbguielement import DbGUIElement
from gui.selectors import SelectorFactory
import Errors import Errors
from DdTargets import DdTargets from DdTargets import DdTargets
from _SourceRefModel import SourceRefModel from _SourceRefModel import SourceRefModel
@ -114,8 +115,7 @@ class SourceEmbedList(EmbeddedList, DbGUIElement):
pass pass
def share_button_clicked(self, obj): def share_button_clicked(self, obj):
from Selectors import selector_factory SelectSource = SelectorFactory('Source')
SelectSource = selector_factory('Source')
sel = SelectSource(self.dbstate,self.uistate,self.track) sel = SelectSource(self.dbstate,self.uistate,self.track)
src = sel.run() src = sel.run()

@ -48,11 +48,15 @@ from gen.lib import (Place, MediaObject, Note)
from Editors._EditPlace import EditPlace from Editors._EditPlace import EditPlace
from Editors._EditMedia import EditMedia from Editors._EditMedia import EditMedia
from Editors._EditNote import EditNote from Editors._EditNote import EditNote
from Selectors import selector_factory from gui.selectors import SelectorFactory
from DdTargets import DdTargets from DdTargets import DdTargets
from Errors import WindowActiveError from Errors import WindowActiveError
from Selectors import selector_factory
#-------------------------------------------------------------------------
#
# ObjEntry
#
#-------------------------------------------------------------------------
class ObjEntry(object): class ObjEntry(object):
""" """
Handles the selection of a existing or new Object. Supports Drag and Drop Handles the selection of a existing or new Object. Supports Drag and Drop
@ -285,7 +289,7 @@ class PlaceEntry(ObjEntry):
pass pass
def call_selector(self): def call_selector(self):
cls = selector_factory('Place') cls = SelectorFactory('Place')
return cls(self.dbstate, self.uistate, self.track) return cls(self.dbstate, self.uistate, self.track)
# FIXME isn't used anywhere # FIXME isn't used anywhere
@ -336,7 +340,7 @@ class MediaEntry(ObjEntry):
pass pass
def call_selector(self): def call_selector(self):
cls = selector_factory('MediaObject') cls = SelectorFactory('MediaObject')
return cls(self.dbstate, self.uistate, self.track) return cls(self.dbstate, self.uistate, self.track)
# FIXME isn't used anywhere # FIXME isn't used anywhere
@ -404,5 +408,5 @@ class NoteEntry(ObjEntry):
pass pass
def call_selector(self): def call_selector(self):
cls = selector_factory('Note') cls = SelectorFactory('Note')
return cls(self.dbstate, self.uistate, self.track) return cls(self.dbstate, self.uistate, self.track)

@ -72,8 +72,8 @@ from gen.plug import CATEGORY_QR_FAMILY
from QuestionDialog import (ErrorDialog, RunDatabaseRepair, WarningDialog, from QuestionDialog import (ErrorDialog, RunDatabaseRepair, WarningDialog,
MessageHideDialog) MessageHideDialog)
from Selectors import selector_factory from gui.selectors import SelectorFactory
SelectPerson = selector_factory('Person') SelectPerson = SelectorFactory('Person')
_RETURN = gdk.keyval_from_name("Return") _RETURN = gdk.keyval_from_name("Return")
_KP_ENTER = gdk.keyval_from_name("KP_Enter") _KP_ENTER = gdk.keyval_from_name("KP_Enter")

@ -44,8 +44,6 @@ import gtk
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import const
import config
import gen.lib import gen.lib
from BasicUtils import name_displayer from BasicUtils import name_displayer
import LdsUtils import LdsUtils
@ -55,6 +53,7 @@ from ObjectEntries import PlaceEntry
from DisplayTabs import SourceEmbedList,NoteTab from DisplayTabs import SourceEmbedList,NoteTab
from gui.widgets import (PrivacyButton, MonitoredDate, from gui.widgets import (PrivacyButton, MonitoredDate,
MonitoredMenu, MonitoredStrMenu) MonitoredMenu, MonitoredStrMenu)
from gui.selectors import SelectorFactory
_DATA_MAP = { _DATA_MAP = {
gen.lib.LdsOrd.BAPTISM : [ gen.lib.LdsOrd.BAPTISM : [
@ -252,8 +251,7 @@ class EditLdsOrd(EditSecondary):
self.top.get_object('vbox').pack_start(notebook,True) self.top.get_object('vbox').pack_start(notebook,True)
def select_parents_clicked(self, obj): def select_parents_clicked(self, obj):
from Selectors import selector_factory SelectFamily = SelectorFactory('Family')
SelectFamily = selector_factory('Family')
dialog = SelectFamily(self.dbstate,self.uistate,self.track) dialog = SelectFamily(self.dbstate,self.uistate,self.track)
family = dialog.run() family = dialog.run()

@ -45,12 +45,11 @@ import gtk
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import const
import config
from BasicUtils import name_displayer from BasicUtils import name_displayer
from _EditSecondary import EditSecondary from _EditSecondary import EditSecondary
from gen.lib import NoteType from gen.lib import NoteType
from gui.widgets import MonitoredEntry, PrivacyButton from gui.widgets import MonitoredEntry, PrivacyButton
from gui.selectors import SelectorFactory
from DisplayTabs import SourceEmbedList, NoteTab from DisplayTabs import SourceEmbedList, NoteTab
from glade import Glade from glade import Glade
@ -125,8 +124,7 @@ class EditPersonRef(EditSecondary):
self.close() self.close()
def _select_person(self, obj): def _select_person(self, obj):
from Selectors import selector_factory SelectPerson = SelectorFactory('Person')
SelectPerson = selector_factory('Person')
sel = SelectPerson(self.dbstate, self.uistate, self.track) sel = SelectPerson(self.dbstate, self.uistate, self.track)
person = sel.run() person = sel.run()

@ -59,7 +59,7 @@ import const
import gen.lib import gen.lib
from Filters import Rules from Filters import Rules
import AutoComp import AutoComp
from Selectors import selector_factory from gui.selectors import SelectorFactory
from BasicUtils import name_displayer as _nd from BasicUtils import name_displayer as _nd
import Utils import Utils
import ManagedWindow import ManagedWindow
@ -271,7 +271,7 @@ class MyID(gtk.HBox):
def button_press(self, obj): def button_press(self, obj):
obj_class = self.namespace obj_class = self.namespace
selector = selector_factory(obj_class) selector = SelectorFactory(obj_class)
inst = selector(self.dbstate, self.uistate, self.track) inst = selector(self.dbstate, self.uistate, self.track)
val = inst.run() val = inst.run()
if val is None: if val is None:

@ -53,7 +53,7 @@ from gui.pluginmanager import GuiPluginManager
from gui import widgets from gui import widgets
import ManagedWindow import ManagedWindow
from QuestionDialog import OptionDialog from QuestionDialog import OptionDialog
from Selectors import selector_factory from gui.selectors import SelectorFactory
from BasicUtils import name_displayer as _nd from BasicUtils import name_displayer as _nd
from Filters import GenericFilter, Rules from Filters import GenericFilter, Rules
import gen import gen
@ -466,7 +466,7 @@ class GuiPersonOption(gtk.HBox):
gid = active_person.get_gramps_id() gid = active_person.get_gramps_id()
rfilter.add_rule(Rules.Person.HasIdOf([gid])) rfilter.add_rule(Rules.Person.HasIdOf([gid]))
select_class = selector_factory('Person') select_class = SelectorFactory('Person')
sel = select_class(self.__dbstate, self.__uistate, self.__track, sel = select_class(self.__dbstate, self.__uistate, self.__track,
title=_('Select a person for the report'), title=_('Select a person for the report'),
filter=rfilter ) filter=rfilter )
@ -588,7 +588,7 @@ class GuiFamilyOption(gtk.HBox):
gid = family.get_gramps_id() gid = family.get_gramps_id()
rfilter.add_rule(Rules.Family.HasIdOf([gid])) rfilter.add_rule(Rules.Family.HasIdOf([gid]))
select_class = selector_factory('Family') select_class = SelectorFactory('Family')
sel = select_class(self.__dbstate, self.__uistate, self.__track, sel = select_class(self.__dbstate, self.__uistate, self.__track,
filter=rfilter ) filter=rfilter )
family = sel.run() family = sel.run()
@ -677,7 +677,7 @@ class GuiNoteOption(gtk.HBox):
""" """
Handle the button to choose a different note. Handle the button to choose a different note.
""" """
select_class = selector_factory('Note') select_class = SelectorFactory('Note')
sel = select_class(self.__dbstate, self.__uistate, self.__track) sel = select_class(self.__dbstate, self.__uistate, self.__track)
note = sel.run() note = sel.run()
self.__update_note(note) self.__update_note(note)
@ -759,7 +759,7 @@ class GuiMediaOption(gtk.HBox):
""" """
Handle the button to choose a different note. Handle the button to choose a different note.
""" """
select_class = selector_factory('MediaObject') select_class = SelectorFactory('MediaObject')
sel = select_class(self.__dbstate, self.__uistate, self.__track) sel = select_class(self.__dbstate, self.__uistate, self.__track)
media = sel.run() media = sel.run()
self.__update_media(media) self.__update_media(media)
@ -878,7 +878,7 @@ class GuiPersonListOption(gtk.HBox):
skip_list.add(person.get_handle()) skip_list.add(person.get_handle())
i = self.__model.iter_next(i) i = self.__model.iter_next(i)
select_class = selector_factory('Person') select_class = SelectorFactory('Person')
sel = select_class(self.__dbstate, self.__uistate, sel = select_class(self.__dbstate, self.__uistate,
self.__track, skip=skip_list) self.__track, skip=skip_list)
person = sel.run() person = sel.run()
@ -1018,7 +1018,7 @@ class GuiPlaceListOption(gtk.HBox):
skip_list.add(place.get_handle()) skip_list.add(place.get_handle())
i = self.__model.iter_next(i) i = self.__model.iter_next(i)
select_class = selector_factory('Place') select_class = SelectorFactory('Place')
sel = select_class(self.__dbstate, self.__uistate, sel = select_class(self.__dbstate, self.__uistate,
self.__track, skip=skip_list) self.__track, skip=skip_list)
place = sel.run() place = sel.run()

@ -4,6 +4,7 @@
# If not using GNU make, then list all .py files individually # If not using GNU make, then list all .py files individually
SUBDIRS = \ SUBDIRS = \
selectors \
views \ views \
widgets widgets

@ -3,29 +3,29 @@
# but that is not necessarily portable. # but that is not necessarily portable.
# If not using GNU make, then list all .py files individually # If not using GNU make, then list all .py files individually
pkgdatadir = $(datadir)/@PACKAGE@/Selectors pkgdatadir = $(datadir)/@PACKAGE@/gui/selectors
pkgdata_PYTHON = \ pkgdata_PYTHON = \
__init__.py \ __init__.py \
_BaseSelector.py \ baseselector.py \
_SelectEvent.py \ selectevent.py \
_SelectFamily.py \ selectfamily.py \
_SelectNote.py \ selectnote.py \
_SelectObject.py \ selectobject.py \
_SelectPerson.py \ selectperson.py \
_SelectRepository.py \ selectrepository.py \
_SelectSource.py \ selectsource.py \
_SelectPlace.py \ selectplace.py \
_SelectorExceptions.py \ selectorexceptions.py \
_SelectorFactory.py selectorfactory.py
pkgpyexecdir = @pkgpyexecdir@/Selectors pkgpyexecdir = @pkgpyexecdir@/gui/selectors
pkgpythondir = @pkgpythondir@/Selectors pkgpythondir = @pkgpythondir@/gui/selectors
# Clean up all the byte-compiled files # Clean up all the byte-compiled files
MOSTLYCLEANFILES = *pyc *pyo MOSTLYCLEANFILES = *pyc *pyo
GRAMPS_PY_MODPATH = "../" GRAMPS_PY_MODPATH = "../../"
pycheck: pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \ (export PYTHONPATH=$(GRAMPS_PY_MODPATH); \

@ -20,5 +20,5 @@
# $Id$ # $Id$
from _SelectorFactory import selector_factory from selectorfactory import SelectorFactory

@ -34,7 +34,6 @@ import pango
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import const
import ManagedWindow import ManagedWindow
from Filters import SearchBar from Filters import SearchBar
from glade import Glade from glade import Glade

@ -34,8 +34,7 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gui.views.treemodels import EventModel from gui.views.treemodels import EventModel
from _BaseSelector import BaseSelector from baseselector import BaseSelector
import config
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -34,8 +34,7 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gui.views.treemodels import FamilyModel from gui.views.treemodels import FamilyModel
from _BaseSelector import BaseSelector from baseselector import BaseSelector
import config
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -37,8 +37,7 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gui.views.treemodels import NoteModel from gui.views.treemodels import NoteModel
from _BaseSelector import BaseSelector from baseselector import BaseSelector
import config
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -48,8 +48,7 @@ import const
from Utils import media_path_full from Utils import media_path_full
import ThumbNails import ThumbNails
from gui.views.treemodels import MediaModel from gui.views.treemodels import MediaModel
from _BaseSelector import BaseSelector from baseselector import BaseSelector
import config
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -20,32 +20,32 @@
# $Id$ # $Id$
from _SelectorExceptions import SelectorException from selectorexceptions import SelectorException
def selector_factory(classname): def SelectorFactory(classname):
if classname == 'Person': if classname == 'Person':
from _SelectPerson import SelectPerson from selectperson import SelectPerson
cls = SelectPerson cls = SelectPerson
elif classname == 'Family': elif classname == 'Family':
from _SelectFamily import SelectFamily from selectfamily import SelectFamily
cls = SelectFamily cls = SelectFamily
elif classname == 'Event': elif classname == 'Event':
from _SelectEvent import SelectEvent from selectevent import SelectEvent
cls = SelectEvent cls = SelectEvent
elif classname == 'Place': elif classname == 'Place':
from _SelectPlace import SelectPlace from selectplace import SelectPlace
cls = SelectPlace cls = SelectPlace
elif classname == 'Source': elif classname == 'Source':
from _SelectSource import SelectSource from selectsource import SelectSource
cls = SelectSource cls = SelectSource
elif classname == 'MediaObject': elif classname == 'MediaObject':
from _SelectObject import SelectObject from selectobject import SelectObject
cls = SelectObject cls = SelectObject
elif classname == 'Repository': elif classname == 'Repository':
from _SelectRepository import SelectRepository from selectrepository import SelectRepository
cls = SelectRepository cls = SelectRepository
elif classname == 'Note': elif classname == 'Note':
from _SelectNote import SelectNote from selectnote import SelectNote
cls = SelectNote cls = SelectNote
else: else:
raise SelectorException("Attempt to create unknown " raise SelectorException("Attempt to create unknown "

@ -35,8 +35,7 @@ import gtk
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gui.views.treemodels import PeopleModel from gui.views.treemodels import PeopleModel
from _BaseSelector import BaseSelector from baseselector import BaseSelector
import config
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -34,8 +34,7 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gui.views.treemodels import PlaceModel from gui.views.treemodels import PlaceModel
from _BaseSelector import BaseSelector from baseselector import BaseSelector
import config
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -34,8 +34,7 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gui.views.treemodels import RepositoryModel from gui.views.treemodels import RepositoryModel
from _BaseSelector import BaseSelector from baseselector import BaseSelector
import config
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -34,8 +34,7 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gui.views.treemodels import SourceModel from gui.views.treemodels import SourceModel
from _BaseSelector import BaseSelector from baseselector import BaseSelector
import config
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -54,6 +54,7 @@ import DateHandler
import ThumbNails import ThumbNails
import config import config
from gui import widgets from gui import widgets
from gui.selectors import SelectorFactory
import Errors import Errors
import gen.utils import gen.utils
import Bookmarks import Bookmarks
@ -1482,9 +1483,8 @@ class RelationshipView(NavigationView):
self.dbstate.db.transaction_commit(trans, _("Add Child to Family")) self.dbstate.db.transaction_commit(trans, _("Add Child to Family"))
def sel_child_to_fam(self, obj, event, handle, surname=None): def sel_child_to_fam(self, obj, event, handle, surname=None):
from Selectors import selector_factory
if button_activated(event, _LEFT_BUTTON): if button_activated(event, _LEFT_BUTTON):
SelectPerson = selector_factory('Person') SelectPerson = SelectorFactory('Person')
family = self.dbstate.db.get_family_from_handle(handle) family = self.dbstate.db.get_family_from_handle(handle)
# it only makes sense to skip those who are already in the family # it only makes sense to skip those who are already in the family
skip_list = [family.get_father_handle(), \ skip_list = [family.get_father_handle(), \
@ -1500,8 +1500,7 @@ class RelationshipView(NavigationView):
def select_family(self, obj, event, handle): def select_family(self, obj, event, handle):
if button_activated(event, _LEFT_BUTTON): if button_activated(event, _LEFT_BUTTON):
from Selectors import selector_factory SelectFamily = SelectorFactory('Family')
SelectFamily = selector_factory('Family')
phandle = self.dbstate.get_active_person().handle phandle = self.dbstate.get_active_person().handle
person = self.dbstate.db.get_person_from_handle(phandle) person = self.dbstate.db.get_person_from_handle(phandle)
@ -1520,8 +1519,7 @@ class RelationshipView(NavigationView):
child) child)
def select_parents(self, obj): def select_parents(self, obj):
from Selectors import selector_factory SelectFamily = SelectorFactory('Family')
SelectFamily = selector_factory('Family')
phandle = self.dbstate.get_active_person().handle phandle = self.dbstate.get_active_person().handle
person = self.dbstate.db.get_person_from_handle(phandle) person = self.dbstate.db.get_person_from_handle(phandle)