2007-09-05 Don Allingham <don@gramps-project.org>

* src/GrampsDb/_GrampsDbFactories.py: XML direct load not supported
	* src/GrampsDb/Makefile.am: remove installation of GrampsXMLDB.py
	* src/GrampsDbUtils/_WriteXML.py: cleanup



svn: r8929
This commit is contained in:
Don Allingham 2007-09-05 22:34:47 +00:00
parent 4821bc4dea
commit 4899980e4c
4 changed files with 17 additions and 33 deletions

View File

@ -1,3 +1,8 @@
2007-09-05 Don Allingham <don@gramps-project.org>
* src/GrampsDb/_GrampsDbFactories.py: XML direct load not supported
* src/GrampsDb/Makefile.am: remove installation of GrampsXMLDB.py
* src/GrampsDbUtils/_WriteXML.py: cleanup
2007-09-05 Zsolt Foldvari <zfoldvar@users.sourceforge.net>
* src/docgen/GtkPrint.py: Some work on graphical reports.

View File

@ -20,7 +20,6 @@ pkgdata_PYTHON = \
_GrampsDbWriteXML.py \
_GrampsGEDDB.py\
_GrampsInMemDB.py\
_GrampsXMLDB.py\
_HelperFunctions.py\
__init__.py\
_LongOpStatus.py\

View File

@ -64,9 +64,9 @@ def gramps_db_factory(db_type):
if db_type == const.app_gramps:
from _GrampsBSDDB import GrampsBSDDB
cls = GrampsBSDDB
elif db_type == const.app_gramps_xml:
from _GrampsXMLDB import GrampsXMLDB
cls = GrampsXMLDB
# elif db_type == const.app_gramps_xml:
# from _GrampsXMLDB import GrampsXMLDB
# cls = GrampsXMLDB
elif db_type == const.app_gedcom:
from _GrampsGEDDB import GrampsGEDDB
cls = GrampsGEDDB

View File

@ -32,14 +32,6 @@ GRAMPS' XML file format.
#-------------------------------------------------------------------------
from gettext import gettext as _
#------------------------------------------------------------------------
#
# Set up logging
#
#------------------------------------------------------------------------
import logging
log = logging.getLogger(".WriteXML")
#-------------------------------------------------------------------------
#
# load GRAMPS libraries
@ -48,9 +40,7 @@ log = logging.getLogger(".WriteXML")
import const
from QuestionDialog import ErrorDialog
from GrampsDb import GrampsDbXmlWriter, GrampsDbWriteFailure
from GrampsDb import exportData as _exportData
from GrampsDb import quick_write as _quick_write
import GrampsDb
import ExportOptions
#-------------------------------------------------------------------------
@ -59,40 +49,30 @@ import ExportOptions
#
#-------------------------------------------------------------------------
def exportData(database, filename, person, option_box, callback=None):
return _exportData(database, filename, person, option_box,
callback, const.version)
return GrampsDb.exportData(database, filename, person, option_box,
callback, const.version)
#-------------------------------------------------------------------------
#
#
# XmlWriter
#
#-------------------------------------------------------------------------
def quick_write(database, filename,callback=None,version=const.version):
return _quick_write(database, filename, version)
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
class XmlWriter(GrampsDbXmlWriter):
class XmlWriter(GramspDb.GrampsDbXmlWriter):
"""
Writes a database to the XML file.
"""
def __init__(self, db, callback, strip_photos, compress=1):
"""
"""
GrampsDbXmlWriter.__init__(self, db, strip_photos, compress,
const.version, callback)
GrampsDb.GrampsDbXmlWriter.__init__(self, db, strip_photos, compress,
const.version, callback)
def write(self,filename):
"""
Write the database to the specified file.
"""
try:
ret = GrampsDbXmlWriter.write(self, filename)
except GrampsDbWriteFailure, val:
ret = GramspDb.GrampsDbXmlWriter.write(self, filename)
except GrampsDb.GrampsDbWriteFailure, val:
ErrorDialog(val[0],val[1])
return ret