2007-06-22 Alex Roitman <shura@phy.ucsf.edu>
* src/GrampsDb/_GrampsGEDDB.py (close): Save after batch transactions: #862. * src/GrampsDb/_GrampsXMLDB.py (close): Save after batch transactions: #862. svn: r8630
This commit is contained in:
parent
dbdf2a2889
commit
1060e56243
@ -1,3 +1,9 @@
|
|||||||
|
2007-06-22 Alex Roitman <shura@phy.ucsf.edu>
|
||||||
|
* src/GrampsDb/_GrampsGEDDB.py (close): Save after batch
|
||||||
|
transactions: #862.
|
||||||
|
* src/GrampsDb/_GrampsXMLDB.py (close): Save after batch
|
||||||
|
transactions: #862.
|
||||||
|
|
||||||
2007-06-22 Brian Matherly <brian@gramps-project.org>
|
2007-06-22 Brian Matherly <brian@gramps-project.org>
|
||||||
* src/ReportBase/_ReportDialog.py: Still let REAL exceptions pass through.
|
* src/ReportBase/_ReportDialog.py: Still let REAL exceptions pass through.
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@ -60,6 +60,7 @@ class GrampsGEDDB(GrampsInMemDB):
|
|||||||
self.bookmarks = GrampsDbBookmarks(self.metadata.get('bookmarks',[]))
|
self.bookmarks = GrampsDbBookmarks(self.metadata.get('bookmarks',[]))
|
||||||
self.db_is_open = True
|
self.db_is_open = True
|
||||||
self.readonly = True
|
self.readonly = True
|
||||||
|
self.abort_possible = True
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def load_from(self, other_database, filename, callback):
|
def load_from(self, other_database, filename, callback):
|
||||||
@ -89,7 +90,8 @@ class GrampsGEDDB(GrampsInMemDB):
|
|||||||
log.warning("Failed to load Gedcom writer", exc_info=True)
|
log.warning("Failed to load Gedcom writer", exc_info=True)
|
||||||
raise GrampsDbException("Failed to load Gedcom writer")
|
raise GrampsDbException("Failed to load Gedcom writer")
|
||||||
|
|
||||||
if not self.readonly and len(self.undodb) > 0:
|
if (not self.readonly) and ((len(self.undodb)>0) or
|
||||||
|
not self.abort_possible):
|
||||||
writer = GedcomWriter(self,self.get_default_person())
|
writer = GedcomWriter(self,self.get_default_person())
|
||||||
writer.export_data(self.full_name)
|
writer.export_data(self.full_name)
|
||||||
self.db_is_open = False
|
self.db_is_open = False
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@ -69,6 +69,7 @@ class GrampsXMLDB(GrampsInMemDB):
|
|||||||
|
|
||||||
self.bookmarks.set(self.metadata.get('bookmarks',[]))
|
self.bookmarks.set(self.metadata.get('bookmarks',[]))
|
||||||
self.db_is_open = True
|
self.db_is_open = True
|
||||||
|
self.abort_possible = True
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
def load_from(self, other_database, filename, callback):
|
def load_from(self, other_database, filename, callback):
|
||||||
@ -96,7 +97,8 @@ class GrampsXMLDB(GrampsInMemDB):
|
|||||||
log.warning("Failed to load XML writer", exc_info=True)
|
log.warning("Failed to load XML writer", exc_info=True)
|
||||||
raise GrampsDbException("Failed to load XML writer")
|
raise GrampsDbException("Failed to load XML writer")
|
||||||
|
|
||||||
if not self.readonly and len(self.undodb) > 0:
|
if (not self.readonly) and ((len(self.undodb)>0) or
|
||||||
|
not self.abort_possible):
|
||||||
quick_write(self,self.full_name)
|
quick_write(self,self.full_name)
|
||||||
self.db_is_open = False
|
self.db_is_open = False
|
||||||
GrampsInMemDB.close(self)
|
GrampsInMemDB.close(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user