mirror of
https://github.com/munki/munki.git
synced 2026-01-06 14:40:09 -06:00
Don't display Apple updates warning text when Apple updates are filtered.
This commit is contained in:
@@ -1353,7 +1353,7 @@ class MainWindowController: NSWindowController, NSWindowDelegate, WKNavigationDe
|
||||
// update the updates-to-install header to reflect the new list of
|
||||
// updates to install
|
||||
setInnerText(updateCountMessage(getUpdateCount()), elementID: "update-count-string")
|
||||
setInnerText(getWarningText(), elementID: "update-warning-text")
|
||||
setInnerText(getWarningText(should_filter_apple_updates), elementID: "update-warning-text")
|
||||
|
||||
// update text of Install All button
|
||||
setInnerText(getInstallAllButtonTextForCount(getUpdateCount()), elementID: "install-all-button-text")
|
||||
|
||||
@@ -673,7 +673,7 @@ func buildUpdatesPage() throws {
|
||||
// in Python was count = len([item for item in item_list if item['status'] != 'problem-item'])
|
||||
page["update_count"] = updateCountMessage(count)
|
||||
page["install_btn_label"] = getInstallAllButtonTextForCount(count)
|
||||
page["warning_text"] = getWarningText()
|
||||
page["warning_text"] = getWarningText(filterAppleUpdates)
|
||||
|
||||
// build problem updates table
|
||||
page["problem_updates_header_message"] = NSLocalizedString(
|
||||
@@ -796,7 +796,7 @@ func getRestartActionForUpdateList(_ update_list: [GenericItem]) -> String {
|
||||
return ""
|
||||
}
|
||||
|
||||
func getWarningText() -> String {
|
||||
func getWarningText(_ filterAppleUpdates: Bool) -> String {
|
||||
// Return localized text warning about forced installs and/or
|
||||
// logouts and/or restarts
|
||||
let item_list = getEffectiveUpdateList()
|
||||
@@ -808,7 +808,7 @@ func getWarningText() -> String {
|
||||
"One or more items must be installed by %@",
|
||||
comment: "Forced Install Date summary")
|
||||
warning_text = NSString(format: forced_date_text as NSString, date_str) as String
|
||||
} else if shouldAggressivelyNotifyAboutAppleUpdates() {
|
||||
} else if !filterAppleUpdates && shouldAggressivelyNotifyAboutAppleUpdates() {
|
||||
warning_text = NSLocalizedString(
|
||||
"One or more important Apple updates must be installed",
|
||||
comment: "Pending Apple Updates warning"
|
||||
|
||||
Reference in New Issue
Block a user