Adapt to revised print delegate methods
This commit is contained in:
parent
30652c5627
commit
d3894153fa
|
@ -52,6 +52,7 @@ class ASProjDoc: NSDocument, NSOutlineViewDelegate, NSMenuDelegate, NSOpenSavePa
|
||||||
var printingDone : () -> () = {}
|
var printingDone : () -> () = {}
|
||||||
var printModDate : NSDate?
|
var printModDate : NSDate?
|
||||||
var printRevision : String?
|
var printRevision : String?
|
||||||
|
var printShowPanel = false
|
||||||
|
|
||||||
let kVersionKey = "Version"
|
let kVersionKey = "Version"
|
||||||
let kCurVersion = 1.0
|
let kCurVersion = 1.0
|
||||||
|
@ -294,11 +295,12 @@ class ASProjDoc: NSDocument, NSOutlineViewDelegate, NSMenuDelegate, NSOpenSavePa
|
||||||
}
|
}
|
||||||
printModDate = mainEditor?.modDate()
|
printModDate = mainEditor?.modDate()
|
||||||
printRevision = mainEditor?.revision()
|
printRevision = mainEditor?.revision()
|
||||||
|
printShowPanel = showPrintPanel
|
||||||
|
|
||||||
editor.print(self)
|
editor.print(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
func printSettings() -> NSPrintInfo! {
|
func printInformation() -> NSPrintInfo! {
|
||||||
var info = printInfo.copy() as! NSPrintInfo
|
var info = printInfo.copy() as! NSPrintInfo
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -327,10 +329,11 @@ class ASProjDoc: NSDocument, NSOutlineViewDelegate, NSMenuDelegate, NSOpenSavePa
|
||||||
return info
|
return info
|
||||||
}
|
}
|
||||||
|
|
||||||
func printJobTitle() -> String! {
|
func startPrintOperation(printOp: NSPrintOperation) {
|
||||||
return mainEditor?.nodeName() ??
|
printOp.jobTitle = mainEditor?.nodeName() ??
|
||||||
fileURL?.lastPathComponent?.stringByDeletingPathExtension ??
|
fileURL?.lastPathComponent?.stringByDeletingPathExtension ??
|
||||||
"Untitled"
|
"Untitled"
|
||||||
|
printOp.showsPrintPanel = printShowPanel
|
||||||
}
|
}
|
||||||
|
|
||||||
func printHeaderHeight() -> Float {
|
func printHeaderHeight() -> Float {
|
||||||
|
@ -421,7 +424,7 @@ class ASProjDoc: NSDocument, NSOutlineViewDelegate, NSMenuDelegate, NSOpenSavePa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func printingComplete() {
|
func endPrintOperation() {
|
||||||
printingDone()
|
printingDone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user