diff -r 185d0d371ea4 -r f3819d2e8eff Beremiz.py --- 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 @@ event.Veto() return 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() + dialog.Destroy() + if answer == wx.ID_YES: + self.PluginRoot.SaveProject() + event.Skip() + return + elif answer == wx.ID_NO: + event.Skip() + return + else: + event.Veto() + return event.Skip() def OnMoveWindow(self, event):