mirror of
https://github.com/munki/munki.git
synced 2026-04-22 12:38:23 -05:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user