From ccd1d4bdc1d02a021bc26166e7a56fa1bbc955b9 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 2 Aug 2019 12:44:24 -0700 Subject: [PATCH 1/2] Wire up the account name for scripting. --- Mac/Resources/NetNewsWire.sdef | 2 +- Mac/Scriptability/Account+Scriptability.swift | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Mac/Resources/NetNewsWire.sdef b/Mac/Resources/NetNewsWire.sdef index 982719b4b..d9facd1da 100644 --- a/Mac/Resources/NetNewsWire.sdef +++ b/Mac/Resources/NetNewsWire.sdef @@ -76,7 +76,7 @@ - + diff --git a/Mac/Scriptability/Account+Scriptability.swift b/Mac/Scriptability/Account+Scriptability.swift index 486a9c7c8..520c3d298 100644 --- a/Mac/Scriptability/Account+Scriptability.swift +++ b/Mac/Scriptability/Account+Scriptability.swift @@ -35,7 +35,17 @@ class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectConta account.isActive = newValue } } - + + @objc(scriptingName) + var scriptingName: NSString { + get { + return account.nameForDisplay as NSString + } + set { + account.name = newValue as String + } + } + // MARK: --- ScriptingObject protocol --- var scriptingKey: String { From 4b5dd7cd179d0f7dbdd14c68ce9add067f277ae6 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 2 Aug 2019 14:03:04 -0700 Subject: [PATCH 2/2] Fix some AppleScript terminology conflicts. Change account.type too account.accountType. Change local account to onmymac. --- Mac/Resources/NetNewsWire.sdef | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mac/Resources/NetNewsWire.sdef b/Mac/Resources/NetNewsWire.sdef index d9facd1da..aa7fb9974 100644 --- a/Mac/Resources/NetNewsWire.sdef +++ b/Mac/Resources/NetNewsWire.sdef @@ -66,7 +66,7 @@ - + @@ -81,7 +81,7 @@ - +