OSDN Git Service

updateCheck: Implement the cancel button in the update download dialog.
authorJames Teh <jamie@jantrid.net>
Fri, 27 Apr 2012 11:04:22 +0000 (21:04 +1000)
committerJames Teh <jamie@jantrid.net>
Fri, 27 Apr 2012 11:04:22 +0000 (21:04 +1000)
commit6d311670f2bbcb99c158a8e0ee3582d5d9878707
tree26a7157b96ce551e95f6c2bfcbc42b670efb6d73
parent3ba34ec468c1d7b74956b8b233f152c8f45f5aec
updateCheck: Implement the cancel button in the update download dialog.
As part of this, use a timer instead of wx.CallAfter, as it seems wx.ProgressDialog.Update pumps before returning, which means CallAfters can execute within it. Re-entrancy like this causes all sorts of pain here, which is prevented by the timer because timers aren't re-entrant.
This CallAfter problem is probably also what was causing the crash in #2228, as Destroy could be called on the ProgressDialog before Update returned. Nasty.
Fixes #2259.
source/updateCheck.py