quit fpdb automatically after re-create. ppl tend to ignore msgboxes ;)
This commit is contained in:
parent
dafd60fd58
commit
8c0395ef78
|
@ -416,21 +416,24 @@ class fpdb:
|
||||||
# self.release_global_lock()
|
# self.release_global_lock()
|
||||||
# lock_released = True
|
# lock_released = True
|
||||||
self.db.recreate_tables()
|
self.db.recreate_tables()
|
||||||
|
self.release_global_lock()
|
||||||
#else:
|
#else:
|
||||||
# for other dbs use same connection as holds global lock
|
# for other dbs use same connection as holds global lock
|
||||||
# self.fdb_lock.fdb.recreate_tables()
|
# self.fdb_lock.fdb.recreate_tables()
|
||||||
# TODO: figure out why this seems to be necessary
|
# TODO: figure out why this seems to be necessary
|
||||||
dia_restart = gtk.MessageDialog(parent=self.window, flags=0, type=gtk.MESSAGE_WARNING,
|
dia_restart = gtk.MessageDialog(parent=self.window, flags=0, type=gtk.MESSAGE_WARNING,
|
||||||
buttons=(gtk.BUTTONS_OK), message_format="Restart fpdb")
|
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.format_secondary_text(diastring)
|
||||||
|
|
||||||
dia_restart.run()
|
dia_restart.run()
|
||||||
dia_restart.destroy()
|
dia_restart.destroy()
|
||||||
|
self.quit(None, None)
|
||||||
elif response == gtk.RESPONSE_NO:
|
elif response == gtk.RESPONSE_NO:
|
||||||
|
self.release_global_lock()
|
||||||
print 'User cancelled recreating tables'
|
print 'User cancelled recreating tables'
|
||||||
#if not lock_released:
|
#if not lock_released:
|
||||||
self.release_global_lock()
|
#end def dia_recreate_tables
|
||||||
|
|
||||||
def dia_recreate_hudcache(self, widget, data=None):
|
def dia_recreate_hudcache(self, widget, data=None):
|
||||||
if self.obtain_global_lock():
|
if self.obtain_global_lock():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user