From 8c0395ef780636a420b79eb9b7919b4d050e3dd0 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 4 Jul 2010 23:19:57 +0200 Subject: [PATCH] quit fpdb automatically after re-create. ppl tend to ignore msgboxes ;) --- pyfpdb/fpdb.pyw | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pyfpdb/fpdb.pyw b/pyfpdb/fpdb.pyw index 4248727a..3ab6d601 100755 --- a/pyfpdb/fpdb.pyw +++ b/pyfpdb/fpdb.pyw @@ -416,21 +416,24 @@ class fpdb: # self.release_global_lock() # lock_released = True self.db.recreate_tables() + self.release_global_lock() #else: # for other dbs use same connection as holds global lock # self.fdb_lock.fdb.recreate_tables() # TODO: figure out why this seems to be necessary dia_restart = gtk.MessageDialog(parent=self.window, flags=0, type=gtk.MESSAGE_WARNING, buttons=(gtk.BUTTONS_OK), message_format="Restart fpdb") - diastring = "You should now restart fpdb." + diastring = "Fpdb now needs to close. Please restart it." dia_restart.format_secondary_text(diastring) dia_restart.run() dia_restart.destroy() + self.quit(None, None) elif response == gtk.RESPONSE_NO: + self.release_global_lock() print 'User cancelled recreating tables' #if not lock_released: - self.release_global_lock() + #end def dia_recreate_tables def dia_recreate_hudcache(self, widget, data=None): if self.obtain_global_lock():