mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
implement 'current article' property of the application
Also, fix the unique-id based accessors (the four byte code for id was wrong in the sdef) Add valueIn<Key>WithUniqueID accessors Add a few protocols and protocol implementations for the AppDelegate and MainWindowControllor so as to expose needed functionality for scriptability
This commit is contained in:
@@ -385,6 +385,28 @@ extension MainWindowController: NSToolbarDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Scripting Access
|
||||
|
||||
/*
|
||||
the ScriptingMainWindowController protocol exposes a narrow set of accessors with
|
||||
internal visibility which are very similar to some private vars.
|
||||
|
||||
These would be unnecessary if the similar accessors were marked internal rather than private,
|
||||
but for now, we'll keep the stratification of visibility
|
||||
*/
|
||||
|
||||
extension MainWindowController : ScriptingMainWindowController {
|
||||
|
||||
internal var scriptingCurrentArticle: Article? {
|
||||
return self.oneSelectedArticle
|
||||
}
|
||||
|
||||
internal var scriptingSelectedArticles: [Article] {
|
||||
return self.selectedArticles ?? []
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private extension MainWindowController {
|
||||
|
||||
Reference in New Issue
Block a user