1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-08 04:20:07 +02:00

🔥 Due to closing #34, removed switcher pref

This commit is contained in:
2022-01-23 20:06:20 +01:00
parent 626b7a735d
commit 42fc0e3698
4 changed files with 1 additions and 18 deletions

View File

@ -78,8 +78,6 @@ class PhpEnv {
// MARK: - Methods // MARK: - Methods
public static var switcher: PhpSwitcher { public static var switcher: PhpSwitcher {
// Based on the setting, use a particular switcher
// For now, we'll hardcode the internal switcher though
return InternalSwitcher() return InternalSwitcher()
} }

View File

@ -15,7 +15,6 @@ enum PreferenceName: String {
case fullPhpVersionDynamicIcon = "full_php_in_menu_bar" case fullPhpVersionDynamicIcon = "full_php_in_menu_bar"
case autoServiceRestartAfterExtensionToggle = "auto_restart_after_extension_toggle" case autoServiceRestartAfterExtensionToggle = "auto_restart_after_extension_toggle"
case autoComposerGlobalUpdateAfterSwitch = "auto_composer_global_update_after_switch" case autoComposerGlobalUpdateAfterSwitch = "auto_composer_global_update_after_switch"
case useInternalSwitcher = "use_phpmon_switcher"
case globalHotkey = "global_hotkey" case globalHotkey = "global_hotkey"
} }
@ -54,8 +53,7 @@ class Preferences {
PreferenceName.shouldDisplayPhpHintInIcon.rawValue: true, PreferenceName.shouldDisplayPhpHintInIcon.rawValue: true,
PreferenceName.fullPhpVersionDynamicIcon.rawValue: false, PreferenceName.fullPhpVersionDynamicIcon.rawValue: false,
PreferenceName.autoServiceRestartAfterExtensionToggle.rawValue: true, PreferenceName.autoServiceRestartAfterExtensionToggle.rawValue: true,
PreferenceName.autoComposerGlobalUpdateAfterSwitch.rawValue: false, PreferenceName.autoComposerGlobalUpdateAfterSwitch.rawValue: false
PreferenceName.useInternalSwitcher.rawValue: false,
]) ])
if UserDefaults.standard.bool(forKey: PreferenceName.wasLaunchedBefore.rawValue) { if UserDefaults.standard.bool(forKey: PreferenceName.wasLaunchedBefore.rawValue) {
@ -98,7 +96,6 @@ class Preferences {
.fullPhpVersionDynamicIcon: UserDefaults.standard.bool(forKey: PreferenceName.fullPhpVersionDynamicIcon.rawValue) as Any, .fullPhpVersionDynamicIcon: UserDefaults.standard.bool(forKey: PreferenceName.fullPhpVersionDynamicIcon.rawValue) as Any,
.autoServiceRestartAfterExtensionToggle: UserDefaults.standard.bool(forKey: PreferenceName.autoServiceRestartAfterExtensionToggle.rawValue) as Any, .autoServiceRestartAfterExtensionToggle: UserDefaults.standard.bool(forKey: PreferenceName.autoServiceRestartAfterExtensionToggle.rawValue) as Any,
.autoComposerGlobalUpdateAfterSwitch: UserDefaults.standard.bool(forKey: PreferenceName.autoComposerGlobalUpdateAfterSwitch.rawValue) as Any, .autoComposerGlobalUpdateAfterSwitch: UserDefaults.standard.bool(forKey: PreferenceName.autoComposerGlobalUpdateAfterSwitch.rawValue) as Any,
.useInternalSwitcher: UserDefaults.standard.bool(forKey: PreferenceName.useInternalSwitcher.rawValue) as Any,
// Part 2: Always Strings // Part 2: Always Strings
.globalHotkey: UserDefaults.standard.string(forKey: PreferenceName.globalHotkey.rawValue) as Any, .globalHotkey: UserDefaults.standard.string(forKey: PreferenceName.globalHotkey.rawValue) as Any,

View File

@ -90,14 +90,6 @@ class PrefsVC: NSViewController {
preference: .autoComposerGlobalUpdateAfterSwitch, preference: .autoComposerGlobalUpdateAfterSwitch,
action: {} action: {}
), ),
/* DISABLED UNTIL VALET SWITCHING IS OK (see #34)
CheckboxPreferenceView.make(
sectionText: "",
descriptionText: "prefs.use_internal_switcher_desc".localized,
checkboxText: "prefs.use_internal_switcher".localized,
preference: .useInternalSwitcher,
action: {}
), */
HotkeyPreferenceView.make( HotkeyPreferenceView.make(
sectionText: "prefs.global_shortcut".localized, sectionText: "prefs.global_shortcut".localized,
descriptionText: "prefs.shortcut_desc".localized, descriptionText: "prefs.shortcut_desc".localized,

View File

@ -114,10 +114,6 @@
"prefs.display_full_php_version" = "Display full PHP version everywhere"; "prefs.display_full_php_version" = "Display full PHP version everywhere";
"prefs.display_full_php_version_desc" = "Display the full version instead of the major version displayed in the menu bar and the dropdown menu. (This may be undesirable on smaller displays, so this is disabled by default.)"; "prefs.display_full_php_version_desc" = "Display the full version instead of the major version displayed in the menu bar and the dropdown menu. (This may be undesirable on smaller displays, so this is disabled by default.)";
"prefs.use_internal_switcher" = "Use PHP Monitors own version switcher";
"prefs.use_internal_switcher_desc" =
"By default, PHP Monitor will attempt to use Laravel Valet in order to switch PHP versions. If you prefer a different switcher or are having issues with `valet use php`, you may use PHP Monitor's own switcher which is slightly faster, but might cause issues with permissions in your Homebrew directories, since PHP Monitor controls the services.";
"prefs.auto_composer_update_title" = "Automatically update global dependencies"; "prefs.auto_composer_update_title" = "Automatically update global dependencies";
"prefs.auto_composer_update_desc" = "When checked, will automatically ask Composer to run `composer global update` whenever you switch between different PHP versions. You will be able to see what changes are being made, or should this fail."; "prefs.auto_composer_update_desc" = "When checked, will automatically ask Composer to run `composer global update` whenever you switch between different PHP versions. You will be able to see what changes are being made, or should this fail.";