Continued work on GEP008: Move src/BasicUtils/_NameDisplay.py to src/gen/display.

svn: r14072
This commit is contained in:
Brian Matherly 2010-01-14 04:08:04 +00:00
parent 44cafe6abd
commit c5f54d0cfc
83 changed files with 120 additions and 126 deletions

@ -54,6 +54,9 @@ src/cli/grampscli.py
src/gen/__init__.py src/gen/__init__.py
src/gen/updatecallback.py src/gen/updatecallback.py
# gen display API
src/gen/display/name.py
# gen utils API # gen utils API
src/gen/utils/__init__.py src/gen/utils/__init__.py
src/gen/utils/callback.py src/gen/utils/callback.py
@ -303,9 +306,6 @@ src/gui/widgets/validatedmaskedentry.py
# Simple API # Simple API
src/Simple/_SimpleTable.py src/Simple/_SimpleTable.py
# BasicUtils package
src/BasicUtils/_NameDisplay.py
# Config package # Config package
src/config.py src/config.py

@ -51,7 +51,6 @@ import gtk
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import GrampsDisplay import GrampsDisplay
from BasicUtils import name_displayer
import ListModel import ListModel
import Utils import Utils
import const import const

@ -56,8 +56,7 @@ import gen.utils
from gui.utils import process_pending_events from gui.utils import process_pending_events
from gui.views.navigationview import NavigationView from gui.views.navigationview import NavigationView
import config import config
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import const
import ManagedWindow import ManagedWindow
import Relationship import Relationship
from glade import Glade from glade import Glade

@ -142,14 +142,3 @@ class DbError(Exception):
def __str__(self): def __str__(self):
"Return string representation" "Return string representation"
return self.value return self.value
class NameDisplayError(Exception):
"""
Error used to report that the name display format string is invalid.
"""
def __init__(self, value):
Exception.__init__(self)
self.value = value
def __str__(self):
return self.value

@ -38,7 +38,7 @@ import gobject
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import config import config
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Filters import GenericFilter, Rules from Filters import GenericFilter, Rules
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

@ -60,7 +60,7 @@ import gen.lib
from Filters import Rules from Filters import Rules
import AutoComp import AutoComp
from gui.selectors import SelectorFactory from gui.selectors import SelectorFactory
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
import Utils import Utils
import ManagedWindow import ManagedWindow

@ -55,7 +55,7 @@ import gobject
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import const import const
import ManagedWindow import ManagedWindow
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
import Utils import Utils
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

@ -47,13 +47,13 @@ import gobject
import config import config
import const import const
import DateHandler import DateHandler
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
from gen.display.name import NameDisplayError
import Utils import Utils
from gen.lib import Name from gen.lib import Name
import ManagedWindow import ManagedWindow
from gui.widgets import MarkupLabel, BasicLabel from gui.widgets import MarkupLabel, BasicLabel
from QuestionDialog import ErrorDialog, QuestionDialog2, OkDialog from QuestionDialog import ErrorDialog, QuestionDialog2, OkDialog
from Errors import NameDisplayError
from glade import Glade from glade import Glade
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

@ -36,13 +36,12 @@ import pango
from TransUtils import sgettext as _ from TransUtils import sgettext as _
import gen.lib import gen.lib
from ReportBase import ReportUtils from ReportBase import ReportUtils
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import const import const
import DateHandler import DateHandler
from QuestionDialog import ErrorDialog from QuestionDialog import ErrorDialog
import GrampsDisplay import GrampsDisplay
import ManagedWindow import ManagedWindow
import gen.utils
from glade import Glade from glade import Glade
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

@ -54,7 +54,7 @@ from gui import widgets
import ManagedWindow import ManagedWindow
from QuestionDialog import OptionDialog from QuestionDialog import OptionDialog
from gui.selectors import SelectorFactory from gui.selectors import SelectorFactory
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
from Filters import GenericFilterFactory, GenericFilter, Rules from Filters import GenericFilterFactory, GenericFilter, Rules
import gen import gen

