|
@@ -150,11 +150,11 @@ class SKPresentationOptionsSheetController: NSWindowController, NSWindowDelegate
|
|
}
|
|
}
|
|
|
|
|
|
func stopObservingTransitions(infos: [KMTransitionInfo]) {
|
|
func stopObservingTransitions(infos: [KMTransitionInfo]) {
|
|
- for info in infos {
|
|
|
|
- info.removeObserver(self, forKeyPath: TRANSITIONSTYLE_KEY)
|
|
|
|
- info.removeObserver(self, forKeyPath: DURATION_KEY)
|
|
|
|
- info.removeObserver(self, forKeyPath: SHOULDRESTRICT_KEY)
|
|
|
|
- }
|
|
|
|
|
|
+// for info in infos {
|
|
|
|
+// info.removeObserver(self, forKeyPath: TRANSITIONSTYLE_KEY)
|
|
|
|
+// info.removeObserver(self, forKeyPath: DURATION_KEY)
|
|
|
|
+// info.removeObserver(self, forKeyPath: SHOULDRESTRICT_KEY)
|
|
|
|
+// }
|
|
}
|
|
}
|
|
|
|
|
|
func creatTransitionController() {
|
|
func creatTransitionController() {
|
|
@@ -229,11 +229,11 @@ class SKPresentationOptionsSheetController: NSWindowController, NSWindowDelegate
|
|
}
|
|
}
|
|
|
|
|
|
func startObservingTransitions(_ infos: [KMTransitionInfo]) {
|
|
func startObservingTransitions(_ infos: [KMTransitionInfo]) {
|
|
- for info in infos {
|
|
|
|
- info.addObserver(self, forKeyPath: TRANSITIONSTYLE_KEY, options: [.new, .old], context: &SKTransitionPropertiesObservationContext)
|
|
|
|
- info.addObserver(self, forKeyPath: DURATION_KEY, options: [.new, .old], context: &SKTransitionPropertiesObservationContext)
|
|
|
|
- info.addObserver(self, forKeyPath: SHOULDRESTRICT_KEY, options: [.new, .old], context: &SKTransitionPropertiesObservationContext)
|
|
|
|
- }
|
|
|
|
|
|
+// for info in infos {
|
|
|
|
+// info.addObserver(self, forKeyPath: TRANSITIONSTYLE_KEY, options: [.new, .old], context: &SKTransitionPropertiesObservationContext)
|
|
|
|
+// info.addObserver(self, forKeyPath: DURATION_KEY, options: [.new, .old], context: &SKTransitionPropertiesObservationContext)
|
|
|
|
+// info.addObserver(self, forKeyPath: SHOULDRESTRICT_KEY, options: [.new, .old], context: &SKTransitionPropertiesObservationContext)
|
|
|
|
+// }
|
|
}
|
|
}
|
|
|
|
|
|
func makeTransitions() {
|
|
func makeTransitions() {
|
|
@@ -243,7 +243,7 @@ class SKPresentationOptionsSheetController: NSWindowController, NSWindowDelegate
|
|
var labelWidth: CGFloat = 0.0
|
|
var labelWidth: CGFloat = 0.0
|
|
|
|
|
|
var array = [Any]()
|
|
var array = [Any]()
|
|
- _ = transition.properties
|
|
|
|
|
|
+ let dictionary: NSDictionary? = transition.properties
|
|
let arr: NSArray? = transitionController.pageTransitions as NSArray?
|
|
let arr: NSArray? = transitionController.pageTransitions as NSArray?
|
|
let ptEnum = arr?.objectEnumerator()
|
|
let ptEnum = arr?.objectEnumerator()
|
|
var tn: KMThumbnail? = nil
|
|
var tn: KMThumbnail? = nil
|
|
@@ -252,8 +252,8 @@ class SKPresentationOptionsSheetController: NSWindowController, NSWindowDelegate
|
|
if tn != nil {
|
|
if tn != nil {
|
|
let info = KMTransitionInfo()
|
|
let info = KMTransitionInfo()
|
|
info.thumbnail = tn
|
|
info.thumbnail = tn
|
|
- info.label = "\(tn!.label)\(RIGHTARROW_CHARACTER)\(next.label)"
|
|
|
|
- info.properties = ptEnum?.nextObject() as? NSDictionary
|
|
|
|
|
|
+ info.label = "\(tn!.label)"+"→"+"\(next.label)"
|
|
|
|
+ info.properties = ((ptEnum?.nextObject()) != nil) ? ptEnum?.nextObject() as? NSDictionary : dictionary
|
|
array.append(info)
|
|
array.append(info)
|
|
(cell as AnyObject).setStringValue(info.label)
|
|
(cell as AnyObject).setStringValue(info.label)
|
|
labelWidth = max(labelWidth, ceil(((cell as AnyObject).cellSize?.width)!))
|
|
labelWidth = max(labelWidth, ceil(((cell as AnyObject).cellSize?.width)!))
|
|
@@ -377,8 +377,18 @@ class SKPresentationOptionsSheetController: NSWindowController, NSWindowDelegate
|
|
}
|
|
}
|
|
}
|
|
}
|
|
func numberOfRows(in tableView: NSTableView) -> Int {
|
|
func numberOfRows(in tableView: NSTableView) -> Int {
|
|
- return 0
|
|
|
|
- }
|
|
|
|
|
|
+ return transitions?.count ?? 0
|
|
|
|
+ }
|
|
|
|
+// func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
|
|
|
|
+// let identifier = tableColumn!.identifier
|
|
|
|
+// let info = transitions?[row]
|
|
|
|
+// if identifier.rawValue == PAGE_COLUMNID {
|
|
|
|
+//
|
|
|
|
+// } else if identifier.rawValue == IMAGE_COLUMNID {
|
|
|
|
+//
|
|
|
|
+// }
|
|
|
|
+// return nil
|
|
|
|
+// }
|
|
func tableView(_ tableView: NSTableView, objectValueFor tableColumn: NSTableColumn?, row: Int) -> Any? {
|
|
func tableView(_ tableView: NSTableView, objectValueFor tableColumn: NSTableColumn?, row: Int) -> Any? {
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|