mirror of
https://github.com/munki/munki.git
synced 2026-01-07 06:59:57 -06:00
Fix for at least one cause of MSC repeatedly displaying a 'Pending Updates' alert when attempting to quit the application
This commit is contained in:
@@ -78,7 +78,7 @@ class MainWindowController: NSWindowController, NSWindowDelegate, WKNavigationDe
|
||||
|
||||
func currentPageIsUpdatesPage() -> Bool {
|
||||
// return true if current tab selected is Updates
|
||||
return updatesToolbarItem.isEnabled
|
||||
return toolBarItemIsHighlighted(updatesToolbarItem)
|
||||
}
|
||||
|
||||
func alertToPendingUpdates() {
|
||||
@@ -148,6 +148,13 @@ class MainWindowController: NSWindowController, NSWindowDelegate, WKNavigationDe
|
||||
cached_self_service = SelfService()
|
||||
}
|
||||
|
||||
func toolBarItemIsHighlighted(_ item: NSToolbarItem) -> Bool {
|
||||
if let button = item.view as? NSButton {
|
||||
return (button.state == .on)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func setHighlightFor(item: NSToolbarItem, doHighlight: Bool) {
|
||||
if let button = item.view as? NSButton {
|
||||
button.state = (doHighlight ? .on : .off)
|
||||
|
||||
Reference in New Issue
Block a user