Commit a416f128 authored by eric pellegrini's avatar eric pellegrini
Browse files

Renamed module

The periodictable and elementdatabaseeditor does not prompt for quiting
now
parent 0701fca3
This diff is collapsed.
......@@ -222,18 +222,12 @@ class ElementsDatabaseEditor(wx.Frame):
saveItem = fileMenu.Append(wx.ID_ANY, '&Save database\tCtrl+S')
saveasItem = fileMenu.Append(wx.ID_ANY, '&Save database as ...\tCtrl+Shift+S')
fileMenu.AppendSeparator()
fileItem = fileMenu.Append(wx.ID_ANY, '&Quit\tCtrl+Q')
menubar.Append(fileMenu, "File")
databaseMenu = wx.Menu()
addElementItem = databaseMenu.Append(wx.ID_ANY, 'New element')
addPropertyItem = databaseMenu.Append(wx.ID_ANY, 'New property')
menubar.Append(databaseMenu, "Database")
self.Bind(wx.EVT_CLOSE,self.on_quit)
self.Bind(wx.EVT_MENU,self.on_quit,fileItem)
self.Bind(wx.EVT_MENU,self.on_add_element, addElementItem)
self.Bind(wx.EVT_MENU,self.on_add_property, addPropertyItem)
......@@ -243,13 +237,6 @@ class ElementsDatabaseEditor(wx.Frame):
self.SetMenuBar(menubar)
self.MakeModal(True)
def on_quit(self, event):
d = wx.MessageDialog(None,'Do you really want to quit ?','Question',wx.YES_NO|wx.YES_DEFAULT|wx.ICON_QUESTION)
if d.ShowModal() == wx.ID_YES:
self.MakeModal(False)
self.Destroy()
def on_show_popup_menu(self, event):
......
......@@ -475,15 +475,8 @@ class PeriodicTableViewer(wx.Frame):
mainPanel.SetSizer(mainSizer)
self.SetSize(mainPanel.GetBestSize())
self.Bind(wx.EVT_CLOSE,self.on_quit)
self.Bind(wx.EVT_BUTTON,self.on_open_database,edit)
def on_quit(self, event):
d = wx.MessageDialog(None,'Do you really want to quit ?','Question',wx.YES_NO|wx.YES_DEFAULT|wx.ICON_QUESTION)
if d.ShowModal() == wx.ID_YES:
self.Destroy()
def on_open_database(self,event):
f = ElementsDatabaseEditor(self)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment