diff --git a/Clocker/Panel/ParentPanelController.swift b/Clocker/Panel/ParentPanelController.swift index b01cfc7..7349561 100644 --- a/Clocker/Panel/ParentPanelController.swift +++ b/Clocker/Panel/ParentPanelController.swift @@ -543,7 +543,7 @@ class ParentPanelController: NSWindowController { @IBAction func openPreferences(_: NSButton) { updatePopoverDisplayState() // Popover's class has access to all timezones. Need to close the popover, so that we don't have two copies of selections - openPreferences() + openPreferencesWindow() } func deleteTimezone(at row: Int) { @@ -682,7 +682,7 @@ class ParentPanelController: NSWindowController { mainTableView.reloadData() } - private func openPreferences() { + @objc private func openPreferencesWindow() { oneWindow?.showWindow(nil) NSApp.activate(ignoringOtherApps: true) } @@ -1000,6 +1000,8 @@ class ParentPanelController: NSWindowController { action: #selector(reportIssue), keyEquivalent: "") let localizeClocker = NSMenuItem(title: "Localize Clocker...", action: #selector(openCrowdin), keyEquivalent: "") + let openPreferences = NSMenuItem(title: "Preferences", + action: #selector(openPreferencesWindow), keyEquivalent: "") let appDisplayName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") ?? "Clocker" let shortVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") ?? "N/A" @@ -1008,6 +1010,7 @@ class ParentPanelController: NSWindowController { let versionInfo = "\(appDisplayName) \(shortVersion) (\(longVersion))" let clockerVersionInfo = NSMenuItem(title: versionInfo, action: nil, keyEquivalent: "") clockerVersionInfo.isEnabled = false + menuItem.addItem(openPreferences) menuItem.addItem(rateClocker) menuItem.addItem(sendFeedback) menuItem.addItem(localizeClocker)