@ -39,7 +39,7 @@ log = logging.getLogger(".")
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import const import const
import Utils import Utils
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import Errors import Errors
from PluginUtils import (Options, OptionHandler, OptionList, from PluginUtils import (Options, OptionHandler, OptionList,
OptionListCollection) OptionListCollection)

@ -17,11 +17,19 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# #
#-------------------------------------------------------------------------
#
# Standard python modules
#
#-------------------------------------------------------------------------
from gettext import gettext as _ from gettext import gettext as _
import const #-------------------------------------------------------------------------
from BasicUtils import name_displayer #
# gramps modules
#
#-------------------------------------------------------------------------
from gen.display.name import displayer as name_displayer
import ListModel import ListModel
import ManagedWindow import ManagedWindow
from glade import Glade from glade import Glade

@ -50,7 +50,7 @@ from gen.plug.menu import (FamilyOption, PersonOption, NoteOption,
MediaOption, PersonListOption, NumberOption, MediaOption, PersonListOption, NumberOption,
BooleanOption, DestinationOption, StringOption, BooleanOption, DestinationOption, StringOption,
TextOption, EnumeratedListOption) TextOption, EnumeratedListOption)
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Errors import ReportError from Errors import ReportError
from ReportBase import (CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK, from ReportBase import (CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK,
CATEGORY_GRAPHVIZ, CATEGORY_CODE) CATEGORY_GRAPHVIZ, CATEGORY_CODE)

@ -246,7 +246,7 @@ def get_person_filters(person, include_single=True):
@type person: boolean @type person: boolean
""" """
from Filters import GenericFilter, Rules, CustomFilters from Filters import GenericFilter, Rules, CustomFilters
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
if person: if person:
name = name_displayer.display(person) name = name_displayer.display(person)

@ -28,7 +28,7 @@ import gen.lib
import DateHandler import DateHandler
import Utils import Utils
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from gen.lib import EventType from gen.lib import EventType
import config import config

@ -37,8 +37,7 @@ Mary Smith was born on 3/28/1923.
# Gramps modules # Gramps modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from gen.display.name import displayer as name_displayer
from BasicUtils import name_displayer
import DateHandler import DateHandler
import gen.lib import gen.lib
from gen.utils import get_birth_or_fallback, get_death_or_fallback from gen.utils import get_birth_or_fallback, get_death_or_fallback

@ -44,7 +44,7 @@ import uuid
# Gramps modules # Gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import gen.lib import gen.lib
import Errors import Errors
from GrampsLocale import codeset from GrampsLocale import codeset

@ -45,7 +45,7 @@ LOG = logging.getLogger(".grampscli")
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import config import config
import const import const
import Errors import Errors

@ -4,10 +4,11 @@
# If not using GNU make, then list all .py files individually # If not using GNU make, then list all .py files individually
SUBDIRS = \ SUBDIRS = \
plug \ display \
proxy\ db \
db\
lib\ lib\
plug \
proxy \
utils utils
pkgdatadir = $(datadir)/@PACKAGE@/gen pkgdatadir = $(datadir)/@PACKAGE@/gen

@ -1,16 +1,16 @@
# This is the src/BasicUtils level Makefile for Gramps # This is the src/gen/display level Makefile for Gramps
# We could use GNU make's ':=' syntax for nice wildcard use, # We could use GNU make's ':=' syntax for nice wildcard use,
# 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@/BasicUtils pkgdatadir = $(datadir)/@PACKAGE@/display
pkgdata_PYTHON = \ pkgdata_PYTHON = \
_NameDisplay.py\ name.py\
__init__.py __init__.py
pkgpyexecdir = @pkgpyexecdir@/BasicUtils pkgpyexecdir = @pkgpyexecdir@/display
pkgpythondir = @pkgpythondir@/BasicUtils pkgpythondir = @pkgpythondir@/display
dist_pkgdata_DATA = dist_pkgdata_DATA =

@ -2,6 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
# Copyright (C) 2004-2007 Donald N. Allingham # Copyright (C) 2004-2007 Donald N. Allingham
# Copyright (C) 2010 Brian G. Matherly
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -20,4 +21,3 @@
# $Id: __init__.py$ # $Id: __init__.py$
from _NameDisplay import displayer as name_displayer

