Browse Source

display(macOS): enable shared directory button for macOS guests

Fixes #6807
pull/6825/head
osy 8 months ago
parent
commit
9b83c0bad5
  1. 8
      Platform/macOS/Display/VMDisplayAppleWindowController.swift

8
Platform/macOS/Display/VMDisplayAppleWindowController.swift

@ -83,7 +83,9 @@ class VMDisplayAppleWindowController: VMDisplayWindowController {
drivesToolbarItem.isEnabled = false
usbToolbarItem.isEnabled = false
resizeConsoleToolbarItem.isEnabled = false
if #available(macOS 12, *) {
if #available(macOS 13, *) {
sharedFolderToolbarItem.isEnabled = true
} else if #available(macOS 12, *) {
sharedFolderToolbarItem.isEnabled = appleConfig.system.boot.operatingSystem == .linux
} else {
// stop() not available on macOS 11 for some reason
@ -116,6 +118,10 @@ class VMDisplayAppleWindowController: VMDisplayWindowController {
guard #available(macOS 12, *) else {
return
}
guard appleConfig.system.boot.operatingSystem == .linux else {
openShareMenu(sender)
return
}
if !isSharePathAlertShownOnce && !isSharePathAlertShownPersistent {
let alert = NSAlert()
alert.messageText = NSLocalizedString("Directory sharing", comment: "VMDisplayAppleWindowController")

Loading…
Cancel
Save