when MSU pops up for updates, only enable the "Update now" button after 4

seconds.
         
this lessens a problem where users may be interrupted by MSU popping up, be
caught off guard while typing and accidentally press enter on the default
"Update now" button



git-svn-id: http://munki.googlecode.com/svn/trunk@888 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
John Randolph
2010-11-05 00:21:04 +00:00
parent fbeaadbe48
commit a3ef0f6ebc
@@ -169,6 +169,10 @@ class MSUAppDelegate(NSObject):
self.update_view_controller.optionalSoftwareBtn.setHidden_(YES)
def enableUpdateNowBtn_(self, enable):
self.update_view_controller.updateNowBtn.setEnabled_(enable)
def getAvailableUpdates(self):
updatelist = []
installinfo = munki.getInstallInfo()
@@ -198,7 +202,8 @@ class MSUAppDelegate(NSObject):
if updatelist:
self._listofupdates = updatelist
self.update_view_controller.updateNowBtn.setEnabled_(YES)
self.enableUpdateNowBtn_(NO)
self.performSelector_withObject_afterDelay_("enableUpdateNowBtn:", YES, 4)
self.getOptionalInstalls()
else:
appleupdates = munki.getAppleUpdates()