diff --git a/examples/sqlite_py_manager.py b/examples/sqlite_py_manager.py index b829c60..96fc939 100644 --- a/examples/sqlite_py_manager.py +++ b/examples/sqlite_py_manager.py @@ -76,7 +76,7 @@ def create_menu(self): self.menu.add_command(label='New Database', command=self.new_db) self.menu.add_command(label='New In-Memory Database', command=lambda: self.new_db(":memory:")) - self.menu.add_command(label='Connect to Database ...', + self.menu.add_command(label='Open Database ...', command=self.open_db) self.menu.add_command(label='Close Database', command=self.close_db) self.menu.add_separator() @@ -87,7 +87,7 @@ def create_menu(self): self.menu_help.add_command(label='about', command=lambda: messagebox.showinfo(message=""" \nSqlite_py_manager : a graphic SQLite Client in 1 Python file - \nversion 2014-06-08b : 'The magic 8th PEP' + \nversion 2014-06-08c : 'The magic 8th PEP' \n(https://github.com/stonebig/baresql/blob/master/examples)""")) def create_toolbar(self): @@ -133,6 +133,11 @@ def new_db(self, filename=''): ("all", "*.*")]) if filename != '': self.database_file = filename + if os.path.isfile(filename): + if messagebox.askyesno( + message='Confirm Destruction of previous Datas ?', + icon='question', title='Destroying'): + os.remove(filename) self.conn = Baresql(self.database_file) self.actualize_db()