@ -2,6 +2,7 @@
# Gramps - a GTK+/GNOME based genealogy program # Gramps - a GTK+/GNOME based genealogy program
# #
# Copyright (C) 2004-2007 Donald N. Allingham # Copyright (C) 2004-2007 Donald N. Allingham
# Copyright (C) 2010 Brian G. Matherly
# #
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -38,7 +39,6 @@ import re
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from gen.lib import Name from gen.lib import Name
from Errors import NameDisplayError
try: try:
import config import config
@ -81,6 +81,22 @@ _F_RAWFN = 4 # name format raw function
# Because of occurring in an exec(), this couldn't be in a lambda: # Because of occurring in an exec(), this couldn't be in a lambda:
def _make_cmp(a, b): return -cmp(a[1], b[1]) def _make_cmp(a, b): return -cmp(a[1], b[1])
#-------------------------------------------------------------------------
#
# NameDisplayError class
#
#-------------------------------------------------------------------------
class NameDisplayError(Exception):
"""
Error used to report that the name display format string is invalid.
"""
def __init__(self, value):
Exception.__init__(self)
self.value = value
def __str__(self):
return self.value
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# NameDisplay class # NameDisplay class
@ -94,11 +110,6 @@ class NameDisplay(object):
format_funcs = {} format_funcs = {}
raw_format_funcs = {} raw_format_funcs = {}
# FIXME: Is this used anywhere? I cannot see that it is.
sort_field = (Name.get_surname, Name.get_surname,
Name.get_first_name, Name.get_patronymic,
Name.get_first_name)
STANDARD_FORMATS = [ STANDARD_FORMATS = [
(Name.DEF,_("Default format (defined by Gramps preferences)"),'',_ACT), (Name.DEF,_("Default format (defined by Gramps preferences)"),'',_ACT),
(Name.LNFN,_("Surname, Given Patronymic"),'%p %l, %f %y %s',_ACT), (Name.LNFN,_("Surname, Given Patronymic"),'%p %l, %f %y %s',_ACT),

@ -35,7 +35,7 @@ from gettext import gettext as _
# GRAMPS classes # GRAMPS classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import Utils import Utils
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

@ -34,7 +34,7 @@ import cgi
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import DateHandler import DateHandler
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import Utils import Utils
import gen.lib import gen.lib
from gen.utils import get_birth_or_fallback from gen.utils import get_birth_or_fallback

@ -41,7 +41,7 @@ from pango import WEIGHT_NORMAL, WEIGHT_BOLD
# GRAMPS classes # GRAMPS classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -34,7 +34,7 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gen.lib import gen.lib
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from eventembedlist import EventEmbedList from eventembedlist import EventEmbedList
from eventrefmodel import EventRefModel from eventrefmodel import EventRefModel

@ -32,7 +32,7 @@ import gtk
# GRAMPS classes # GRAMPS classes
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -51,7 +51,7 @@ import Errors
from glade import Glade from glade import Glade
from displaytabs import SourceEmbedList, NoteTab from displaytabs import SourceEmbedList, NoteTab
from gui.widgets import MonitoredDataType, PrivacyButton from gui.widgets import MonitoredDataType, PrivacyButton
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -55,7 +55,7 @@ import pango
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import Utils import Utils
import config import config
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import gen.lib import gen.lib
import Errors import Errors
import DateHandler import DateHandler

@ -45,7 +45,7 @@ import gtk
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gen.lib import gen.lib
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import LdsUtils import LdsUtils
from glade import Glade from glade import Glade
from editsecondary import EditSecondary from editsecondary import EditSecondary

@ -41,7 +41,7 @@ import gtk
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from editsecondary import EditSecondary from editsecondary import EditSecondary
from gen.lib import NoteType from gen.lib import NoteType
from displaytabs import GrampsTab,SourceEmbedList,NoteTab from displaytabs import GrampsTab,SourceEmbedList,NoteTab

@ -46,13 +46,11 @@ import gtk
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import const
import Utils import Utils
from gui.utils import add_menuitem, open_file_with_default_application from gui.utils import add_menuitem, open_file_with_default_application
import Mime
import gen.lib import gen.lib
from gui import widgets from gui import widgets
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import Errors import Errors
from glade import Glade from glade import Glade

@ -45,7 +45,7 @@ import gtk
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as 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

@ -42,7 +42,7 @@ import gtk
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import ManagedWindow import ManagedWindow
import DateHandler import DateHandler
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import config import config
import GrampsDisplay import GrampsDisplay
from QuestionDialog import SaveDialog from QuestionDialog import SaveDialog

@ -71,7 +71,6 @@ import GrampsCfg
import Errors import Errors
from QuestionDialog import (ErrorDialog, WarningDialog, QuestionDialog2, from QuestionDialog import (ErrorDialog, WarningDialog, QuestionDialog2,
InfoDialog) InfoDialog)
from BasicUtils import name_displayer
from gui import widgets from gui import widgets
import UndoHistory import UndoHistory
from gui.dbloader import DbLoader from gui.dbloader import DbLoader

@ -219,7 +219,7 @@ class NavigationView(PageView):
""" """
Add a bookmark to the list. Add a bookmark to the list.
""" """
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
active_handle = self.uistate.get_active('Person') active_handle = self.uistate.get_active('Person')
active_person = self.dbstate.db.get_person_from_handle(active_handle) active_person = self.dbstate.db.get_person_from_handle(active_handle)

@ -44,10 +44,9 @@ import const
import ToolTips import ToolTips
import GrampsLocale import GrampsLocale
import DateHandler import DateHandler
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import gen.lib import gen.lib
from gen.lib import EventRoleType from gen.lib import EventRoleType
import gen.utils
from gui.views.treemodels.flatbasemodel import FlatBaseModel from gui.views.treemodels.flatbasemodel import FlatBaseModel

@ -60,7 +60,7 @@ _LOG = logging.getLogger(".")
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import const import const
from gen.lib import Name, EventRef, EventType, EventRoleType, MarkerType from gen.lib import Name, EventRef, EventType, EventRoleType, MarkerType
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import DateHandler import DateHandler
import ToolTips import ToolTips
import GrampsLocale import GrampsLocale

@ -83,7 +83,7 @@ from ReportBase._DocReportDialog import DocReportDialog
from ReportBase._CommandLineReport import CommandLineReport from ReportBase._CommandLineReport import CommandLineReport
from ReportBase._ReportOptions import ReportOptions from ReportBase._ReportOptions import ReportOptions
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #

@ -34,10 +34,9 @@ from TransUtils import sgettext as _
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
import gen.lib
from gen.lib import ChildRefType, Date, Name from gen.lib import ChildRefType, Date, Name
from gen.plug.docgen import FontStyle, ParagraphStyle, FONT_SANS_SERIF from gen.plug.docgen import FontStyle, ParagraphStyle, FONT_SANS_SERIF
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from gen.plug import Gramplet from gen.plug import Gramplet
from gen.plug.menu import (BooleanOption, EnumeratedListOption, from gen.plug.menu import (BooleanOption, EnumeratedListOption,
FilterOption, PersonOption) FilterOption, PersonOption)

@ -35,7 +35,7 @@ from TransUtils import sgettext as _
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Errors import ReportError from Errors import ReportError
from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle, from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
FONT_SANS_SERIF, PARA_ALIGN_CENTER) FONT_SANS_SERIF, PARA_ALIGN_CENTER)

