From aed767ef4b8bcd23226937abd4f4abf16f5b65ef Mon Sep 17 00:00:00 2001 From: steffen123 Date: Tue, 8 Jun 2010 04:33:27 +0200 Subject: [PATCH] add warning dialogue to restart after recreate as i encountered bugs under some circumstances if I didn't but it doesn't seem worth investigating --- pyfpdb/fpdb.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyfpdb/fpdb.py b/pyfpdb/fpdb.py index 3d9db3d7..29613d35 100755 --- a/pyfpdb/fpdb.py +++ b/pyfpdb/fpdb.py @@ -1,4 +1,5 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- #Copyright 2008 Steffen Jobbagy-Felso #This program is free software: you can redistribute it and/or modify @@ -412,6 +413,14 @@ class fpdb: #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=None, flags=0, type=gtk.MESSAGE_WARNING, + buttons=(gtk.BUTTONS_OK), message_format="Restart fpdb") + diastring = "You should now restart fpdb." + dia_restart.format_secondary_text(diastring) + + dia_restart.run() + dia_restart.destroy() elif response == gtk.RESPONSE_NO: print 'User cancelled recreating tables' #if not lock_released: