Family Tree Manager: rearrange dialogs to handle cancel
This commit is contained in:
parent
33f8aa4d3d
commit
7368bc7127
@ -740,22 +740,22 @@ class DbManager(CLIDbManager):
|
|||||||
store, node = self.selection.get_selected()
|
store, node = self.selection.get_selected()
|
||||||
name = store[node][0]
|
name = store[node][0]
|
||||||
dirname = store[node][1]
|
dirname = store[node][1]
|
||||||
db = self.dbstate.open_database(name)
|
|
||||||
if db:
|
|
||||||
QuestionDialog(
|
QuestionDialog(
|
||||||
_("Convert the '%s' database?") % name,
|
_("Convert the '%s' database?") % name,
|
||||||
_("You wish to convert this database into the new DB-API format?"),
|
_("You wish to convert this database into the new DB-API format?"),
|
||||||
_("Convert"),
|
_("Convert"),
|
||||||
lambda: self.__convert_db(name, dirname, db), self.top)
|
lambda: self.__convert_db(name, dirname), self.top)
|
||||||
else:
|
|
||||||
ErrorDialog(
|
|
||||||
_("Opening the '%s' database") % name,
|
|
||||||
_("An attempt to open the database failed."))
|
|
||||||
|
|
||||||
def __convert_db(self, name, dirname, db):
|
def __convert_db(self, name, dirname):
|
||||||
"""
|
"""
|
||||||
Actually convert the db from BSDDB to DB-API.
|
Actually convert the db from BSDDB to DB-API.
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
|
db = self.dbstate.open_database(name)
|
||||||
|
except:
|
||||||
|
ErrorDialog(
|
||||||
|
_("Opening the '%s' database") % name,
|
||||||
|
_("An attempt to convert the database failed. Perhaps it needs updating."))
|
||||||
plugin_manager = GuiPluginManager.get_instance()
|
plugin_manager = GuiPluginManager.get_instance()
|
||||||
export_function = None
|
export_function = None
|
||||||
for plugin in plugin_manager.get_export_plugins():
|
for plugin in plugin_manager.get_export_plugins():
|
||||||
|
Loading…
Reference in New Issue
Block a user