Browse Source

Update ParentPanelController.swift

pull/101/head
Abhishek 3 years ago
parent
commit
1a8f6b2766
  1. 7
      Clocker/Panel/ParentPanelController.swift

7
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)

Loading…
Cancel
Save