@ -34,7 +34,7 @@ import time
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Errors import ReportError from Errors import ReportError
import Relationship import Relationship
from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle, from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,

@ -29,7 +29,7 @@
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Errors import ReportError from Errors import ReportError
from gen.plug.docgen import (GraphicsStyle, FontStyle, ParagraphStyle, from gen.plug.docgen import (GraphicsStyle, FontStyle, ParagraphStyle,
FONT_SANS_SERIF, PARA_ALIGN_CENTER) FONT_SANS_SERIF, PARA_ALIGN_CENTER)

@ -44,8 +44,7 @@ from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle,
FONT_SANS_SERIF, DASHED, PARA_ALIGN_CENTER) FONT_SANS_SERIF, DASHED, PARA_ALIGN_CENTER)
import Sort import Sort
from QuestionDialog import ErrorDialog from QuestionDialog import ErrorDialog
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Utils import probably_alive
from gui.utils import ProgressMeter from gui.utils import ProgressMeter
import config import config
from gen.utils import get_birth_or_fallback, get_death_or_fallback from gen.utils import get_birth_or_fallback, get_death_or_fallback

@ -20,7 +20,7 @@
# #
from gen.plug import Gramplet from gen.plug import Gramplet
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from gettext import gettext as _ from gettext import gettext as _
class AttributesGramplet(Gramplet): class AttributesGramplet(Gramplet):

