// // AddPerforceController.swift // DocHub // // Created by Tristan Juricek on 6/17/14. // Copyright (c) 2014 Perforce. All rights reserved. // import AppKit import Foundation // Controller to manage a sheet on top of the window to collect connection // settings to a Perforce instance. This will basically collect the username // and password, then get a token from the Perforce server for storage. class AddPerforceController : NSWindowController { func addServer() { println("AddPerforceController.addServer") } @IBOutlet var cancelButton:NSButton @IBOutlet var addButton:NSButton @IBOutlet var hostname:NSTextField @IBOutlet var login:NSTextField @IBOutlet var password:NSSecureTextField @IBAction override func cancelOperation(sender: AnyObject!) { NSApp.endSheet(window!) } @IBAction func tryAdd(sender: AnyObject!) { println("tryAdd hostname(\(hostname.stringValue)) login(\(login.stringValue)) password(\(password.stringValue))") } func done() { window!.orderOut(self) } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 9547 | tjuricek |
Use p4 info to grab the clientAddress which is then used to restrict the hostname token correctly from p4d. (Idea via dscheirer) |
||
#4 | 9545 | tjuricek |
Use the left column to navigate p4 servers as "libraries" with their depots as "areas". I've had to stop using the output of login -p at the moment, since it doesn't quite work with the Objective-C API in lieu of a password. |
||
#3 | 9483 | tjuricek | Basic connection settings serialization in the sandboxed Application Settings directory. | ||
#2 | 9475 | tjuricek |
Set up the positive workflow for AddPerforceController to get a login token. This required adding another couple of methods to provide input to the p4api (which were surprisingly absent from the earlier system). |
||
#1 | 9469 | tjuricek | Add sheet view for collecting Perforce connection information. |