--- a/Beremiz.py Wed Feb 27 18:40:39 2008 +0100
+++ b/Beremiz.py Thu Feb 28 18:12:16 2008 +0100
@@ -395,8 +395,19 @@
if self.PluginRoot.ProjectTestModified():
- self.PluginRoot.SaveProject()
- wx.MessageBox("Project saved")
+ dialog = wx.MessageDialog(self, "There are changes, do you want to save?", "Close Application", wx.YES_NO|wx.CANCEL|wx.ICON_QUESTION) + answer = dialog.ShowModal() + if answer == wx.ID_YES: + self.PluginRoot.SaveProject() + elif answer == wx.ID_NO: def OnMoveWindow(self, event):