|
|
@ -139,11 +139,6 @@ open class AppDelegate: NSObject, NSApplicationDelegate { |
|
|
|
// Install the menubar item! |
|
|
|
// Install the menubar item! |
|
|
|
statusBarHandler = StatusItemHandler() |
|
|
|
statusBarHandler = StatusItemHandler() |
|
|
|
|
|
|
|
|
|
|
|
if UserDefaults.standard.object(forKey: CLInstallHomeIndicatorObject) == nil { |
|
|
|
|
|
|
|
fetchLocalTimezone() |
|
|
|
|
|
|
|
UserDefaults.standard.set(1, forKey: CLInstallHomeIndicatorObject) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ProcessInfo.processInfo.arguments.contains(CLUITestingLaunchArgument) { |
|
|
|
if ProcessInfo.processInfo.arguments.contains(CLUITestingLaunchArgument) { |
|
|
|
RateController.setPreviewMode(true) |
|
|
|
RateController.setPreviewMode(true) |
|
|
|
} |
|
|
|
} |
|
|
@ -210,23 +205,6 @@ open class AppDelegate: NSObject, NSApplicationDelegate { |
|
|
|
alert.runModal() |
|
|
|
alert.runModal() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private func fetchLocalTimezone() { |
|
|
|
|
|
|
|
let identifier = TimeZone.autoupdatingCurrent.identifier |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let currentTimezone = TimezoneData() |
|
|
|
|
|
|
|
currentTimezone.timezoneID = identifier |
|
|
|
|
|
|
|
currentTimezone.setLabel(identifier) |
|
|
|
|
|
|
|
currentTimezone.formattedAddress = identifier |
|
|
|
|
|
|
|
currentTimezone.isSystemTimezone = true |
|
|
|
|
|
|
|
currentTimezone.placeID = "Home" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let operations = TimezoneDataOperations(with: currentTimezone) |
|
|
|
|
|
|
|
operations.saveObject(at: 0) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Retrieve Location |
|
|
|
|
|
|
|
// retrieveLatestLocation() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@IBAction func ping(_ sender: Any) { |
|
|
|
@IBAction func ping(_ sender: Any) { |
|
|
|
togglePanel(sender) |
|
|
|
togglePanel(sender) |
|
|
|
} |
|
|
|
} |
|
|
|