Add menu bar menu icons

This commit is contained in:
Leon Böttger committed 2025-11-05 10:18:52 +01:00
1 parent 646da767a7
commit 261f91bc94
3 files changed
+13 -9

No files matched your search

@@ -33,8 +33,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/leif-ibsen/BigInt", "location" : "https://github.com/leif-ibsen/BigInt",
"state" : { "state" : {
"revision" : "afb70a0038bfbba845271b60fa9a58d5840f8017", "revision" : "8c6f93aa37504b7b1ba3954335b5548a19fbbd82",
"version" : "1.21.0" "version" : "1.22.0"
} }
}, },
{ {
@@ -52,7 +52,7 @@
"location" : "https://github.com/leonboe1/LUI.git", "location" : "https://github.com/leonboe1/LUI.git",
"state" : { "state" : {
"branch" : "main", "branch" : "main",
"revision" : "01e8a88be6a2ee107bcee5923865bd0daf681743" "revision" : "0b862decf853e1f542eeab1f8d548f8ff629deca"
} }
}, },
{ {
@@ -87,8 +87,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-protobuf.git", "location" : "https://github.com/apple/swift-protobuf.git",
"state" : { "state" : {
"revision" : "c6fe6442e6a64250495669325044052e113e990c", "revision" : "c169a5744230951031770e27e475ff6eefe51f9d",
"version" : "1.32.0" "version" : "1.33.3"
} }
}, },
{ {
@@ -124,7 +124,7 @@
"location" : "https://github.com/siteline/swiftui-introspect", "location" : "https://github.com/siteline/swiftui-introspect",
"state" : { "state" : {
"branch" : "main", "branch" : "main",
"revision" : "717a725e3fcd1877896a0584098395bf9e9d852e" "revision" : "11d9782bea80656e8a65a643d6ac6396e4a8662e"
} }
} }
], ],
+5 -1
View File
@@ -48,14 +48,18 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
menu.addItem(NSMenuItem.separator()) menu.addItem(NSMenuItem.separator())
let sendClipboardItem = NSMenuItem(title: "SendClipboard".localized(), action: #selector(sendClipboard), keyEquivalent: "") let sendClipboardItem = NSMenuItem(title: "SendClipboard".localized(), action: #selector(sendClipboard), keyEquivalent: "")
sendClipboardItem.image = NSImage(systemSymbolName: "doc.on.clipboard", accessibilityDescription: nil)
menu.addItem(sendClipboardItem) menu.addItem(sendClipboardItem)
menu.addItem(NSMenuItem.separator()) menu.addItem(NSMenuItem.separator())
let userManualItem = NSMenuItem(title: "UserManual".localized(), action: #selector(openWelcomeScreen), keyEquivalent: "") let userManualItem = NSMenuItem(title: "UserManual".localized(), action: #selector(openWelcomeScreen), keyEquivalent: "")
userManualItem.image = NSImage(systemSymbolName: "gear", accessibilityDescription: nil)
menu.addItem(userManualItem) menu.addItem(userManualItem)
menu.addItem(withTitle: "Quit".localized(), action: #selector(NSApplication.terminate(_:)), keyEquivalent: "") let quitItem = NSMenuItem(title: "Quit".localized(), action: #selector(NSApplication.terminate(_:)), keyEquivalent: "")
quitItem.image = NSImage(systemSymbolName: "xmark", accessibilityDescription: nil)
menu.addItem(quitItem)
statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
statusItem?.button?.image = NSImage(named: "MenuBarIcon") statusItem?.button?.image = NSImage(named: "MenuBarIcon")
+2 -2
View File
@@ -99,7 +99,7 @@ class ShareViewController: NSViewController, OutboundAppDelegate {
super.viewDidLoad() super.viewDidLoad()
dicoverDevices() dicoverDevices()
NearbyConnectionManager.shared.addShareExtensionDelegate(self) NearbyConnectionManager.shared.addOutboundAppDelegate(self)
} }
@@ -111,7 +111,7 @@ class ShareViewController: NSViewController, OutboundAppDelegate {
if chosenDevice == nil { if chosenDevice == nil {
NearbyConnectionManager.shared.stopDeviceDiscovery() NearbyConnectionManager.shared.stopDeviceDiscovery()
} }
NearbyConnectionManager.shared.removeShareExtensionDelegate(self) NearbyConnectionManager.shared.removeOutboundAppDelegate(self)
} }