|
|
@ -184,8 +184,11 @@ extension AppDelegate { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
NSStatusBar.system.removeStatusItem(barItem) |
|
|
|
statusBarItem = nil |
|
|
|
DispatchQueue.main.async { [weak self] in |
|
|
|
guard let me = self else { return } |
|
|
|
NSStatusBar.system.removeStatusItem(barItem) |
|
|
|
me.statusBarItem = nil |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -231,7 +234,7 @@ extension AppDelegate: PEPNotificationProtocol { |
|
|
|
nc.deliver(un) |
|
|
|
product.notification = un |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
downloadStateNotifier.notify(.NewVersionAvailable(String(withName)), with: product) |
|
|
|
|
|
|
|
case .noDownloadAvailable: |
|
|
@ -287,15 +290,12 @@ extension AppDelegate: NSUserNotificationCenterDelegate { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
DispatchQueue.main.async { [weak self] in |
|
|
|
guard let me = self else { return } |
|
|
|
me.uninstallMenuExtra() |
|
|
|
} |
|
|
|
|
|
|
|
let filename : String = didActivate.userInfo?["filename"] as! String |
|
|
|
NSLog("pEpNotifications: actionButtonClicked for %@", filename) |
|
|
|
NSWorkspace.shared.openFile(filename) |
|
|
|
downloadStateNotifier.notify(.Connected) |
|
|
|
|
|
|
|
uninstallMenuExtra() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -317,15 +317,10 @@ extension AppDelegate: NSXPCListenerDelegate { |
|
|
|
|
|
|
|
extension AppDelegate: DownloadNotificationManagerDelegate { |
|
|
|
func installSelected(with product: Product) { |
|
|
|
defer { |
|
|
|
DispatchQueue.main.async { [weak self] in |
|
|
|
guard let me = self else { return } |
|
|
|
me.uninstallMenuExtra() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
NSLog("pEpNotifications: actionButtonClicked for %@", product.filename) |
|
|
|
NSWorkspace.shared.openFile(product.filename) |
|
|
|
downloadStateNotifier.notify(.Connected) |
|
|
|
|
|
|
|
uninstallMenuExtra() |
|
|
|
} |
|
|
|
} |