* src/DbPrompter.py: Close database in all cases; close dialogs
prior to that. svn: r5359
This commit is contained in:
parent
b541a4eb06
commit
9d9ad5d4fe
@ -1,3 +1,7 @@
|
|||||||
|
2005-11-02 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/DbPrompter.py: Close database in all cases; close dialogs
|
||||||
|
prior to that.
|
||||||
|
|
||||||
2005-11-02 Don Allingham <don@gramps-project.org>
|
2005-11-02 Don Allingham <don@gramps-project.org>
|
||||||
* src/plugins/NavWebPage.py: fix surnames/surnames_count problem,
|
* src/plugins/NavWebPage.py: fix surnames/surnames_count problem,
|
||||||
fix intro/home page naming issue
|
fix intro/home page naming issue
|
||||||
|
@ -392,7 +392,7 @@ class NewNativeDbPrompter:
|
|||||||
filename = filename + ".grdb"
|
filename = filename + ".grdb"
|
||||||
choose.destroy()
|
choose.destroy()
|
||||||
try:
|
try:
|
||||||
self.parent.db.close()
|
close(self.parent)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
self.parent.db = GrampsBSDDB.GrampsBSDDB()
|
self.parent.db = GrampsBSDDB.GrampsBSDDB()
|
||||||
@ -483,15 +483,15 @@ class NewSaveasDbPrompter:
|
|||||||
return False
|
return False
|
||||||
if filetype == const.app_gramps:
|
if filetype == const.app_gramps:
|
||||||
WriteGrdb.exportData(self.parent.db,filename,None,None)
|
WriteGrdb.exportData(self.parent.db,filename,None,None)
|
||||||
self.parent.db.close()
|
close(self.parent)
|
||||||
self.parent.db = GrampsBSDDB.GrampsBSDDB()
|
self.parent.db = GrampsBSDDB.GrampsBSDDB()
|
||||||
elif filetype == const.app_gramps_xml:
|
elif filetype == const.app_gramps_xml:
|
||||||
WriteXML.exportData(self.parent.db,filename,None,None)
|
WriteXML.exportData(self.parent.db,filename,None,None)
|
||||||
self.parent.db.close()
|
close(self.parent)
|
||||||
self.parent.db = GrampsXMLDB.GrampsXMLDB()
|
self.parent.db = GrampsXMLDB.GrampsXMLDB()
|
||||||
elif filetype == const.app_gedcom:
|
elif filetype == const.app_gedcom:
|
||||||
WriteGedcom.exportData(self.parent.db,filename,None,None)
|
WriteGedcom.exportData(self.parent.db,filename,None,None)
|
||||||
self.parent.db.close()
|
close(self.parent)
|
||||||
self.parent.db = GrampsGEDDB.GrampsGEDDB()
|
self.parent.db = GrampsGEDDB.GrampsGEDDB()
|
||||||
self.parent.read_file(filename)
|
self.parent.read_file(filename)
|
||||||
# Add the file to the recent items
|
# Add the file to the recent items
|
||||||
@ -506,14 +506,22 @@ class NewSaveasDbPrompter:
|
|||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Helper function
|
# Helper functions
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
def close(parent):
|
||||||
|
# Close existing dialogs
|
||||||
|
for window in parent.child_windows.values():
|
||||||
|
window.close()
|
||||||
|
parent.db.close()
|
||||||
|
|
||||||
def open_native(parent,filename,filetype):
|
def open_native(parent,filename,filetype):
|
||||||
"""
|
"""
|
||||||
Open native database and return the status.
|
Open native database and return the status.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
close(parent)
|
||||||
|
|
||||||
(the_path,the_file) = os.path.split(filename)
|
(the_path,the_file) = os.path.split(filename)
|
||||||
GrampsKeys.save_last_import_dir(the_path)
|
GrampsKeys.save_last_import_dir(the_path)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user