@ -38,7 +38,7 @@ from gettext import gettext as _
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from gen.plug import Gramplet from gen.plug import Gramplet
from ReportBase import ReportUtils from ReportBase import ReportUtils
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import DateHandler import DateHandler
from gen.utils import get_birth_or_fallback, get_death_or_fallback from gen.utils import get_birth_or_fallback, get_death_or_fallback

@ -52,14 +52,14 @@ if gtk.pygtk_version < (2,3,93):
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from gettext import gettext as _ from gettext import gettext as _
from gen.plug import Gramplet from gen.plug import Gramplet
from Utils import (find_children, find_parents, find_witnessed_people) from Utils import (find_children, find_parents, find_witnessed_people)
from libformatting import FormattingHelper from libformatting import FormattingHelper
import gen.lib import gen.lib
import Errors import Errors
from gui.editors import EditPerson, EditFamily from gui.editors import EditPerson
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -35,7 +35,7 @@ import locale
from gen.plug import Gramplet from gen.plug import Gramplet
from TransUtils import sgettext as _ from TransUtils import sgettext as _
from gettext import ngettext from gettext import ngettext
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import DateHandler import DateHandler
import gen import gen
from gen.utils import get_birth_or_fallback, get_death_or_fallback from gen.utils import get_birth_or_fallback, get_death_or_fallback

@ -25,7 +25,7 @@
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from gen.plug import Gramplet from gen.plug import Gramplet
from TransUtils import sgettext as _ from TransUtils import sgettext as _
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #

@ -25,7 +25,7 @@
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from gen.plug import Gramplet from gen.plug import Gramplet
from TransUtils import sgettext as _ from TransUtils import sgettext as _
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #

@ -28,7 +28,7 @@
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from gen.lib import EventType, FamilyRelType, MarkerType from gen.lib import EventType, FamilyRelType, MarkerType
from gen.plug import Gramplet from gen.plug import Gramplet
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from ReportBase import ReportUtils from ReportBase import ReportUtils
from TransUtils import sgettext as _ from TransUtils import sgettext as _

@ -37,7 +37,7 @@ from gettext import gettext as _
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Errors import ReportError from Errors import ReportError
from gen.plug.menu import (PersonOption, BooleanOption, NumberOption, from gen.plug.menu import (PersonOption, BooleanOption, NumberOption,
EnumeratedListOption) EnumeratedListOption)

@ -48,7 +48,7 @@ from TransUtils import sgettext as _
from gen.plug.menu import BooleanOption, EnumeratedListOption, FilterOption, \ from gen.plug.menu import BooleanOption, EnumeratedListOption, FilterOption, \
PersonOption, ColorOption PersonOption, ColorOption
from ReportBase import Report, ReportUtils, MenuReportOptions from ReportBase import Report, ReportUtils, MenuReportOptions
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import DateHandler import DateHandler
import gen.lib import gen.lib
import Utils import Utils

