tadded confimation dialog upon quit if unsaved - cross-stitch - interactively t… | |
git clone git://src.adamsgaard.dk/cross-stitch | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
commit a07dc585ab94a620bd3911f76f146814380e6cd1 | |
parent 61a5509914d87a9d95ad8682a752a7146416fb65 | |
Author: Anders Damsgaard <[email protected]> | |
Date: Sat, 15 Feb 2014 14:26:00 +0100 | |
added confimation dialog upon quit if unsaved | |
Diffstat: | |
M cross-stitch.py | 8 +++++++- | |
1 file changed, 7 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/cross-stitch.py b/cross-stitch.py | |
t@@ -135,6 +135,12 @@ class MainScreen(wx.Frame): | |
self.canvas.draw() | |
def OnQuit(self, event): | |
+ | |
+ if self.contentNotSaved: | |
+ if wx.MessageBox('Current image is not saved! Proceed?', | |
+ 'Please confirm', wx.ICON_QUESTION | wx.YES_NO, self) == \ | |
+ wx.NO: | |
+ return | |
self.Close() | |
def OnOpen(self, event): | |
t@@ -212,7 +218,7 @@ the Free Software Foundation, Inc., 59 Temple Palace, Suit… | |
info.SetIcon(wx.Icon('icon.png', wx.BITMAP_TYPE_PNG)) | |
info.SetName('Cross Stitch') | |
- info.SetVersion('1.0') | |
+ info.SetVersion('1.01') | |
info.SetDescription(description) | |
info.SetCopyright('(C) 2014 Anders Damsgaard') | |
info.SetWebSite('https://github.com/anders-dc/cross-stitch') |