diff --git a/configure.in b/configure.in index 1f2db4257..1e56ea9df 100644 --- a/configure.in +++ b/configure.in @@ -130,6 +130,7 @@ src/gui/glade/Makefile src/gui/logger/Makefile src/gui/merge/Makefile src/gui/plug/Makefile +src/gui/plug/export/Makefile src/gui/plug/quick/Makefile src/gui/plug/report/Makefile src/gui/selectors/Makefile diff --git a/po/POTFILES.in b/po/POTFILES.in index f0fd97c43..4f07c4af1 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -3,8 +3,6 @@ # Python files # src/const.py -src/ExportAssistant.py -src/ExportOptions.py src/gramps.py src/LdsUtils.py src/PlaceUtils.py @@ -311,6 +309,10 @@ src/gen/plug/utils.py # gen docgen API src/gen/plug/docgen/graphdoc.py +# gen.plug.export package +src/gen/plug/export/_exportassistant.py +src/gen/plug/export/_exportoptions.py + # plugin report base API (was ReportBase) src/gen/plug/report/_constants.py src/gen/plug/report/_paper.py diff --git a/src/Makefile.am b/src/Makefile.am index aef582a5b..4123b7797 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,8 +17,6 @@ gdir_PYTHON = \ config.py\ const.py\ constfunc.py\ - ExportAssistant.py\ - ExportOptions.py\ gramps.py\ ImgManip.py\ LdsUtils.py \ diff --git a/src/gui/plug/Makefile.am b/src/gui/plug/Makefile.am index 6fd9364e1..00e2a7d83 100644 --- a/src/gui/plug/Makefile.am +++ b/src/gui/plug/Makefile.am @@ -5,6 +5,7 @@ # If not using GNU make, then list all .py files individually SUBDIRS = \ + export \ quick \ report diff --git a/src/gui/plug/export/Makefile.am b/src/gui/plug/export/Makefile.am new file mode 100644 index 000000000..f3f8a45f3 --- /dev/null +++ b/src/gui/plug/export/Makefile.am @@ -0,0 +1,20 @@ +# This is the src/gui/plug/export level Makefile for Gramps +# $Id$ + +pkgpythondir = $(datadir)/@PACKAGE@/gui/plug/export + +pkgpython_PYTHON = \ + __init__.py\ + _exportassistant.py\ + _exportoptions.py + +pkgpyexecdir = @pkgpyexecdir@/gui/plug/export + +# Clean up all the byte-compiled files +MOSTLYCLEANFILES = *pyc *pyo + +GRAMPS_PY_MODPATH = "../../../" + +pycheck: + (export PYTHONPATH=$(GRAMPS_PY_MODPATH); \ + pychecker $(pkgpython_PYTHON)); diff --git a/src/gui/plug/export/__init__.py b/src/gui/plug/export/__init__.py new file mode 100644 index 000000000..eba85d2a2 --- /dev/null +++ b/src/gui/plug/export/__init__.py @@ -0,0 +1,26 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2012 Nick Hall +# +# 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 +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +# $Id$ + +"Export Plugin Framework" + +from _exportassistant import ExportAssistant +from _exportoptions import WriterOptionBox diff --git a/src/ExportAssistant.py b/src/gui/plug/export/_exportassistant.py similarity index 100% rename from src/ExportAssistant.py rename to src/gui/plug/export/_exportassistant.py diff --git a/src/ExportOptions.py b/src/gui/plug/export/_exportoptions.py similarity index 100% rename from src/ExportOptions.py rename to src/gui/plug/export/_exportoptions.py diff --git a/src/gui/plug/quick/Makefile.am b/src/gui/plug/quick/Makefile.am index 8af43e455..ec397febd 100644 --- a/src/gui/plug/quick/Makefile.am +++ b/src/gui/plug/quick/Makefile.am @@ -1,5 +1,5 @@ # This is the src/gui/plug/quick level Makefile for Gramps -# $Id: Makefile.am 18851 2012-02-10 20:25:15Z josipsf $ +# $Id$ pkgpythondir = $(datadir)/@PACKAGE@/gui/plug/quick diff --git a/src/gui/viewmanager.py b/src/gui/viewmanager.py index 290946bf4..d5ea7703d 100644 --- a/src/gui/viewmanager.py +++ b/src/gui/viewmanager.py @@ -1707,9 +1707,9 @@ class ViewManager(CLIManager): Calls the ExportAssistant to export data """ if self.dbstate.db.db_is_open: - import ExportAssistant + from gui.plug.export import ExportAssistant try: - ExportAssistant.ExportAssistant(self.dbstate, self.uistate) + ExportAssistant(self.dbstate, self.uistate) except WindowActiveError: return diff --git a/src/plugins/export/ExportCsv.py b/src/plugins/export/ExportCsv.py index 6fd2ae2d3..948d285db 100644 --- a/src/plugins/export/ExportCsv.py +++ b/src/plugins/export/ExportCsv.py @@ -51,7 +51,7 @@ LOG = logging.getLogger(".ExportCSV") #------------------------------------------------------------------------- import gen.lib from gen.lib.eventroletype import EventRoleType -from ExportOptions import WriterOptionBox +from gui.plug.export import WriterOptionBox import Utils import gen.datehandler from gui.glade import Glade diff --git a/src/plugins/export/ExportFtree.py b/src/plugins/export/ExportFtree.py index bced2926b..d55860934 100644 --- a/src/plugins/export/ExportFtree.py +++ b/src/plugins/export/ExportFtree.py @@ -46,7 +46,7 @@ log = logging.getLogger(".WriteFtree") # #------------------------------------------------------------------------- import Utils -from ExportOptions import WriterOptionBox +from gui.plug.export import WriterOptionBox from gui.glade import Glade #------------------------------------------------------------------------- diff --git a/src/plugins/export/ExportGedcom.py b/src/plugins/export/ExportGedcom.py index 56f57c89b..8eea4c3c1 100644 --- a/src/plugins/export/ExportGedcom.py +++ b/src/plugins/export/ExportGedcom.py @@ -45,7 +45,7 @@ import gen.lib import const import libgedcom from gen.errors import DatabaseError -from ExportOptions import WriterOptionBox +from gui.plug.export import WriterOptionBox from gen.updatecallback import UpdateCallback from Utils import media_path_full from PlaceUtils import conv_lat_lon diff --git a/src/plugins/export/ExportGeneWeb.py b/src/plugins/export/ExportGeneWeb.py index 4138170cb..a63125e72 100644 --- a/src/plugins/export/ExportGeneWeb.py +++ b/src/plugins/export/ExportGeneWeb.py @@ -47,7 +47,7 @@ log = logging.getLogger(".WriteGeneWeb") # #------------------------------------------------------------------------- import gen.lib -from ExportOptions import WriterOptionBox +from gui.plug.export import WriterOptionBox #import const import Utils from gui.glade import Glade diff --git a/src/plugins/export/ExportPkg.py b/src/plugins/export/ExportPkg.py index 05165fbfd..f4fc505e1 100644 --- a/src/plugins/export/ExportPkg.py +++ b/src/plugins/export/ExportPkg.py @@ -59,7 +59,7 @@ import gtk # GRAMPS modules # #------------------------------------------------------------------------- -from ExportOptions import WriterOptionBox +from gui.plug.export import WriterOptionBox from ExportXml import XmlWriter import Utils import constfunc diff --git a/src/plugins/export/ExportVCalendar.py b/src/plugins/export/ExportVCalendar.py index 9dfc1e955..fa1e41219 100644 --- a/src/plugins/export/ExportVCalendar.py +++ b/src/plugins/export/ExportVCalendar.py @@ -47,7 +47,7 @@ log = logging.getLogger(".ExportVCal") # GRAMPS modules # #------------------------------------------------------------------------- -from ExportOptions import WriterOptionBox +from gui.plug.export import WriterOptionBox import Utils from gen.lib import Date, EventType from gui.glade import Glade diff --git a/src/plugins/export/ExportVCard.py b/src/plugins/export/ExportVCard.py index 44129466e..cb6adba25 100644 --- a/src/plugins/export/ExportVCard.py +++ b/src/plugins/export/ExportVCard.py @@ -47,7 +47,7 @@ log = logging.getLogger(".ExportVCard") # #------------------------------------------------------------------------- from gen.ggettext import gettext as _ -from ExportOptions import WriterOptionBox +from gui.plug.export import WriterOptionBox import const from gen.lib import Date from gen.lib.urltype import UrlType diff --git a/src/plugins/export/ExportXml.py b/src/plugins/export/ExportXml.py index dc133f6f0..a5afd5b71 100644 --- a/src/plugins/export/ExportXml.py +++ b/src/plugins/export/ExportXml.py @@ -62,7 +62,7 @@ from gen.updatecallback import UpdateCallback from gen.db.exceptions import DbWriteFailure import const import constfunc -from ExportOptions import WriterOptionBox +from gui.plug.export import WriterOptionBox import libgrampsxml #-------------------------------------------------------------------------