@ -48,7 +48,7 @@ __LOG = logging.getLogger(".Db")
from gen.lib import (GenderStats, Source, Person, Family, Event, Place, from gen.lib import (GenderStats, Source, Person, Family, Event, Place,
MediaObject, Repository, Note, Attribute, AttributeType, MediaObject, Repository, Note, Attribute, AttributeType,
NoteType) NoteType)
from gen.db.write import (DbBsddb, KEY_TO_CLASS_MAP, CLASS_TO_KEY_MAP) from gen.db.write import (KEY_TO_CLASS_MAP, CLASS_TO_KEY_MAP)
from libgrdb import DbGrdb from libgrdb import DbGrdb
from gen.db.txn import DbTxn as Transaction from gen.db.txn import DbTxn as Transaction
from gen.db.cursor import GrampsCursor from gen.db.cursor import GrampsCursor
@ -58,7 +58,7 @@ import const
from QuestionDialog import ErrorDialog from QuestionDialog import ErrorDialog
from Errors import HandleError from Errors import HandleError
from gen.updatecallback import UpdateCallback from gen.updatecallback import UpdateCallback
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -42,7 +42,7 @@ import Mime
import gen.lib import gen.lib
import Utils import Utils
import DateHandler import DateHandler
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from gen.db.dbconst import (PERSON_KEY, FAMILY_KEY, SOURCE_KEY, EVENT_KEY, from gen.db.dbconst import (PERSON_KEY, FAMILY_KEY, SOURCE_KEY, EVENT_KEY,
MEDIA_KEY, PLACE_KEY, REPOSITORY_KEY, NOTE_KEY) MEDIA_KEY, PLACE_KEY, REPOSITORY_KEY, NOTE_KEY)
from gen.updatecallback import UpdateCallback from gen.updatecallback import UpdateCallback

@ -39,7 +39,7 @@ from cgi import escape
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gen.lib import gen.lib
import DateHandler import DateHandler
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from gen.utils import get_birth_or_fallback, get_death_or_fallback from gen.utils import get_birth_or_fallback, get_death_or_fallback
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

@ -34,7 +34,7 @@ from gen.lib.person import Person
from gen.lib.eventroletype import EventRoleType from gen.lib.eventroletype import EventRoleType
from gen.lib.eventtype import EventType from gen.lib.eventtype import EventType
from gen.lib.familyreltype import FamilyRelType from gen.lib.familyreltype import FamilyRelType
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
import Utils import Utils
from ReportBase import ReportUtils from ReportBase import ReportUtils
from libtranslate import Translator from libtranslate import Translator

@ -36,7 +36,7 @@ from gettext import gettext as _
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Errors import ReportError from Errors import ReportError
from gen.lib import ChildRefType from gen.lib import ChildRefType
from gen.plug.menu import BooleanOption, NumberOption, PersonOption, \ from gen.plug.menu import BooleanOption, NumberOption, PersonOption, \

@ -35,7 +35,7 @@ import datetime, time
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
from Errors import ReportError from Errors import ReportError
from gen.lib import NameType, EventType, Name, Date, Person from gen.lib import NameType, EventType, Name, Date, Person
import Relationship import Relationship

@ -41,7 +41,7 @@ from gettext import gettext as _
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
FONT_SANS_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER) FONT_SANS_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
from gen.plug.menu import NumberOption, PersonOption from gen.plug.menu import NumberOption, PersonOption
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Errors import ReportError from Errors import ReportError
from ReportBase import Report, ReportUtils, MenuReportOptions from ReportBase import Report, ReportUtils, MenuReportOptions
import DateHandler import DateHandler

@ -38,7 +38,7 @@ from gettext import gettext as _
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
from Errors import ReportError from Errors import ReportError
from gen.lib import EventType, FamilyRelType, Person from gen.lib import EventType, FamilyRelType, Person
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,

