diff options
Diffstat (limited to 'Sources/WireGuardApp/UI/macOS')
33 files changed, 47 insertions, 51 deletions
diff --git a/Sources/WireGuardApp/UI/macOS/AppDelegate.swift b/Sources/WireGuardApp/UI/macOS/AppDelegate.swift index f1ed4cd..1dda3e6 100644 --- a/Sources/WireGuardApp/UI/macOS/AppDelegate.swift +++ b/Sources/WireGuardApp/UI/macOS/AppDelegate.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa import ServiceManagement diff --git a/Sources/WireGuardApp/UI/macOS/Application.swift b/Sources/WireGuardApp/UI/macOS/Application.swift index 67d67a7..261ee8a 100644 --- a/Sources/WireGuardApp/UI/macOS/Application.swift +++ b/Sources/WireGuardApp/UI/macOS/Application.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/ErrorPresenter.swift b/Sources/WireGuardApp/UI/macOS/ErrorPresenter.swift index 71157db..dbab027 100644 --- a/Sources/WireGuardApp/UI/macOS/ErrorPresenter.swift +++ b/Sources/WireGuardApp/UI/macOS/ErrorPresenter.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/ImportPanelPresenter.swift b/Sources/WireGuardApp/UI/macOS/ImportPanelPresenter.swift index c236e08..b10aa88 100644 --- a/Sources/WireGuardApp/UI/macOS/ImportPanelPresenter.swift +++ b/Sources/WireGuardApp/UI/macOS/ImportPanelPresenter.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/Info.plist b/Sources/WireGuardApp/UI/macOS/Info.plist index 3211fe6..a405138 100644 --- a/Sources/WireGuardApp/UI/macOS/Info.plist +++ b/Sources/WireGuardApp/UI/macOS/Info.plist @@ -29,7 +29,7 @@ <key>LSUIElement</key> <true/> <key>NSHumanReadableCopyright</key> - <string>Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.</string> + <string>Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.</string> <key>NSPrincipalClass</key> <string>WireGuard.Application</string> <key>LSApplicationCategoryType</key> diff --git a/Sources/WireGuardApp/UI/macOS/LaunchedAtLoginDetector.swift b/Sources/WireGuardApp/UI/macOS/LaunchedAtLoginDetector.swift index 94faa57..158e464 100644 --- a/Sources/WireGuardApp/UI/macOS/LaunchedAtLoginDetector.swift +++ b/Sources/WireGuardApp/UI/macOS/LaunchedAtLoginDetector.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/LoginItemHelper/Info.plist b/Sources/WireGuardApp/UI/macOS/LoginItemHelper/Info.plist index 516eafd..185de16 100644 --- a/Sources/WireGuardApp/UI/macOS/LoginItemHelper/Info.plist +++ b/Sources/WireGuardApp/UI/macOS/LoginItemHelper/Info.plist @@ -25,7 +25,7 @@ <key>LSMinimumSystemVersion</key> <string>$(MACOSX_DEPLOYMENT_TARGET)</string> <key>NSHumanReadableCopyright</key> - <string>Copyright © 2018-2021 WireGuard LLC. All Rights Reserved.</string> + <string>Copyright © 2018-2023 WireGuard LLC. All Rights Reserved.</string> <key>NSPrincipalClass</key> <string>NSApplication</string> <key>LSBackgroundOnly</key> diff --git a/Sources/WireGuardApp/UI/macOS/LoginItemHelper/main.m b/Sources/WireGuardApp/UI/macOS/LoginItemHelper/main.m index 1c37daf..f8a0535 100644 --- a/Sources/WireGuardApp/UI/macOS/LoginItemHelper/main.m +++ b/Sources/WireGuardApp/UI/macOS/LoginItemHelper/main.m @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. #import <Cocoa/Cocoa.h> @@ -14,23 +14,19 @@ int main(int argc, char *argv[]) return 2; uint64_t now = clock_gettime_nsec_np(CLOCK_UPTIME_RAW); if (![[NSData dataWithBytes:&now length:sizeof(now)] writeToURL:[containerUrl URLByAppendingPathComponent:@"login-helper-timestamp.bin"] atomically:YES]) - return 3; - if (@available(macOS 10.15, *)) { - NSCondition *condition = [[NSCondition alloc] init]; - NSURL *appURL = [NSWorkspace.sharedWorkspace URLForApplicationWithBundleIdentifier:appId]; - if (!appURL) - return 4; - NSWorkspaceOpenConfiguration *openConfiguration = [NSWorkspaceOpenConfiguration configuration]; - openConfiguration.activates = NO; - openConfiguration.addsToRecentItems = NO; - openConfiguration.hides = YES; - [NSWorkspace.sharedWorkspace openApplicationAtURL:appURL configuration:openConfiguration completionHandler:^(NSRunningApplication * _Nullable app, NSError * _Nullable error) { - [condition signal]; - }]; - [condition wait]; - } else { - [NSWorkspace.sharedWorkspace launchAppWithBundleIdentifier:appId options:NSWorkspaceLaunchWithoutActivation - additionalEventParamDescriptor:NULL launchIdentifier:NULL]; - } + return 3; + + NSCondition *condition = [[NSCondition alloc] init]; + NSURL *appURL = [NSWorkspace.sharedWorkspace URLForApplicationWithBundleIdentifier:appId]; + if (!appURL) + return 4; + NSWorkspaceOpenConfiguration *openConfiguration = [NSWorkspaceOpenConfiguration configuration]; + openConfiguration.activates = NO; + openConfiguration.addsToRecentItems = NO; + openConfiguration.hides = YES; + [NSWorkspace.sharedWorkspace openApplicationAtURL:appURL configuration:openConfiguration completionHandler:^(NSRunningApplication * _Nullable app, NSError * _Nullable error) { + [condition signal]; + }]; + [condition wait]; return 0; } diff --git a/Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift b/Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift index bcbe28f..89c5b53 100644 --- a/Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift +++ b/Sources/WireGuardApp/UI/macOS/MacAppStoreUpdateDetector.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/NSColor+Hex.swift b/Sources/WireGuardApp/UI/macOS/NSColor+Hex.swift index b77e82e..255cc64 100644 --- a/Sources/WireGuardApp/UI/macOS/NSColor+Hex.swift +++ b/Sources/WireGuardApp/UI/macOS/NSColor+Hex.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import AppKit diff --git a/Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift b/Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift index bdf55ab..ceb3df1 100644 --- a/Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift +++ b/Sources/WireGuardApp/UI/macOS/NSTableView+Reuse.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/ParseError+WireGuardAppError.swift b/Sources/WireGuardApp/UI/macOS/ParseError+WireGuardAppError.swift index 96da524..7527d7d 100644 --- a/Sources/WireGuardApp/UI/macOS/ParseError+WireGuardAppError.swift +++ b/Sources/WireGuardApp/UI/macOS/ParseError+WireGuardAppError.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/StatusItemController.swift b/Sources/WireGuardApp/UI/macOS/StatusItemController.swift index 19723cb..3088574 100644 --- a/Sources/WireGuardApp/UI/macOS/StatusItemController.swift +++ b/Sources/WireGuardApp/UI/macOS/StatusItemController.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/StatusMenu.swift b/Sources/WireGuardApp/UI/macOS/StatusMenu.swift index 6cd00a4..45d2283 100644 --- a/Sources/WireGuardApp/UI/macOS/StatusMenu.swift +++ b/Sources/WireGuardApp/UI/macOS/StatusMenu.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/TunnelsTracker.swift b/Sources/WireGuardApp/UI/macOS/TunnelsTracker.swift index 86cfaa6..0ab59ee 100644 --- a/Sources/WireGuardApp/UI/macOS/TunnelsTracker.swift +++ b/Sources/WireGuardApp/UI/macOS/TunnelsTracker.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/View/ButtonRow.swift b/Sources/WireGuardApp/UI/macOS/View/ButtonRow.swift index 2165f1f..98e4d49 100644 --- a/Sources/WireGuardApp/UI/macOS/View/ButtonRow.swift +++ b/Sources/WireGuardApp/UI/macOS/View/ButtonRow.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/View/ConfTextColorTheme.swift b/Sources/WireGuardApp/UI/macOS/View/ConfTextColorTheme.swift index db1bcae..d08503a 100644 --- a/Sources/WireGuardApp/UI/macOS/View/ConfTextColorTheme.swift +++ b/Sources/WireGuardApp/UI/macOS/View/ConfTextColorTheme.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift b/Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift index 274a137..574859d 100644 --- a/Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift +++ b/Sources/WireGuardApp/UI/macOS/View/ConfTextStorage.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift b/Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift index 5d3f3cf..eafaf12 100644 --- a/Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift +++ b/Sources/WireGuardApp/UI/macOS/View/ConfTextView.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/View/DeleteTunnelsConfirmationAlert.swift b/Sources/WireGuardApp/UI/macOS/View/DeleteTunnelsConfirmationAlert.swift index e5ffd31..59cc556 100644 --- a/Sources/WireGuardApp/UI/macOS/View/DeleteTunnelsConfirmationAlert.swift +++ b/Sources/WireGuardApp/UI/macOS/View/DeleteTunnelsConfirmationAlert.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/View/KeyValueRow.swift b/Sources/WireGuardApp/UI/macOS/View/KeyValueRow.swift index 805ea89..2ce31a6 100644 --- a/Sources/WireGuardApp/UI/macOS/View/KeyValueRow.swift +++ b/Sources/WireGuardApp/UI/macOS/View/KeyValueRow.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/View/LogViewCell.swift b/Sources/WireGuardApp/UI/macOS/View/LogViewCell.swift index 1869c81..50eb2bd 100644 --- a/Sources/WireGuardApp/UI/macOS/View/LogViewCell.swift +++ b/Sources/WireGuardApp/UI/macOS/View/LogViewCell.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/View/OnDemandWiFiControls.swift b/Sources/WireGuardApp/UI/macOS/View/OnDemandWiFiControls.swift index 4630d7d..fb9ff35 100644 --- a/Sources/WireGuardApp/UI/macOS/View/OnDemandWiFiControls.swift +++ b/Sources/WireGuardApp/UI/macOS/View/OnDemandWiFiControls.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa import CoreWLAN diff --git a/Sources/WireGuardApp/UI/macOS/View/TunnelListRow.swift b/Sources/WireGuardApp/UI/macOS/View/TunnelListRow.swift index 57b08cc..9f844b1 100644 --- a/Sources/WireGuardApp/UI/macOS/View/TunnelListRow.swift +++ b/Sources/WireGuardApp/UI/macOS/View/TunnelListRow.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/View/highlighter.c b/Sources/WireGuardApp/UI/macOS/View/highlighter.c index d89feda..625b7e0 100644 --- a/Sources/WireGuardApp/UI/macOS/View/highlighter.c +++ b/Sources/WireGuardApp/UI/macOS/View/highlighter.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: MIT /* * Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */ diff --git a/Sources/WireGuardApp/UI/macOS/View/highlighter.h b/Sources/WireGuardApp/UI/macOS/View/highlighter.h index 885db2d..8b86acb 100644 --- a/Sources/WireGuardApp/UI/macOS/View/highlighter.h +++ b/Sources/WireGuardApp/UI/macOS/View/highlighter.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* SPDX-License-Identifier: MIT */ /* * Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */ diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/ButtonedDetailViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/ButtonedDetailViewController.swift index 7989bda..bd0d5e5 100644 --- a/Sources/WireGuardApp/UI/macOS/ViewController/ButtonedDetailViewController.swift +++ b/Sources/WireGuardApp/UI/macOS/ViewController/ButtonedDetailViewController.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/LogViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/LogViewController.swift index 986eaa3..14fc776 100644 --- a/Sources/WireGuardApp/UI/macOS/ViewController/LogViewController.swift +++ b/Sources/WireGuardApp/UI/macOS/ViewController/LogViewController.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/ManageTunnelsRootViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/ManageTunnelsRootViewController.swift index 1653ab8..88eb8be 100644 --- a/Sources/WireGuardApp/UI/macOS/ViewController/ManageTunnelsRootViewController.swift +++ b/Sources/WireGuardApp/UI/macOS/ViewController/ManageTunnelsRootViewController.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/TunnelDetailTableViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/TunnelDetailTableViewController.swift index 6ad8cf3..41d2b15 100644 --- a/Sources/WireGuardApp/UI/macOS/ViewController/TunnelDetailTableViewController.swift +++ b/Sources/WireGuardApp/UI/macOS/ViewController/TunnelDetailTableViewController.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/TunnelEditViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/TunnelEditViewController.swift index c1f7c74..851498a 100644 --- a/Sources/WireGuardApp/UI/macOS/ViewController/TunnelEditViewController.swift +++ b/Sources/WireGuardApp/UI/macOS/ViewController/TunnelEditViewController.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/TunnelsListTableViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/TunnelsListTableViewController.swift index 7c94dbb..a6cc5c5 100644 --- a/Sources/WireGuardApp/UI/macOS/ViewController/TunnelsListTableViewController.swift +++ b/Sources/WireGuardApp/UI/macOS/ViewController/TunnelsListTableViewController.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa diff --git a/Sources/WireGuardApp/UI/macOS/ViewController/UnusableTunnelDetailViewController.swift b/Sources/WireGuardApp/UI/macOS/ViewController/UnusableTunnelDetailViewController.swift index cc7ab8c..9e49cc3 100644 --- a/Sources/WireGuardApp/UI/macOS/ViewController/UnusableTunnelDetailViewController.swift +++ b/Sources/WireGuardApp/UI/macOS/ViewController/UnusableTunnelDetailViewController.swift @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -// Copyright © 2018-2021 WireGuard LLC. All Rights Reserved. +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. import Cocoa |