Skip to content
Snippets Groups Projects
Verified Commit 1502bff4 authored by Spotlight Deveaux's avatar Spotlight Deveaux :fox:
Browse files

Remove GCP entirely

parent a4e84bf2
No related branches found
No related tags found
No related merge requests found
......@@ -11,11 +11,11 @@ import SKQueue
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
let statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength)
let popover = NSPopover()
let viewController = PopoverMenu(nibName: "PopoverMenu",
bundle: Bundle.main)
bundle: Bundle.main)
func applicationDidFinishLaunching(_ aNotification: Notification) {
statusItem.image = NSImage(named: "status_icon")
......@@ -50,14 +50,15 @@ class AppDelegate: NSObject, NSApplicationDelegate {
func closePopover(sender: AnyObject?) {
popover.performClose(sender)
}
func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}
}
class UploadReceiver: SKQueueDelegate {
func receivedNotification(_ notification: SKQueueNotification, path: String, queue: SKQueue) {
UploadManager().uploadFile(path: path, type: .Pomf, fromQueue: true)
UploadManager().uploadFile(path: path, fromQueue: true)
}
}
......@@ -53,7 +53,7 @@ class PopoverMenu: NSViewController {
if (result != nil) {
let path = result!.path
UploadManager().uploadFile(path: path, type: .Pomf, fromQueue: false)
UploadManager().uploadFile(path: path, fromQueue: false)
}
} else {
// User clicked on "Cancel"
......
......@@ -10,14 +10,9 @@ import Foundation
import AppKit
class UploadManager : NSObject {
enum UploadTypes: Int {
case GoogleCloudPlatform = 1
case Pomf = 2
}
let uploadingKey = "isUploadingAlready"
func uploadFile(path: String, type: UploadTypes, fromQueue: Bool) {
func uploadFile(path: String, fromQueue: Bool) {
if (fromQueue) {
let defaults = UserDefaults.standard
if (defaults.bool(forKey: uploadingKey)) {
......
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