@ -39,7 +39,7 @@ from gettext import gettext as _
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
from Errors import ReportError from Errors import ReportError
from gen.lib import FamilyRelType, Person from gen.lib import FamilyRelType, Person
from gen.plug.menu import (BooleanOption, NumberOption, PersonOption, from gen.plug.menu import (BooleanOption, NumberOption, PersonOption,

@ -34,7 +34,7 @@ from gettext import gettext as _
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Errors import ReportError from Errors import ReportError
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle, from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle,
TableCellStyle, FONT_SANS_SERIF, INDEX_TYPE_TOC, TableCellStyle, FONT_SANS_SERIF, INDEX_TYPE_TOC,

@ -36,7 +36,7 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle,
INDEX_TYPE_TOC, PARA_ALIGN_CENTER) INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
import DateHandler import DateHandler
from TransUtils import sgettext as _ from TransUtils import sgettext as _
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
#------------------------------------------------------------------------ #------------------------------------------------------------------------
# #

@ -46,7 +46,7 @@ from gen.plug.menu import BooleanOption, FilterOption, PersonOption, \
BooleanListOption BooleanListOption
from ReportBase import Report, ReportUtils, MenuReportOptions from ReportBase import Report, ReportUtils, MenuReportOptions
from ReportBase import Bibliography, Endnotes from ReportBase import Bibliography, Endnotes
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
from Utils import media_path_full from Utils import media_path_full
from QuestionDialog import WarningDialog from QuestionDialog import WarningDialog

@ -36,7 +36,7 @@ from gettext import gettext as _
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Errors import ReportError from Errors import ReportError
import Relationship import Relationship
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,

@ -42,7 +42,7 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,
INDEX_TYPE_TOC, PARA_ALIGN_CENTER) INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
from gen.lib import MarkerType from gen.lib import MarkerType
from Filters import GenericFilterFactory, Rules from Filters import GenericFilterFactory, Rules
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import DateHandler import DateHandler
#------------------------------------------------------------------------ #------------------------------------------------------------------------

@ -40,7 +40,7 @@ import math
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Errors import ReportError from Errors import ReportError
from gen.plug.menu import PersonOption from gen.plug.menu import PersonOption
from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle,

@ -41,7 +41,7 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle,
INDEX_TYPE_TOC, PARA_ALIGN_CENTER) INDEX_TYPE_TOC, PARA_ALIGN_CENTER)
import DateHandler import DateHandler
import Sort import Sort
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
class PlaceReport(Report): class PlaceReport(Report):
""" """

@ -42,7 +42,7 @@ from gen.plug.menu import BooleanOption, NumberOption, StringOption, \
FilterOption, PersonOption, EnumeratedListOption FilterOption, PersonOption, EnumeratedListOption
import gen.lib import gen.lib
import config import config
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import Errors import Errors
from ReportBase import ReportUtils from ReportBase import ReportUtils
from docgen import TextBufDoc from docgen import TextBufDoc

@ -58,12 +58,11 @@ import gtk
import gen.lib import gen.lib
import Utils import Utils
from gui.utils import ProgressMeter from gui.utils import ProgressMeter
#import const
import ManagedWindow import ManagedWindow
from PluginUtils import Tool from PluginUtils import Tool
from QuestionDialog import OkDialog, MissingMediaDialog from QuestionDialog import OkDialog, MissingMediaDialog
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
from glade import Glade from glade import Glade
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

@ -36,7 +36,7 @@ import gtk
# #
#------------------------------------------------------------------------ #------------------------------------------------------------------------
import const import const
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from PluginUtils import Tool from PluginUtils import Tool
import GrampsDisplay import GrampsDisplay
import ManagedWindow import ManagedWindow

@ -47,7 +47,7 @@ import gen.lib
import Utils import Utils
from PluginUtils import Tool from PluginUtils import Tool
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from QuestionDialog import OkDialog from QuestionDialog import OkDialog
#------------------------------------------------------------------------- #-------------------------------------------------------------------------

@ -39,7 +39,7 @@ import const
import gen.lib import gen.lib
from gui.utils import ProgressMeter from gui.utils import ProgressMeter
import soundex import soundex
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from QuestionDialog import OkDialog from QuestionDialog import OkDialog
import ListModel import ListModel
import Errors import Errors
@ -47,7 +47,7 @@ from Merge import PersonCompare
import GrampsDisplay import GrampsDisplay
import ManagedWindow import ManagedWindow
from PluginUtils import Tool from PluginUtils import Tool
from QuestionDialog import ErrorDialog, RunDatabaseRepair from QuestionDialog import RunDatabaseRepair
from TransUtils import sgettext as _ from TransUtils import sgettext as _
from glade import Glade from glade import Glade

@ -42,7 +42,7 @@ import gtk
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
import ManagedWindow import ManagedWindow
from gui.views.treemodels import PeopleModel from gui.views.treemodels import PeopleModel
import Relationship import Relationship

