Implement stand-alone default DummyDb database including diagnostics

when used incorrectly
This commit is contained in:
kulath 2016-06-25 01:30:14 +01:00
parent 403f53cc57
commit f7203b5cd2
3 changed files with 1750 additions and 2 deletions

View File

@ -67,7 +67,7 @@ class DbState(Callback):
just a place holder until a real DB is assigned.
"""
Callback.__init__(self)
self.db = self.make_database("inmemorydb")
self.db = self.make_database("dummydb")
self.db.load(None)
self.db.db_is_open = False
self.open = False
@ -112,7 +112,7 @@ class DbState(Callback):
"""
self.emit('no-database', ())
self.db.close()
self.db = self.make_database("inmemorydb")
self.db = self.make_database("dummydb")
self.db.load(None)
self.db.db_is_open = False
self.open = False

View File

@ -0,0 +1,33 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2016 Tim G L Lyons
#
# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
register(DATABASE,
id = 'dummydb',
name = _("Dummy database"),
name_accell = _("Dummy Database"),
description = _("Dummy Database"),
version = '1.0.0',
gramps_target_version = "5.0",
status = STABLE,
fname = 'dummydb.py',
databaseclass = 'DummyDb',
authors=['Tim Lyons'],
authors_email=[""],
)

File diff suppressed because it is too large Load Diff