diff --git a/PHP Monitor.xcodeproj/xcshareddata/xcschemes/PHP Monitor.xcscheme b/PHP Monitor.xcodeproj/xcshareddata/xcschemes/PHP Monitor.xcscheme index b6917c2..730932a 100644 --- a/PHP Monitor.xcodeproj/xcshareddata/xcschemes/PHP Monitor.xcscheme +++ b/PHP Monitor.xcodeproj/xcshareddata/xcschemes/PHP Monitor.xcscheme @@ -71,7 +71,7 @@ + isEnabled = "NO"> NSView { + return CheckboxPreferenceView.make( + sectionText: "prefs.php_doctor".localized, + descriptionText: "prefs.php_doctor_suggestions_desc".localized, + checkboxText: "prefs.php_doctor_suggestions_title".localized, + preference: .showPhpDoctorSuggestions, + action: { + MainMenu.shared.refreshIcon() + MainMenu.shared.rebuild() + } + ) + + } + func getNotifyAboutVersionChangePV() -> NSView { return CheckboxPreferenceView.make( sectionText: "prefs.notifications".localized, @@ -194,6 +208,7 @@ class GeneralPreferencesVC: GenericPreferenceVC { .instantiateController(withIdentifier: "preferencesTemplateVC") as! GenericPreferenceVC vc.views = [ + vc.getShowPhpDoctorSuggestionsPV(), vc.getAutoRestartPV(), vc.getAutomaticComposerUpdatePV(), vc.getShortcutPV(), diff --git a/phpmon/Localizable.strings b/phpmon/Localizable.strings index 841c6cf..39c0a1d 100644 --- a/phpmon/Localizable.strings +++ b/phpmon/Localizable.strings @@ -212,6 +212,7 @@ "prefs.info_density" = "Info Density:"; "prefs.services" = "Services:"; "prefs.switcher" = "Switcher:"; +"prefs.php_doctor" = "PHP Doctor:"; "prefs.integrations" = "Integrations:"; "prefs.updates" = "Updates:"; "prefs.notifications" = "Notifications:"; @@ -239,6 +240,9 @@ "prefs.automatic_update_check_title" = "Automatically check for updates"; "prefs.automatic_update_check_desc" = "When checked, PHP Monitor will automatically check if there is a newer version available, and notify you if that is the case."; + +"prefs.php_doctor_suggestions_title" = "Show suggestions (if applicable)"; +"prefs.php_doctor_suggestions_desc" = "If you uncheck this item, no PHP Doctor suggestions will appear in PHP Monitor's menu. Keep in mind that PHP Doctor will not appear if there are no recommendations."; "prefs.shortcut_set" = "Set global shortcut"; "prefs.shortcut_listening" = "";