* src/gramps_main.py (on_new_clicked): Do not prematurely close db.

* src/DbPrompter.py (NewNativeDbPrompter.chooser): Close old db
if positively opening a new one.


svn: r4082
This commit is contained in:
Alex Roitman 2005-02-23 04:46:51 +00:00
parent 81a41b3d9a
commit ff349b36e4
3 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,10 @@
* src/Exporter.py (native_export): Use real export. * src/Exporter.py (native_export): Use real export.
* src/WriteGrdb.py (exportData): Provide default cl value. * src/WriteGrdb.py (exportData): Provide default cl value.
* src/gramps_main.py (on_new_clicked): Do not prematurely close db.
* src/DbPrompter.py (NewNativeDbPrompter.chooser): Close old db
if positively opening a new one.
2005-02-21 Don Allingham <dallingham@users.sourceforge.net> 2005-02-21 Don Allingham <dallingham@users.sourceforge.net>
* Release: Version 1.1.90 "Successful encyclopedia salesman" released. * Release: Version 1.1.90 "Successful encyclopedia salesman" released.

View File

@ -365,6 +365,7 @@ class NewNativeDbPrompter:
if os.path.splitext(filename)[1] != ".grdb": if os.path.splitext(filename)[1] != ".grdb":
filename = filename + ".grdb" filename = filename + ".grdb"
choose.destroy() choose.destroy()
self.parent.db.close()
self.parent.db = GrampsBSDDB.GrampsBSDDB() self.parent.db = GrampsBSDDB.GrampsBSDDB()
self.parent.read_file(filename) self.parent.read_file(filename)
# Add the file to the recent items # Add the file to the recent items

View File

@ -977,7 +977,6 @@ class Gramps:
def on_new_clicked(self,obj): def on_new_clicked(self,obj):
"""Prompt for permission to close the current database""" """Prompt for permission to close the current database"""
self.db.close()
prompter = DbPrompter.NewNativeDbPrompter(self,self.topWindow) prompter = DbPrompter.NewNativeDbPrompter(self,self.topWindow)
prompter.chooser() prompter.chooser()