@ -53,14 +53,14 @@ if gtk.pygtk_version < (2,3,93):
# GRAMPS modules # GRAMPS modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Utils import (find_children, find_parents, find_witnessed_people) from Utils import (find_children, find_parents, find_witnessed_people)
from libformatting import FormattingHelper from libformatting import FormattingHelper
import gen.lib import gen.lib
from gui.views.navigationview import NavigationView from gui.views.navigationview import NavigationView
import Errors import Errors
import Bookmarks import Bookmarks
from gui.editors import EditPerson, EditFamily from gui.editors import EditPerson
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

@ -64,7 +64,7 @@ import config
import Errors import Errors
from gui.utils import add_menuitem from gui.utils import add_menuitem
from ReportBase import CSS_FILES from ReportBase import CSS_FILES
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
from PlaceUtils import conv_lat_lon from PlaceUtils import conv_lat_lon
from gui.views.pageview import PageView from gui.views.pageview import PageView
from gui.editors import EditPlace from gui.editors import EditPlace

@ -52,14 +52,12 @@ except:
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gen.lib import gen.lib
from gui.views.navigationview import NavigationView from gui.views.navigationview import NavigationView
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Utils import (media_path_full, probably_alive, find_children, from Utils import (media_path_full, probably_alive, find_children,
find_parents, find_witnessed_people) find_parents, find_witnessed_people)
from libformatting import FormattingHelper from libformatting import FormattingHelper
import DateHandler
import ThumbNails import ThumbNails
import Errors import Errors
from ReportBase import ReportUtils
from gui.editors import EditPerson, EditFamily from gui.editors import EditPerson, EditFamily
from DdTargets import DdTargets from DdTargets import DdTargets
import cPickle as pickle import cPickle as pickle

@ -53,7 +53,7 @@ except:
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gen.lib import gen.lib
from gui.views.navigationview import NavigationView from gui.views.navigationview import NavigationView
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Utils import (media_path_full, probably_alive, find_children, from Utils import (media_path_full, probably_alive, find_children,
find_parents, find_witnessed_people) find_parents, find_witnessed_people)
from libformatting import FormattingHelper from libformatting import FormattingHelper

@ -49,7 +49,7 @@ import gen.lib
from gui.views.listview import ListView, LISTTREE from gui.views.listview import ListView, LISTTREE
from gui.views.treemodels import PeopleModel from gui.views.treemodels import PeopleModel
import Utils import Utils
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from QuestionDialog import ErrorDialog, QuestionDialog from QuestionDialog import ErrorDialog, QuestionDialog
import Errors import Errors
import Bookmarks import Bookmarks

@ -49,7 +49,7 @@ import pango
import gen.lib import gen.lib
from gui.views.navigationview import NavigationView from gui.views.navigationview import NavigationView
from gui.editors import EditPerson, EditFamily from gui.editors import EditPerson, EditFamily
from BasicUtils import name_displayer from gen.display.name import displayer as name_displayer
from Utils import media_path_full, probably_alive from Utils import media_path_full, probably_alive
import DateHandler import DateHandler
import ThumbNails import ThumbNails

@ -94,11 +94,9 @@ import ThumbNails
import ImgManip import ImgManip
import Mime import Mime
from QuestionDialog import ErrorDialog, WarningDialog from QuestionDialog import ErrorDialog, WarningDialog
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
from DateHandler import displayer as _dd from DateHandler import displayer as _dd
from DateHandler import parser as _dp
from gen.proxy import PrivateProxyDb, LivingProxyDb from gen.proxy import PrivateProxyDb, LivingProxyDb
from gen.lib.eventroletype import EventRoleType
from libhtmlconst import _CHARACTER_SETS, _CC, _COPY_OPTIONS from libhtmlconst import _CHARACTER_SETS, _CC, _COPY_OPTIONS
# import HTML Class from # import HTML Class from

@ -65,7 +65,7 @@ from Utils import probably_alive, xml_lang, get_researcher
from gui.utils import ProgressMeter from gui.utils import ProgressMeter
from DateHandler import displayer as _dd from DateHandler import displayer as _dd
from BasicUtils import name_displayer as _nd from gen.display.name import displayer as _nd
import libholiday import libholiday
from libhtml import Html from libhtml import Html