Only trigger onClose when it's set

This commit is contained in:
Ruud
2014-07-08 21:21:22 +02:00
parent 0622e6e5ab
commit 9b35a0fb20

View File

@@ -163,6 +163,7 @@ class CouchPotatoApp(wx.App, SoftwareUpdate):
events = {}
restart = False
closing = False
triggered_onClose = False
def OnInit(self):
@@ -198,7 +199,9 @@ class CouchPotatoApp(wx.App, SoftwareUpdate):
self.closing = True
self.frame.tbicon.onTaskBarClose(event)
onClose = self.events.get('onClose')
onClose = self.events.get('onClose')
if onClose and not self.triggered_onClose:
self.triggered_onClose = True
onClose(event)
def afterShutdown(self, restart = False):