Skip to content
Snippets Groups Projects
Unverified Commit b535404b authored by Spotlight Deveaux's avatar Spotlight Deveaux :fox:
Browse files

what's a config? defaults write knows

parent a3c6759f
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ xcuserdata/
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/
Podfile.lock
# Carthage
#
......
PODS:
- AppAuth (0.9.1)
- GoogleAPIClientForREST (1.3.1):
- GoogleAPIClientForREST/Core (= 1.3.1)
- GTMSessionFetcher (>= 1.1.7)
- GoogleAPIClientForREST/Core (1.3.1):
- GTMSessionFetcher (>= 1.1.7)
- GoogleAPIClientForREST/Storage (1.3.1):
- GoogleAPIClientForREST/Core
- GTMSessionFetcher (>= 1.1.7)
- GTMAppAuth (0.6.1):
- AppAuth (~> 0.9.0)
- GTMSessionFetcher (~> 1.1)
- GTMSessionFetcher (1.1.12):
- GTMSessionFetcher/Full (= 1.1.12)
- GTMSessionFetcher/Core (1.1.12)
- GTMSessionFetcher/Full (1.1.12):
- GTMSessionFetcher/Core (= 1.1.12)
- SKQueue (1.1)
- UTIKit (2.0.1)
DEPENDENCIES:
- GoogleAPIClientForREST
- GoogleAPIClientForREST/Storage
- GTMAppAuth
- SKQueue (from `https://github.com/spotlightishere/SKQueue`)
- UTIKit
EXTERNAL SOURCES:
SKQueue:
:git: https://github.com/spotlightishere/SKQueue
CHECKOUT OPTIONS:
SKQueue:
:commit: 5598290316a56eab7a2a2b64f1fc7fdaccec425a
:git: https://github.com/spotlightishere/SKQueue
SPEC CHECKSUMS:
AppAuth: f7d9a2ce4ffe79a62a8b0c1d0938e88d9809b846
GoogleAPIClientForREST: d18c6704317d6d5c56d70f724f8990eb125359a4
GTMAppAuth: ae710e1e53431e2bcdd57f9f92daa16a58a2947d
GTMSessionFetcher: ebaa1f79a5366922c1735f1566901f50beba23b7
SKQueue: ed3265dfec4847a3dd551e6671c1c8c92e71bc63
UTIKit: 5b16488927ed6df479189acd9ff1ad6a7b19f8ff
PODFILE CHECKSUM: 348c120c74479d76049014893bd3f36e005c7e69
COCOAPODS: 1.3.1
# *notices your repo* owo what's this
A really, really, really, reallyreallyreallyreallyreallyreallyreally unfinish screenshot application.
A really, really, really, reallyreallyreallyreallyreallyreallyreally unfinished screenshot application.
## so uh what's it do
Good question.<br>
......
......@@ -9,17 +9,17 @@
/* Begin PBXBuildFile section */
4241FB4F1FBD106700A364B9 /* Pods_Screenshottr.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85B58CFFF6F2C5DBA952F077 /* Pods_Screenshottr.framework */; };
4241FB521FBD106800A364B9 /* GoogleAPIClientForREST.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4241FB501FBD106700A364B9 /* GoogleAPIClientForREST.framework */; };
4255DEDE2030A89F00E67FCA /* SettingsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4255DEDD2030A89F00E67FCA /* SettingsView.xib */; };
4277C2BB1F4F66F8004649DA /* PomfManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4277C2BA1F4F66F7004649DA /* PomfManager.swift */; };
4279D5841F4686AE00558889 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4279D5831F4686AE00558889 /* AppDelegate.swift */; };
4279D5861F4686AE00558889 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4279D5851F4686AE00558889 /* Assets.xcassets */; };
4279D5941F4686AE00558889 /* ScreenshottrTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4279D5931F4686AE00558889 /* ScreenshottrTests.swift */; };
4279D59F1F4686AE00558889 /* ScreenshottrUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4279D59E1F4686AE00558889 /* ScreenshottrUITests.swift */; };
4279D5C61F4696EA00558889 /* UploadManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4279D5C51F4696EA00558889 /* UploadManager.swift */; };
4279D5CC1F469B4500558889 /* Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4279D5CB1F469B4500558889 /* Config.swift */; };
4279D5D01F46A01D00558889 /* GCPManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4279D5CF1F46A01D00558889 /* GCPManager.swift */; };
4288972E20028D3F00B2FA08 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4288972D20028D3F00B2FA08 /* SettingsView.swift */; };
42C0AD501FBE5D6D0053C761 /* PopoverMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42C0AD4F1FBE5D6D0053C761 /* PopoverMenu.swift */; };
42C0AD521FBE61A70053C761 /* PopoverMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42C0AD511FBE61A70053C761 /* PopoverMenu.xib */; };
42D1E8441F4E472300238857 /* SettingsMenu.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 42D1E8431F4E472300238857 /* SettingsMenu.storyboard */; };
42F2C88C1F4A585B00FA3D44 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42F2C88A1F4A585B00FA3D44 /* MainMenu.xib */; };
91C9E7F18A37EE7A8E2F39F8 /* Pods_ScreenshottrTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2ACA69BD41F67A4C2DFC71C /* Pods_ScreenshottrTests.framework */; };
A36C9E254518F2FEE5372C9B /* Pods_ScreenshottrUITests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B3E2968AB8A1EEDF1100710F /* Pods_ScreenshottrUITests.framework */; };
......@@ -47,6 +47,7 @@
37D181DEC0A73C7E8176F589 /* Pods-ScreenshottrTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScreenshottrTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ScreenshottrTests/Pods-ScreenshottrTests.debug.xcconfig"; sourceTree = "<group>"; };
389C76C5526A8321EFEC3232 /* Pods-ScreenshottrUITests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ScreenshottrUITests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ScreenshottrUITests/Pods-ScreenshottrUITests.release.xcconfig"; sourceTree = "<group>"; };
4241FB501FBD106700A364B9 /* GoogleAPIClientForREST.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GoogleAPIClientForREST.framework; path = "../../../Library/Developer/Xcode/DerivedData/Screenshottr-cgbrmxspntvczobhzllpyoohqeof/Build/Products/Debug/GoogleAPIClientForREST/GoogleAPIClientForREST.framework"; sourceTree = "<group>"; };
4255DEDD2030A89F00E67FCA /* SettingsView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SettingsView.xib; sourceTree = "<group>"; };
4258606D1F4791EA004A1C45 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
4277C2BA1F4F66F7004649DA /* PomfManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PomfManager.swift; sourceTree = "<group>"; };
4279D5801F4686AE00558889 /* Screenshottr.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Screenshottr.app; sourceTree = BUILT_PRODUCTS_DIR; };
......@@ -60,11 +61,10 @@
4279D59E1F4686AE00558889 /* ScreenshottrUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenshottrUITests.swift; sourceTree = "<group>"; };
4279D5A01F4686AE00558889 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4279D5C51F4696EA00558889 /* UploadManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UploadManager.swift; sourceTree = "<group>"; };
4279D5CB1F469B4500558889 /* Config.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Config.swift; sourceTree = "<group>"; };
4279D5CF1F46A01D00558889 /* GCPManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GCPManager.swift; sourceTree = "<group>"; };
4288972D20028D3F00B2FA08 /* SettingsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
42C0AD4F1FBE5D6D0053C761 /* PopoverMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PopoverMenu.swift; sourceTree = "<group>"; };
42C0AD511FBE61A70053C761 /* PopoverMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PopoverMenu.xib; sourceTree = "<group>"; };
42D1E8431F4E472300238857 /* SettingsMenu.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = SettingsMenu.storyboard; sourceTree = "<group>"; };
42F2C88B1F4A585B00FA3D44 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
7A9EE1DAFB01DE50B9F3F2CA /* Pods-Screenshottr.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Screenshottr.release.xcconfig"; path = "Pods/Target Support Files/Pods-Screenshottr/Pods-Screenshottr.release.xcconfig"; sourceTree = "<group>"; };
85B58CFFF6F2C5DBA952F077 /* Pods_Screenshottr.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Screenshottr.framework; sourceTree = BUILT_PRODUCTS_DIR; };
......@@ -128,7 +128,6 @@
4279D5821F4686AE00558889 /* Screenshottr */ = {
isa = PBXGroup;
children = (
4279D5CB1F469B4500558889 /* Config.swift */,
4279D5831F4686AE00558889 /* AppDelegate.swift */,
4279D5851F4686AE00558889 /* Assets.xcassets */,
4279D58A1F4686AE00558889 /* Info.plist */,
......@@ -136,7 +135,8 @@
4279D5CF1F46A01D00558889 /* GCPManager.swift */,
4277C2BA1F4F66F7004649DA /* PomfManager.swift */,
42F2C88A1F4A585B00FA3D44 /* MainMenu.xib */,
42D1E8431F4E472300238857 /* SettingsMenu.storyboard */,
4255DEDD2030A89F00E67FCA /* SettingsView.xib */,
4288972D20028D3F00B2FA08 /* SettingsView.swift */,
42C0AD4F1FBE5D6D0053C761 /* PopoverMenu.swift */,
42C0AD511FBE61A70053C761 /* PopoverMenu.xib */,
);
......@@ -311,8 +311,8 @@
buildActionMask = 2147483647;
files = (
42C0AD521FBE61A70053C761 /* PopoverMenu.xib in Resources */,
4255DEDE2030A89F00E67FCA /* SettingsView.xib in Resources */,
4279D5861F4686AE00558889 /* Assets.xcassets in Resources */,
42D1E8441F4E472300238857 /* SettingsMenu.storyboard in Resources */,
42F2C88C1F4A585B00FA3D44 /* MainMenu.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -498,11 +498,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4288972E20028D3F00B2FA08 /* SettingsView.swift in Sources */,
4279D5C61F4696EA00558889 /* UploadManager.swift in Sources */,
42C0AD501FBE5D6D0053C761 /* PopoverMenu.swift in Sources */,
4279D5D01F46A01D00558889 /* GCPManager.swift in Sources */,
4279D5841F4686AE00558889 /* AppDelegate.swift in Sources */,
4279D5CC1F469B4500558889 /* Config.swift in Sources */,
4277C2BB1F4F66F8004649DA /* PomfManager.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -651,7 +651,7 @@
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = Screenshottr/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = io.github.spotlightishere.Screenshottr;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
......@@ -670,7 +670,7 @@
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = Screenshottr/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.11;
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = io.github.spotlightishere.Screenshottr;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
......
......@@ -26,7 +26,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
// Set up file watching
let queue = SKQueue(delegate: UploadReceiver())
queue?.addPath(Config().filePath, notifyingAbout: .Write)
queue?.addPath(NSSearchPathForDirectoriesInDomains(.desktopDirectory, .userDomainMask, true)[0], notifyingAbout: .Write)
}
func quitApplication() {
......
......@@ -12,7 +12,8 @@ import GoogleAPIClientForREST
import UTIKit
class GCPAuthHandler {
let redirectHTTPHandler = OIDRedirectHTTPHandler(successURL: URL(string: Config().successURLString))
let redirectHTTPHandler = OIDRedirectHTTPHandler(successURL: URL(string: "http://openid.github.io/AppAuth-iOS/redirect/"))
let userDefaults = UserDefaults.standard
func signedIn(service: GTLRStorageService) -> Bool {
let auth = service.authorizer
......@@ -35,7 +36,7 @@ class GCPAuthHandler {
authorizedService.shouldFetchNextPages = true
authorizedService.isRetryEnabled = true
let authorization = GTMAppAuthFetcherAuthorization.init(fromKeychainForName: Config().GTMAppAuthKeychainItemName)
let authorization = GTMAppAuthFetcherAuthorization.init(fromKeychainForName: "Screenshottr")
authorizedService.authorizer = authorization
if (!signedIn(service: authorizedService)) {
......@@ -52,8 +53,8 @@ class GCPAuthHandler {
// Builds authentication request.
let scopes : Array<String> = [ kGTLRAuthScopeStorageDevstorageReadWrite, OIDScopeEmail ];
let request = OIDAuthorizationRequest(configuration: GTMAppAuthFetcherAuthorization.configurationForGoogle(),
clientId: Config().clientID,
clientSecret: Config().clientSecret,
clientId: userDefaults.string(forKey: "gcpClientID")!,
clientSecret: userDefaults.string(forKey: "gcpClientSecret")!,
scopes: scopes,
redirectURL: localRedirectURI!,
responseType: OIDResponseTypeCode,
......@@ -65,7 +66,7 @@ class GCPAuthHandler {
if (authState != nil) {
let gtmAuthorization = GTMAppAuthFetcherAuthorization.init(authState: authState!)
authorizedService.authorizer = gtmAuthorization
GTMAppAuthFetcherAuthorization.save(gtmAuthorization, toKeychainForName: Config().GTMAppAuthKeychainItemName)
GTMAppAuthFetcherAuthorization.save(gtmAuthorization, toKeychainForName: "Screenshottr")
completionHandler(authorizedService)
}
})
......@@ -80,14 +81,14 @@ class GCPAuthHandler {
let fileURL = URL(fileURLWithPath: path)
// Use UTIKit to grab the first MIME type recorded.
let mimeType = UTI(filenameExtension: fileURL.pathExtension)?.mimeType ?? "application/octet-stream"
print(mimeType)
let uploadParameters = GTLRUploadParameters.init(fileURL: fileURL, mimeType: mimeType)
let newObject = GTLRStorage_Object()
newObject.name = fileURL.lastPathComponent
// Set ACL to public for usage later on.
let query = GTLRStorageQuery_ObjectsInsert.query(with: newObject,
bucket: Config().bucketName,
bucket: self.userDefaults.string(forKey: "gcpBucketName")!,
uploadParameters: uploadParameters)
query.predefinedAcl = kGTLRStorageDestinationPredefinedAclPublicRead;
// Output progress to the console
......@@ -100,7 +101,7 @@ class GCPAuthHandler {
service.executeQuery(query) { (callbackTicket, uploadedFile, callbackError) in
let fileURL = NSURL(fileURLWithPath: path)
let escapedFilename = (fileURL.lastPathComponent?.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)!)!
completionHandler(callbackError as NSError?, "\(Config().baseDomain)/\(escapedFilename)")
completionHandler(callbackError as NSError?, "\(self.userDefaults.string(forKey: "gcpBaseDomain")!)/\(escapedFilename)")
}
}
}
......
......@@ -12,7 +12,20 @@ import UTIKit
class PomfManager {
func uploadFile(path: String, completionHandler: @escaping (_ : NSError?, _ : String) -> Void) {
let request = NSMutableURLRequest(url: URL(string: Config().pomfUploadPath)!)
let defaults = UserDefaults.standard
let uploadPath = defaults.string(forKey: "pomfUploadPath")
if uploadPath == nil {
// Gotta alert the user™
let userInfo: [AnyHashable : Any] = [
NSLocalizedDescriptionKey : NSLocalizedString("Unsuccessful", value: "Go to Settings and enter a Pomf upload url.", comment: "") ,
NSLocalizedFailureReasonErrorKey : NSLocalizedString("Unsuccessful", value: "Go to Settings and enter a Pomf upload url.", comment: "")
]
completionHandler(NSError(domain: "pomf.error.ufukdup.yourcodesucks.nopermission.getatoken.slideinto.deans.dms", code: 666420, userInfo: userInfo), "https://google.com")
return
}
let request = NSMutableURLRequest(url: URL(string: uploadPath!)!)
request.httpMethod = "POST"
let boundary = generateBoundaryString()
......@@ -50,7 +63,9 @@ class PomfManager {
let test : [NSDictionary] = parsedData["files"] as! [NSDictionary]
let furtherTest : NSDictionary = test[0]
completionHandler(nil, furtherTest.object(forKey: "url") as! String? ?? "https://google.com")
// https://spotlight-thinks-awoo.should-be.legal/c58cec.png
let fileName = furtherTest.object(forKey: "url") as! String? ?? "c58cec.png"
completionHandler(nil, "\(defaults.string(forKey: "pomfBaseDomain")!)/\(fileName)" )
} catch let error as NSError {
print(error)
completionHandler(error, "https://google.com/")
......@@ -64,7 +79,7 @@ class PomfManager {
let filename = url.lastPathComponent
let data = try Data(contentsOf: url)
let mimetype = UTI(filenameExtension: url.pathExtension)?.mimeType ?? "application/octet-stream"
let boundaryStart = "--\(boundary)\r\n"
let boundaryEnd = "--\(boundary)--\r\n"
let contentDispositionString = "Content-Disposition: form-data; name=\"files[]\"; filename=\"\(filename)\"\r\n"
......
......@@ -11,12 +11,12 @@ import Cocoa
class PopoverMenu: NSViewController {
let settingsMenu = NSMenu()
override func viewDidLoad() {
super.viewDidLoad()
// Do view setup here.
let settingsItem = NSMenuItem()
settingsItem.action = #selector(openDialog)
settingsItem.action = #selector(presentSettingsDialog)
settingsItem.title = "Settings"
settingsMenu.addItem(settingsItem)
......@@ -33,28 +33,33 @@ class PopoverMenu: NSViewController {
settingsMenu.addItem(quitItem)
}
func presentSettingsDialog(sender: Any) {
let mwc: SettingsView! = SettingsView(windowNibName: "SettingsView")
mwc.window!.orderFront(self)
}
func openDialog(sender: Any) {
let dialog = NSOpenPanel();
let dialog = NSOpenPanel();
dialog.title = "Choose a file to upload.";
dialog.showsResizeIndicator = true;
dialog.showsHiddenFiles = false;
dialog.canChooseDirectories = false;
dialog.canCreateDirectories = false;
dialog.allowsMultipleSelection = false;
dialog.title = "Choose a file to upload.";
dialog.showsResizeIndicator = true;
dialog.showsHiddenFiles = false;
dialog.canChooseDirectories = false;
dialog.canCreateDirectories = false;
dialog.allowsMultipleSelection = false;
if (dialog.runModal() == NSModalResponseOK) {
let result = dialog.url // Pathname of the file
if (dialog.runModal() == NSModalResponseOK) {
let result = dialog.url // Pathname of the file
if (result != nil) {
let path = result!.path
UploadManager().uploadFile(path: path, type: .Pomf, fromQueue: false)
}
} else {
// User clicked on "Cancel"
return
}
if (result != nil) {
let path = result!.path
UploadManager().uploadFile(path: path, type: .GoogleCloudPlatform, fromQueue: false)
}
} else {
// User clicked on "Cancel"
return
}
}
@IBAction func toggleGearMenu(_ sender: Any) {
if let event = NSApplication.shared().currentEvent {
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1611" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="nbW-ZS-0Mg">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Window Controller-->
<scene sceneID="XGe-YS-GoY">
<objects>
<windowController showSeguePresentationStyle="single" id="K52-eP-qPj" sceneMemberID="viewController">
<window key="window" title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" frameAutosaveName="" animationBehavior="default" id="jAv-RQ-erg">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="294" y="362" width="480" height="270"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
<value key="minSize" type="size" width="480" height="270"/>
<value key="maxSize" type="size" width="480" height="270"/>
</window>
</windowController>
<customObject id="mPR-vb-mvS" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-783" y="188"/>
</scene>
<!--Tab View Controller-->
<scene sceneID="ePC-w0-dDb">
<objects>
<tabViewController id="nbW-ZS-0Mg" sceneMemberID="viewController">
<tabViewItems>
<tabViewItem identifier="" id="Iy5-Kh-nWl"/>
<tabViewItem identifier="" id="Ibl-Wc-uAk"/>
</tabViewItems>
<tabView key="tabView" type="noTabsNoBorder" id="qfY-H5-gEY">
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
<autoresizingMask key="autoresizingMask"/>
<font key="font" metaFont="message"/>
<tabViewItems/>
</tabView>
<connections>
<segue destination="cJR-qq-bzj" kind="relationship" relationship="tabItems" id="aNz-UN-TXk"/>
<segue destination="ZhP-Ki-RIv" kind="relationship" relationship="tabItems" id="CHt-LF-4Y9"/>
</connections>
</tabViewController>
<customObject id="JCA-bu-FrE" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-560" y="585"/>
</scene>
<!--View Controller-->
<scene sceneID="6LX-9D-HFS">
<objects>
<viewController id="cJR-qq-bzj" sceneMemberID="viewController">
<view key="view" id="oGi-WI-hMc">
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
<autoresizingMask key="autoresizingMask"/>
</view>
</viewController>
<customObject id="zK4-hK-CGu" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="168" y="404"/>
</scene>
<!--View Controller-->
<scene sceneID="fIW-9U-OoM">
<objects>
<viewController id="ZhP-Ki-RIv" sceneMemberID="viewController">
<view key="view" id="o0i-ch-bdg">
<rect key="frame" x="0.0" y="0.0" width="450" height="300"/>
<autoresizingMask key="autoresizingMask"/>
</view>
</viewController>
<customObject id="gez-9W-6mG" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="168" y="765"/>
</scene>
</scenes>
</document>
//
// SettingsView.swift
// Screenshottr
//
// Created by Spotlight IsHere on 1/7/18.
// Copyright © 2018 JOS Computing. All rights reserved.
//
import Cocoa
class SettingsView: NSWindowController {
override func windowDidLoad() {
super.windowDidLoad()
// Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
print("testing")
}
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="15G19009" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner"/>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
<autoresizingMask key="autoresizingMask"/>
</view>
</window>
</objects>
</document>
......@@ -115,7 +115,7 @@ class UploadManager : NSObject {
// We leave this as its own function for usage in failures in other areas.
func showFailureNotification(errorText: String) {
let notification = NSUserNotification()
notification.title = "Something went wrong."
notification.title = "Screenshot machine 🅱roke."
notification.informativeText = errorText
NSUserNotificationCenter.default.deliver(notification)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment