From ccd1d4bdc1d02a021bc26166e7a56fa1bbc955b9 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 2 Aug 2019 12:44:24 -0700 Subject: [PATCH] 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 {