From fbe479c43f355f76867203add725ea7ab4837324 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 26 Jan 2020 17:36:16 -0500 Subject: [PATCH] Switch to saving screenshots to the desktop. Or, at least, try. User permission would be required. More reading necessary. --- OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift index 66f7d7293..67814dd6a 100644 --- a/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift +++ b/OSBindings/Mac/Clock Signal/Documents/MachineDocument.swift @@ -596,7 +596,7 @@ class MachineDocument: return super.validateUserInterfaceItem(item) } - /// Saves a screenshot of the + /// Saves a screenshot of the machine's current display. @IBAction func saveScreenshot(_ sender: AnyObject!) { // Grab a date formatter and form a file name. let dateFormatter = DateFormatter() @@ -605,8 +605,8 @@ class MachineDocument: let filename = ("Clock Signal Screen Shot " + dateFormatter.string(from: Date()) + ".png").replacingOccurrences(of: "/", with: "-") .replacingOccurrences(of: ":", with: ".") - let pictursURL = FileManager.default.urls(for: .picturesDirectory, in: .userDomainMask)[0] - let url = pictursURL.appendingPathComponent(filename) + let desktopURL = FileManager.default.urls(for: .desktopDirectory, in: .userDomainMask)[0] + let url = desktopURL.appendingPathComponent(filename) // Obtain the machine's current display. var imageRepresentation: NSBitmapImageRep? = nil