diff --git a/po/POTFILES.in b/po/POTFILES.in index c7db17ef6..8ce6f0b6c 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -54,6 +54,9 @@ src/cli/grampscli.py src/gen/__init__.py src/gen/updatecallback.py +# gen display API +src/gen/display/name.py + # gen utils API src/gen/utils/__init__.py src/gen/utils/callback.py @@ -303,9 +306,6 @@ src/gui/widgets/validatedmaskedentry.py # Simple API src/Simple/_SimpleTable.py -# BasicUtils package -src/BasicUtils/_NameDisplay.py - # Config package src/config.py diff --git a/src/Bookmarks.py b/src/Bookmarks.py index 3b7d953b4..6a41d2bd4 100644 --- a/src/Bookmarks.py +++ b/src/Bookmarks.py @@ -51,7 +51,6 @@ import gtk # #------------------------------------------------------------------------- import GrampsDisplay -from BasicUtils import name_displayer import ListModel import Utils import const diff --git a/src/DisplayState.py b/src/DisplayState.py index 9a1a6bfa6..2ed5c7074 100644 --- a/src/DisplayState.py +++ b/src/DisplayState.py @@ -56,8 +56,7 @@ import gen.utils from gui.utils import process_pending_events from gui.views.navigationview import NavigationView import config -from BasicUtils import name_displayer -import const +from gen.display.name import displayer as name_displayer import ManagedWindow import Relationship from glade import Glade diff --git a/src/Errors.py b/src/Errors.py index dac63e3bf..7b459dd96 100644 --- a/src/Errors.py +++ b/src/Errors.py @@ -142,14 +142,3 @@ class DbError(Exception): def __str__(self): "Return string representation" 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 diff --git a/src/ExportOptions.py b/src/ExportOptions.py index 055aace87..811d31a13 100644 --- a/src/ExportOptions.py +++ b/src/ExportOptions.py @@ -38,7 +38,7 @@ import gobject #------------------------------------------------------------------------- import config -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from Filters import GenericFilter, Rules #------------------------------------------------------------------------- diff --git a/src/FilterEditor/_EditRule.py b/src/FilterEditor/_EditRule.py index a64c66425..2373c1737 100644 --- a/src/FilterEditor/_EditRule.py +++ b/src/FilterEditor/_EditRule.py @@ -60,7 +60,7 @@ import gen.lib from Filters import Rules import AutoComp from gui.selectors import SelectorFactory -from BasicUtils import name_displayer as _nd +from gen.display.name import displayer as _nd import Utils import ManagedWindow diff --git a/src/FilterEditor/_ShowResults.py b/src/FilterEditor/_ShowResults.py index 3c505a75c..357c18f12 100644 --- a/src/FilterEditor/_ShowResults.py +++ b/src/FilterEditor/_ShowResults.py @@ -55,7 +55,7 @@ import gobject #------------------------------------------------------------------------- import const import ManagedWindow -from BasicUtils import name_displayer as _nd +from gen.display.name import displayer as _nd import Utils #------------------------------------------------------------------------- diff --git a/src/GrampsCfg.py b/src/GrampsCfg.py index 7718a226e..b74a5fd06 100644 --- a/src/GrampsCfg.py +++ b/src/GrampsCfg.py @@ -47,13 +47,13 @@ import gobject import config import const 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 from gen.lib import Name import ManagedWindow from gui.widgets import MarkupLabel, BasicLabel from QuestionDialog import ErrorDialog, QuestionDialog2, OkDialog -from Errors import NameDisplayError from glade import Glade #------------------------------------------------------------------------- diff --git a/src/Merge/_MergePerson.py b/src/Merge/_MergePerson.py index 1dd9fc543..c7bf4d332 100644 --- a/src/Merge/_MergePerson.py +++ b/src/Merge/_MergePerson.py @@ -36,13 +36,12 @@ import pango from TransUtils import sgettext as _ import gen.lib from ReportBase import ReportUtils -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import const import DateHandler from QuestionDialog import ErrorDialog import GrampsDisplay import ManagedWindow -import gen.utils from glade import Glade #------------------------------------------------------------------------- diff --git a/src/PluginUtils/_GuiOptions.py b/src/PluginUtils/_GuiOptions.py index 805483c1f..f4b9e4ada 100644 --- a/src/PluginUtils/_GuiOptions.py +++ b/src/PluginUtils/_GuiOptions.py @@ -54,7 +54,7 @@ from gui import widgets import ManagedWindow from QuestionDialog import OptionDialog 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 import gen diff --git a/src/PluginUtils/_Tool.py b/src/PluginUtils/_Tool.py index 97cffdda1..6e44edd3a 100644 --- a/src/PluginUtils/_Tool.py +++ b/src/PluginUtils/_Tool.py @@ -39,7 +39,7 @@ log = logging.getLogger(".") #------------------------------------------------------------------------- import const import Utils -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import Errors from PluginUtils import (Options, OptionHandler, OptionList, OptionListCollection) diff --git a/src/Reorder.py b/src/Reorder.py index 9115bb9c5..86f4aab7c 100644 --- a/src/Reorder.py +++ b/src/Reorder.py @@ -17,11 +17,19 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # - +#------------------------------------------------------------------------- +# +# Standard python modules +# +#------------------------------------------------------------------------- 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 ManagedWindow from glade import Glade diff --git a/src/ReportBase/_CommandLineReport.py b/src/ReportBase/_CommandLineReport.py index 7d20d214a..5bcfe3f92 100644 --- a/src/ReportBase/_CommandLineReport.py +++ b/src/ReportBase/_CommandLineReport.py @@ -50,7 +50,7 @@ from gen.plug.menu import (FamilyOption, PersonOption, NoteOption, MediaOption, PersonListOption, NumberOption, BooleanOption, DestinationOption, StringOption, TextOption, EnumeratedListOption) -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from Errors import ReportError from ReportBase import (CATEGORY_TEXT, CATEGORY_DRAW, CATEGORY_BOOK, CATEGORY_GRAPHVIZ, CATEGORY_CODE) diff --git a/src/ReportBase/_ReportUtils.py b/src/ReportBase/_ReportUtils.py index c744207c2..7ae401ced 100644 --- a/src/ReportBase/_ReportUtils.py +++ b/src/ReportBase/_ReportUtils.py @@ -246,7 +246,7 @@ def get_person_filters(person, include_single=True): @type person: boolean """ from Filters import GenericFilter, Rules, CustomFilters - from BasicUtils import name_displayer + from gen.display.name import displayer as name_displayer if person: name = name_displayer.display(person) diff --git a/src/Simple/_SimpleAccess.py b/src/Simple/_SimpleAccess.py index 9114bc5ae..d9af95eb3 100644 --- a/src/Simple/_SimpleAccess.py +++ b/src/Simple/_SimpleAccess.py @@ -28,7 +28,7 @@ import gen.lib import DateHandler import Utils -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from gen.lib import EventType import config diff --git a/src/SubstKeywords.py b/src/SubstKeywords.py index 0c84950ae..2b3835523 100644 --- a/src/SubstKeywords.py +++ b/src/SubstKeywords.py @@ -37,8 +37,7 @@ Mary Smith was born on 3/28/1923. # Gramps modules # #------------------------------------------------------------------------ - -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import DateHandler import gen.lib from gen.utils import get_birth_or_fallback, get_death_or_fallback diff --git a/src/Utils.py b/src/Utils.py index 1c3596d1b..b1a76d45a 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -44,7 +44,7 @@ import uuid # Gramps modules # #------------------------------------------------------------------------- -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import gen.lib import Errors from GrampsLocale import codeset diff --git a/src/cli/grampscli.py b/src/cli/grampscli.py index 68ac7155e..ad4e2beb9 100644 --- a/src/cli/grampscli.py +++ b/src/cli/grampscli.py @@ -45,7 +45,7 @@ LOG = logging.getLogger(".grampscli") # GRAMPS modules # #------------------------------------------------------------------------- -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import config import const import Errors diff --git a/src/gen/Makefile.am b/src/gen/Makefile.am index 399654657..128928893 100644 --- a/src/gen/Makefile.am +++ b/src/gen/Makefile.am @@ -4,10 +4,11 @@ # If not using GNU make, then list all .py files individually SUBDIRS = \ - plug \ - proxy\ - db\ + display \ + db \ lib\ + plug \ + proxy \ utils pkgdatadir = $(datadir)/@PACKAGE@/gen diff --git a/src/BasicUtils/Makefile.am b/src/gen/display/Makefile.am similarity index 66% rename from src/BasicUtils/Makefile.am rename to src/gen/display/Makefile.am index e8ac06c52..2b1f8b456 100644 --- a/src/BasicUtils/Makefile.am +++ b/src/gen/display/Makefile.am @@ -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, # but that is not necessarily portable. # If not using GNU make, then list all .py files individually -pkgdatadir = $(datadir)/@PACKAGE@/BasicUtils +pkgdatadir = $(datadir)/@PACKAGE@/display pkgdata_PYTHON = \ - _NameDisplay.py\ + name.py\ __init__.py -pkgpyexecdir = @pkgpyexecdir@/BasicUtils -pkgpythondir = @pkgpythondir@/BasicUtils +pkgpyexecdir = @pkgpyexecdir@/display +pkgpythondir = @pkgpythondir@/display dist_pkgdata_DATA = diff --git a/src/BasicUtils/__init__.py b/src/gen/display/__init__.py similarity index 93% rename from src/BasicUtils/__init__.py rename to src/gen/display/__init__.py index b8e1cdbd1..f3bded9ef 100644 --- a/src/BasicUtils/__init__.py +++ b/src/gen/display/__init__.py @@ -2,6 +2,7 @@ # Gramps - a GTK+/GNOME based genealogy program # # 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 # it under the terms of the GNU General Public License as published by @@ -20,4 +21,3 @@ # $Id: __init__.py$ -from _NameDisplay import displayer as name_displayer diff --git a/src/BasicUtils/_NameDisplay.py b/src/gen/display/name.py similarity index 97% rename from src/BasicUtils/_NameDisplay.py rename to src/gen/display/name.py index e40f2506e..8cbf3cf06 100644 --- a/src/BasicUtils/_NameDisplay.py +++ b/src/gen/display/name.py @@ -2,6 +2,7 @@ # Gramps - a GTK+/GNOME based genealogy program # # 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 # 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 Errors import NameDisplayError try: 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: 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 @@ -94,11 +110,6 @@ class NameDisplay(object): 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 = [ (Name.DEF,_("Default format (defined by Gramps preferences)"),'',_ACT), (Name.LNFN,_("Surname, Given Patronymic"),'%p %l, %f %y %s',_ACT), diff --git a/src/gui/editors/displaytabs/backrefmodel.py b/src/gui/editors/displaytabs/backrefmodel.py index 18039b406..0870b32ba 100644 --- a/src/gui/editors/displaytabs/backrefmodel.py +++ b/src/gui/editors/displaytabs/backrefmodel.py @@ -35,7 +35,7 @@ from gettext import gettext as _ # GRAMPS classes # #------------------------------------------------------------------------- -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import Utils #------------------------------------------------------------------------- diff --git a/src/gui/editors/displaytabs/childmodel.py b/src/gui/editors/displaytabs/childmodel.py index a852a2a89..0731eb5f0 100644 --- a/src/gui/editors/displaytabs/childmodel.py +++ b/src/gui/editors/displaytabs/childmodel.py @@ -34,7 +34,7 @@ import cgi # #------------------------------------------------------------------------- import DateHandler -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import Utils import gen.lib from gen.utils import get_birth_or_fallback diff --git a/src/gui/editors/displaytabs/namemodel.py b/src/gui/editors/displaytabs/namemodel.py index 33e5f55cd..5bef1236c 100644 --- a/src/gui/editors/displaytabs/namemodel.py +++ b/src/gui/editors/displaytabs/namemodel.py @@ -41,7 +41,7 @@ from pango import WEIGHT_NORMAL, WEIGHT_BOLD # GRAMPS classes # #------------------------------------------------------------------------- -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer #------------------------------------------------------------------------- # diff --git a/src/gui/editors/displaytabs/personeventembedlist.py b/src/gui/editors/displaytabs/personeventembedlist.py index 048472e2d..076341529 100644 --- a/src/gui/editors/displaytabs/personeventembedlist.py +++ b/src/gui/editors/displaytabs/personeventembedlist.py @@ -34,7 +34,7 @@ from gettext import gettext as _ # #------------------------------------------------------------------------- import gen.lib -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from eventembedlist import EventEmbedList from eventrefmodel import EventRefModel diff --git a/src/gui/editors/displaytabs/personrefmodel.py b/src/gui/editors/displaytabs/personrefmodel.py index 49d10fa24..e9902b1e2 100644 --- a/src/gui/editors/displaytabs/personrefmodel.py +++ b/src/gui/editors/displaytabs/personrefmodel.py @@ -32,7 +32,7 @@ import gtk # GRAMPS classes # #------------------------------------------------------------------------- -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer #------------------------------------------------------------------------- # diff --git a/src/gui/editors/editchildref.py b/src/gui/editors/editchildref.py index 7989d8e7b..b9e9ec8c0 100644 --- a/src/gui/editors/editchildref.py +++ b/src/gui/editors/editchildref.py @@ -51,7 +51,7 @@ import Errors from glade import Glade from displaytabs import SourceEmbedList, NoteTab from gui.widgets import MonitoredDataType, PrivacyButton -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer #------------------------------------------------------------------------- # diff --git a/src/gui/editors/editfamily.py b/src/gui/editors/editfamily.py index 32f567f4f..37c69a23d 100644 --- a/src/gui/editors/editfamily.py +++ b/src/gui/editors/editfamily.py @@ -55,7 +55,7 @@ import pango #------------------------------------------------------------------------- import Utils import config -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import gen.lib import Errors import DateHandler diff --git a/src/gui/editors/editldsord.py b/src/gui/editors/editldsord.py index e2853f840..37ff7e391 100644 --- a/src/gui/editors/editldsord.py +++ b/src/gui/editors/editldsord.py @@ -45,7 +45,7 @@ import gtk # #------------------------------------------------------------------------- import gen.lib -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import LdsUtils from glade import Glade from editsecondary import EditSecondary diff --git a/src/gui/editors/editname.py b/src/gui/editors/editname.py index b96d0c0d8..154f722bf 100644 --- a/src/gui/editors/editname.py +++ b/src/gui/editors/editname.py @@ -41,7 +41,7 @@ import gtk # gramps modules # #------------------------------------------------------------------------- -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from editsecondary import EditSecondary from gen.lib import NoteType from displaytabs import GrampsTab,SourceEmbedList,NoteTab diff --git a/src/gui/editors/editperson.py b/src/gui/editors/editperson.py index f6b2fef07..3b5a01d3f 100644 --- a/src/gui/editors/editperson.py +++ b/src/gui/editors/editperson.py @@ -46,13 +46,11 @@ import gtk # gramps modules # #------------------------------------------------------------------------- -import const import Utils from gui.utils import add_menuitem, open_file_with_default_application -import Mime import gen.lib from gui import widgets -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import Errors from glade import Glade diff --git a/src/gui/editors/editpersonref.py b/src/gui/editors/editpersonref.py index 69b2456ef..ee774160f 100644 --- a/src/gui/editors/editpersonref.py +++ b/src/gui/editors/editpersonref.py @@ -45,7 +45,7 @@ import gtk # gramps modules # #------------------------------------------------------------------------- -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from editsecondary import EditSecondary from gen.lib import NoteType from gui.widgets import MonitoredEntry, PrivacyButton diff --git a/src/gui/editors/editprimary.py b/src/gui/editors/editprimary.py index 1818fa6e1..f5a677ec0 100644 --- a/src/gui/editors/editprimary.py +++ b/src/gui/editors/editprimary.py @@ -42,7 +42,7 @@ import gtk #------------------------------------------------------------------------- import ManagedWindow import DateHandler -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import config import GrampsDisplay from QuestionDialog import SaveDialog diff --git a/src/gui/viewmanager.py b/src/gui/viewmanager.py index b78a4c089..950dc1c76 100644 --- a/src/gui/viewmanager.py +++ b/src/gui/viewmanager.py @@ -71,7 +71,6 @@ import GrampsCfg import Errors from QuestionDialog import (ErrorDialog, WarningDialog, QuestionDialog2, InfoDialog) -from BasicUtils import name_displayer from gui import widgets import UndoHistory from gui.dbloader import DbLoader diff --git a/src/gui/views/navigationview.py b/src/gui/views/navigationview.py index 9f683a370..684fc0a84 100644 --- a/src/gui/views/navigationview.py +++ b/src/gui/views/navigationview.py @@ -219,7 +219,7 @@ class NavigationView(PageView): """ 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_person = self.dbstate.db.get_person_from_handle(active_handle) diff --git a/src/gui/views/treemodels/familymodel.py b/src/gui/views/treemodels/familymodel.py index aa51d6f87..c973a42d6 100644 --- a/src/gui/views/treemodels/familymodel.py +++ b/src/gui/views/treemodels/familymodel.py @@ -44,10 +44,9 @@ import const import ToolTips import GrampsLocale import DateHandler -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import gen.lib from gen.lib import EventRoleType -import gen.utils from gui.views.treemodels.flatbasemodel import FlatBaseModel diff --git a/src/gui/views/treemodels/peoplemodel.py b/src/gui/views/treemodels/peoplemodel.py index 8f005c063..0a0c61316 100644 --- a/src/gui/views/treemodels/peoplemodel.py +++ b/src/gui/views/treemodels/peoplemodel.py @@ -60,7 +60,7 @@ _LOG = logging.getLogger(".") #------------------------------------------------------------------------- import const 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 ToolTips import GrampsLocale diff --git a/src/plugins/BookReport.py b/src/plugins/BookReport.py index 61ee4f4b3..4e7a1304c 100644 --- a/src/plugins/BookReport.py +++ b/src/plugins/BookReport.py @@ -83,7 +83,7 @@ from ReportBase._DocReportDialog import DocReportDialog from ReportBase._CommandLineReport import CommandLineReport from ReportBase._ReportOptions import ReportOptions -from BasicUtils import name_displayer as _nd +from gen.display.name import displayer as _nd #------------------------------------------------------------------------ # diff --git a/src/plugins/Records.py b/src/plugins/Records.py index 650e8e72e..2f3f6b47a 100644 --- a/src/plugins/Records.py +++ b/src/plugins/Records.py @@ -34,10 +34,9 @@ from TransUtils import sgettext as _ # GRAMPS modules # #------------------------------------------------------------------------ -import gen.lib from gen.lib import ChildRefType, Date, Name 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.menu import (BooleanOption, EnumeratedListOption, FilterOption, PersonOption) diff --git a/src/plugins/drawreport/AncestorTree.py b/src/plugins/drawreport/AncestorTree.py index a55151d8d..1ecdf3a8e 100644 --- a/src/plugins/drawreport/AncestorTree.py +++ b/src/plugins/drawreport/AncestorTree.py @@ -35,7 +35,7 @@ from TransUtils import sgettext as _ # GRAMPS modules # #------------------------------------------------------------------------ -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from Errors import ReportError from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle, FONT_SANS_SERIF, PARA_ALIGN_CENTER) diff --git a/src/plugins/drawreport/Calendar.py b/src/plugins/drawreport/Calendar.py index df6532b65..6f6438cb3 100644 --- a/src/plugins/drawreport/Calendar.py +++ b/src/plugins/drawreport/Calendar.py @@ -34,7 +34,7 @@ import time # GRAMPS modules # #------------------------------------------------------------------------ -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from Errors import ReportError import Relationship from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle, diff --git a/src/plugins/drawreport/DescendTree.py b/src/plugins/drawreport/DescendTree.py index c93cf692c..4ff060af0 100644 --- a/src/plugins/drawreport/DescendTree.py +++ b/src/plugins/drawreport/DescendTree.py @@ -29,7 +29,7 @@ # GRAMPS modules # #------------------------------------------------------------------------ -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from Errors import ReportError from gen.plug.docgen import (GraphicsStyle, FontStyle, ParagraphStyle, FONT_SANS_SERIF, PARA_ALIGN_CENTER) diff --git a/src/plugins/drawreport/TimeLine.py b/src/plugins/drawreport/TimeLine.py index d3dc1f887..ed697ce3b 100644 --- a/src/plugins/drawreport/TimeLine.py +++ b/src/plugins/drawreport/TimeLine.py @@ -44,8 +44,7 @@ from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle, FONT_SANS_SERIF, DASHED, PARA_ALIGN_CENTER) import Sort from QuestionDialog import ErrorDialog -from BasicUtils import name_displayer -from Utils import probably_alive +from gen.display.name import displayer as name_displayer from gui.utils import ProgressMeter import config from gen.utils import get_birth_or_fallback, get_death_or_fallback diff --git a/src/plugins/gramplet/AttributesGramplet.py b/src/plugins/gramplet/AttributesGramplet.py index e8cc59d12..e79b80596 100644 --- a/src/plugins/gramplet/AttributesGramplet.py +++ b/src/plugins/gramplet/AttributesGramplet.py @@ -20,7 +20,7 @@ # from gen.plug import Gramplet -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from gettext import gettext as _ class AttributesGramplet(Gramplet): diff --git a/src/plugins/gramplet/DescendGramplet.py b/src/plugins/gramplet/DescendGramplet.py index 1d37038a4..e9bf4893a 100644 --- a/src/plugins/gramplet/DescendGramplet.py +++ b/src/plugins/gramplet/DescendGramplet.py @@ -38,7 +38,7 @@ from gettext import gettext as _ #------------------------------------------------------------------------ from gen.plug import Gramplet from ReportBase import ReportUtils -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import DateHandler from gen.utils import get_birth_or_fallback, get_death_or_fallback diff --git a/src/plugins/gramplet/FanChartGramplet.py b/src/plugins/gramplet/FanChartGramplet.py index 2f798fd7f..a3da00b17 100644 --- a/src/plugins/gramplet/FanChartGramplet.py +++ b/src/plugins/gramplet/FanChartGramplet.py @@ -52,14 +52,14 @@ if gtk.pygtk_version < (2,3,93): # GRAMPS modules # #------------------------------------------------------------------------- -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from gettext import gettext as _ from gen.plug import Gramplet from Utils import (find_children, find_parents, find_witnessed_people) from libformatting import FormattingHelper import gen.lib import Errors -from gui.editors import EditPerson, EditFamily +from gui.editors import EditPerson #------------------------------------------------------------------------- # diff --git a/src/plugins/gramplet/PedigreeGramplet.py b/src/plugins/gramplet/PedigreeGramplet.py index 5f2d28cfe..578f7c6b8 100644 --- a/src/plugins/gramplet/PedigreeGramplet.py +++ b/src/plugins/gramplet/PedigreeGramplet.py @@ -35,7 +35,7 @@ import locale from gen.plug import Gramplet from TransUtils import sgettext as _ from gettext import ngettext -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import DateHandler import gen from gen.utils import get_birth_or_fallback, get_death_or_fallback diff --git a/src/plugins/gramplet/RelativeGramplet.py b/src/plugins/gramplet/RelativeGramplet.py index ad7cc08e6..590d5c313 100644 --- a/src/plugins/gramplet/RelativeGramplet.py +++ b/src/plugins/gramplet/RelativeGramplet.py @@ -25,7 +25,7 @@ #------------------------------------------------------------------------ from gen.plug import Gramplet from TransUtils import sgettext as _ -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer #------------------------------------------------------------------------ # diff --git a/src/plugins/gramplet/SessionLogGramplet.py b/src/plugins/gramplet/SessionLogGramplet.py index 44aa6f898..e2599e15c 100644 --- a/src/plugins/gramplet/SessionLogGramplet.py +++ b/src/plugins/gramplet/SessionLogGramplet.py @@ -25,7 +25,7 @@ #------------------------------------------------------------------------ from gen.plug import Gramplet from TransUtils import sgettext as _ -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer #------------------------------------------------------------------------ # diff --git a/src/plugins/gramplet/WhatsNext.py b/src/plugins/gramplet/WhatsNext.py index 45497e1b3..1b419ff81 100644 --- a/src/plugins/gramplet/WhatsNext.py +++ b/src/plugins/gramplet/WhatsNext.py @@ -28,7 +28,7 @@ #------------------------------------------------------------------------ from gen.lib import EventType, FamilyRelType, MarkerType from gen.plug import Gramplet -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from ReportBase import ReportUtils from TransUtils import sgettext as _ diff --git a/src/plugins/graph/GVHourGlass.py b/src/plugins/graph/GVHourGlass.py index a97d090af..b5a827cec 100644 --- a/src/plugins/graph/GVHourGlass.py +++ b/src/plugins/graph/GVHourGlass.py @@ -37,7 +37,7 @@ from gettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------ -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from Errors import ReportError from gen.plug.menu import (PersonOption, BooleanOption, NumberOption, EnumeratedListOption) diff --git a/src/plugins/graph/GVRelGraph.py b/src/plugins/graph/GVRelGraph.py index c4faa0d4b..332e5aeec 100644 --- a/src/plugins/graph/GVRelGraph.py +++ b/src/plugins/graph/GVRelGraph.py @@ -48,7 +48,7 @@ from TransUtils import sgettext as _ from gen.plug.menu import BooleanOption, EnumeratedListOption, FilterOption, \ PersonOption, ColorOption from ReportBase import Report, ReportUtils, MenuReportOptions -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import DateHandler import gen.lib import Utils diff --git a/src/plugins/import/ImportGrdb.py b/src/plugins/import/ImportGrdb.py index 0418c1291..7ec0b778b 100644 --- a/src/plugins/import/ImportGrdb.py +++ b/src/plugins/import/ImportGrdb.py @@ -48,7 +48,7 @@ __LOG = logging.getLogger(".Db") from gen.lib import (GenderStats, Source, Person, Family, Event, Place, MediaObject, Repository, Note, Attribute, AttributeType, 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 gen.db.txn import DbTxn as Transaction from gen.db.cursor import GrampsCursor @@ -58,7 +58,7 @@ import const from QuestionDialog import ErrorDialog from Errors import HandleError from gen.updatecallback import UpdateCallback -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer #------------------------------------------------------------------------- # diff --git a/src/plugins/import/ImportXml.py b/src/plugins/import/ImportXml.py index a493ca836..fe67cfe0d 100644 --- a/src/plugins/import/ImportXml.py +++ b/src/plugins/import/ImportXml.py @@ -42,7 +42,7 @@ import Mime import gen.lib import Utils 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, MEDIA_KEY, PLACE_KEY, REPOSITORY_KEY, NOTE_KEY) from gen.updatecallback import UpdateCallback diff --git a/src/plugins/lib/libformatting.py b/src/plugins/lib/libformatting.py index f503a1b28..f21d7273a 100644 --- a/src/plugins/lib/libformatting.py +++ b/src/plugins/lib/libformatting.py @@ -39,7 +39,7 @@ from cgi import escape #------------------------------------------------------------------------- import gen.lib 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 #------------------------------------------------------------------------- diff --git a/src/plugins/lib/libnarrate.py b/src/plugins/lib/libnarrate.py index e32aea004..705871bd6 100644 --- a/src/plugins/lib/libnarrate.py +++ b/src/plugins/lib/libnarrate.py @@ -34,7 +34,7 @@ from gen.lib.person import Person from gen.lib.eventroletype import EventRoleType from gen.lib.eventtype import EventType from gen.lib.familyreltype import FamilyRelType -from BasicUtils import name_displayer as _nd +from gen.display.name import displayer as _nd import Utils from ReportBase import ReportUtils from libtranslate import Translator diff --git a/src/plugins/textreport/AncestorReport.py b/src/plugins/textreport/AncestorReport.py index 011f72537..805859a81 100644 --- a/src/plugins/textreport/AncestorReport.py +++ b/src/plugins/textreport/AncestorReport.py @@ -36,7 +36,7 @@ from gettext import gettext as _ # gramps modules # #------------------------------------------------------------------------ -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from Errors import ReportError from gen.lib import ChildRefType from gen.plug.menu import BooleanOption, NumberOption, PersonOption, \ diff --git a/src/plugins/textreport/BirthdayReport.py b/src/plugins/textreport/BirthdayReport.py index 8f85e3cad..77061e063 100644 --- a/src/plugins/textreport/BirthdayReport.py +++ b/src/plugins/textreport/BirthdayReport.py @@ -35,7 +35,7 @@ import datetime, time # GRAMPS modules # #------------------------------------------------------------------------ -from BasicUtils import name_displayer as _nd +from gen.display.name import displayer as _nd from Errors import ReportError from gen.lib import NameType, EventType, Name, Date, Person import Relationship diff --git a/src/plugins/textreport/DescendReport.py b/src/plugins/textreport/DescendReport.py index b2dcd3bb3..8462f7c44 100644 --- a/src/plugins/textreport/DescendReport.py +++ b/src/plugins/textreport/DescendReport.py @@ -41,7 +41,7 @@ from gettext import gettext as _ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, FONT_SANS_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER) 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 ReportBase import Report, ReportUtils, MenuReportOptions import DateHandler diff --git a/src/plugins/textreport/DetAncestralReport.py b/src/plugins/textreport/DetAncestralReport.py index d62f8e46b..63b4725bc 100644 --- a/src/plugins/textreport/DetAncestralReport.py +++ b/src/plugins/textreport/DetAncestralReport.py @@ -38,7 +38,7 @@ from gettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------ -from BasicUtils import name_displayer as _nd +from gen.display.name import displayer as _nd from Errors import ReportError from gen.lib import EventType, FamilyRelType, Person from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, diff --git a/src/plugins/textreport/DetDescendantReport.py b/src/plugins/textreport/DetDescendantReport.py index 5cb426843..7f120fa29 100644 --- a/src/plugins/textreport/DetDescendantReport.py +++ b/src/plugins/textreport/DetDescendantReport.py @@ -39,7 +39,7 @@ from gettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------ -from BasicUtils import name_displayer as _nd +from gen.display.name import displayer as _nd from Errors import ReportError from gen.lib import FamilyRelType, Person from gen.plug.menu import (BooleanOption, NumberOption, PersonOption, diff --git a/src/plugins/textreport/EndOfLineReport.py b/src/plugins/textreport/EndOfLineReport.py index 5a4a395e4..d31a786ca 100644 --- a/src/plugins/textreport/EndOfLineReport.py +++ b/src/plugins/textreport/EndOfLineReport.py @@ -34,7 +34,7 @@ from gettext import gettext as _ # gramps modules # #------------------------------------------------------------------------ -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from Errors import ReportError from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle, TableCellStyle, FONT_SANS_SERIF, INDEX_TYPE_TOC, diff --git a/src/plugins/textreport/FamilyGroup.py b/src/plugins/textreport/FamilyGroup.py index 8d86694e4..9d2a744b3 100644 --- a/src/plugins/textreport/FamilyGroup.py +++ b/src/plugins/textreport/FamilyGroup.py @@ -36,7 +36,7 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle, INDEX_TYPE_TOC, PARA_ALIGN_CENTER) import DateHandler from TransUtils import sgettext as _ -from BasicUtils import name_displayer as _nd +from gen.display.name import displayer as _nd #------------------------------------------------------------------------ # diff --git a/src/plugins/textreport/IndivComplete.py b/src/plugins/textreport/IndivComplete.py index 6fd5cf205..d8fdfa88b 100644 --- a/src/plugins/textreport/IndivComplete.py +++ b/src/plugins/textreport/IndivComplete.py @@ -46,7 +46,7 @@ from gen.plug.menu import BooleanOption, FilterOption, PersonOption, \ BooleanListOption from ReportBase import Report, ReportUtils, MenuReportOptions 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 QuestionDialog import WarningDialog diff --git a/src/plugins/textreport/KinshipReport.py b/src/plugins/textreport/KinshipReport.py index 43af955a8..82552d7e8 100644 --- a/src/plugins/textreport/KinshipReport.py +++ b/src/plugins/textreport/KinshipReport.py @@ -36,7 +36,7 @@ from gettext import gettext as _ # gramps modules # #------------------------------------------------------------------------ -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from Errors import ReportError import Relationship from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, diff --git a/src/plugins/textreport/MarkerReport.py b/src/plugins/textreport/MarkerReport.py index 4dc5d13eb..95312bb98 100644 --- a/src/plugins/textreport/MarkerReport.py +++ b/src/plugins/textreport/MarkerReport.py @@ -42,7 +42,7 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, INDEX_TYPE_TOC, PARA_ALIGN_CENTER) from gen.lib import MarkerType from Filters import GenericFilterFactory, Rules -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import DateHandler #------------------------------------------------------------------------ diff --git a/src/plugins/textreport/NumberOfAncestorsReport.py b/src/plugins/textreport/NumberOfAncestorsReport.py index 5d69719c7..11be8197a 100644 --- a/src/plugins/textreport/NumberOfAncestorsReport.py +++ b/src/plugins/textreport/NumberOfAncestorsReport.py @@ -40,7 +40,7 @@ import math # GRAMPS modules # #------------------------------------------------------------------------ -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from Errors import ReportError from gen.plug.menu import PersonOption from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, diff --git a/src/plugins/textreport/PlaceReport.py b/src/plugins/textreport/PlaceReport.py index e08a8c676..c1e86e5af 100644 --- a/src/plugins/textreport/PlaceReport.py +++ b/src/plugins/textreport/PlaceReport.py @@ -41,7 +41,7 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, TableStyle, INDEX_TYPE_TOC, PARA_ALIGN_CENTER) import DateHandler import Sort -from BasicUtils import name_displayer as _nd +from gen.display.name import displayer as _nd class PlaceReport(Report): """ diff --git a/src/plugins/tool/CalculateEstimatedDates.py b/src/plugins/tool/CalculateEstimatedDates.py index f88a5123c..2b063a319 100644 --- a/src/plugins/tool/CalculateEstimatedDates.py +++ b/src/plugins/tool/CalculateEstimatedDates.py @@ -42,7 +42,7 @@ from gen.plug.menu import BooleanOption, NumberOption, StringOption, \ FilterOption, PersonOption, EnumeratedListOption import gen.lib import config -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import Errors from ReportBase import ReportUtils from docgen import TextBufDoc diff --git a/src/plugins/tool/Check.py b/src/plugins/tool/Check.py index 5714bb5e7..b5fdc7d39 100644 --- a/src/plugins/tool/Check.py +++ b/src/plugins/tool/Check.py @@ -58,12 +58,11 @@ import gtk import gen.lib import Utils from gui.utils import ProgressMeter -#import const import ManagedWindow from PluginUtils import Tool from QuestionDialog import OkDialog, MissingMediaDialog -from BasicUtils import name_displayer as _nd +from gen.display.name import displayer as _nd from glade import Glade #------------------------------------------------------------------------- diff --git a/src/plugins/tool/Desbrowser.py b/src/plugins/tool/Desbrowser.py index 7ecef8b47..012d37ccd 100644 --- a/src/plugins/tool/Desbrowser.py +++ b/src/plugins/tool/Desbrowser.py @@ -36,7 +36,7 @@ import gtk # #------------------------------------------------------------------------ import const -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from PluginUtils import Tool import GrampsDisplay import ManagedWindow diff --git a/src/plugins/tool/EventNames.py b/src/plugins/tool/EventNames.py index be8d0d6e0..0933b55ae 100644 --- a/src/plugins/tool/EventNames.py +++ b/src/plugins/tool/EventNames.py @@ -47,7 +47,7 @@ import gen.lib import Utils from PluginUtils import Tool -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from QuestionDialog import OkDialog #------------------------------------------------------------------------- diff --git a/src/plugins/tool/FindDupes.py b/src/plugins/tool/FindDupes.py index 867bd12a4..d00989b61 100644 --- a/src/plugins/tool/FindDupes.py +++ b/src/plugins/tool/FindDupes.py @@ -39,7 +39,7 @@ import const import gen.lib from gui.utils import ProgressMeter import soundex -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from QuestionDialog import OkDialog import ListModel import Errors @@ -47,7 +47,7 @@ from Merge import PersonCompare import GrampsDisplay import ManagedWindow from PluginUtils import Tool -from QuestionDialog import ErrorDialog, RunDatabaseRepair +from QuestionDialog import RunDatabaseRepair from TransUtils import sgettext as _ from glade import Glade diff --git a/src/plugins/tool/RelCalc.py b/src/plugins/tool/RelCalc.py index f1690c90d..09347c3ae 100644 --- a/src/plugins/tool/RelCalc.py +++ b/src/plugins/tool/RelCalc.py @@ -42,7 +42,7 @@ import gtk # GRAMPS modules # #------------------------------------------------------------------------- -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer import ManagedWindow from gui.views.treemodels import PeopleModel import Relationship diff --git a/src/plugins/view/fanchartview.py b/src/plugins/view/fanchartview.py index f66cfd09b..f88907da8 100644 --- a/src/plugins/view/fanchartview.py +++ b/src/plugins/view/fanchartview.py @@ -53,14 +53,14 @@ if gtk.pygtk_version < (2,3,93): # 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 libformatting import FormattingHelper import gen.lib from gui.views.navigationview import NavigationView import Errors import Bookmarks -from gui.editors import EditPerson, EditFamily +from gui.editors import EditPerson #------------------------------------------------------------------------- # diff --git a/src/plugins/view/geoview.py b/src/plugins/view/geoview.py index 05b1c88b6..62f24dcc7 100644 --- a/src/plugins/view/geoview.py +++ b/src/plugins/view/geoview.py @@ -64,7 +64,7 @@ import config import Errors from gui.utils import add_menuitem 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 gui.views.pageview import PageView from gui.editors import EditPlace diff --git a/src/plugins/view/pedigreeview.py b/src/plugins/view/pedigreeview.py index 130625e8a..04b48417b 100644 --- a/src/plugins/view/pedigreeview.py +++ b/src/plugins/view/pedigreeview.py @@ -52,14 +52,12 @@ except: #------------------------------------------------------------------------- import gen.lib 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, find_parents, find_witnessed_people) from libformatting import FormattingHelper -import DateHandler import ThumbNails import Errors -from ReportBase import ReportUtils from gui.editors import EditPerson, EditFamily from DdTargets import DdTargets import cPickle as pickle diff --git a/src/plugins/view/pedigreeviewext.py b/src/plugins/view/pedigreeviewext.py index 624056341..04756d142 100644 --- a/src/plugins/view/pedigreeviewext.py +++ b/src/plugins/view/pedigreeviewext.py @@ -53,7 +53,7 @@ except: #------------------------------------------------------------------------- import gen.lib 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, find_parents, find_witnessed_people) from libformatting import FormattingHelper diff --git a/src/plugins/view/personview.py b/src/plugins/view/personview.py index d6b9d379d..ab92b56b5 100644 --- a/src/plugins/view/personview.py +++ b/src/plugins/view/personview.py @@ -49,7 +49,7 @@ import gen.lib from gui.views.listview import ListView, LISTTREE from gui.views.treemodels import PeopleModel import Utils -from BasicUtils import name_displayer +from gen.display.name import displayer as name_displayer from QuestionDialog import ErrorDialog, QuestionDialog import Errors import Bookmarks diff --git a/src/plugins/view/relview.py b/src/plugins/view/relview.py index 09f90155f..c01f344de 100644 --- a/src/plugins/view/relview.py +++ b/src/plugins/view/relview.py @@ -49,7 +49,7 @@ import pango import gen.lib from gui.views.navigationview import NavigationView 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 import DateHandler import ThumbNails diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 50d74e362..a264034a5 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -94,11 +94,9 @@ import ThumbNails import ImgManip import Mime 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 parser as _dp from gen.proxy import PrivateProxyDb, LivingProxyDb -from gen.lib.eventroletype import EventRoleType from libhtmlconst import _CHARACTER_SETS, _CC, _COPY_OPTIONS # import HTML Class from diff --git a/src/plugins/webreport/WebCal.py b/src/plugins/webreport/WebCal.py index 67524989f..353516a74 100644 --- a/src/plugins/webreport/WebCal.py +++ b/src/plugins/webreport/WebCal.py @@ -65,7 +65,7 @@ from Utils import probably_alive, xml_lang, get_researcher from gui.utils import ProgressMeter from DateHandler import displayer as _dd -from BasicUtils import name_displayer as _nd +from gen.display.name import displayer as _nd import libholiday from libhtml import Html