Add an active property to the scripting definition for Account.

This commit is contained in:
Brent Simmons 2019-07-29 19:56:22 -07:00
parent 887f8e0b53
commit 31e089fc1d
2 changed files with 15 additions and 2 deletions

View File

@ -84,7 +84,10 @@
<property name="type" code="ATyp" type="account type" access="r" description="The type of the account">
<cocoa key="accountType"/>
</property>
<property name="contents" code="Cnts" access="r" description="The type of the account">
<property name="active" code="Actv" type="boolean" access="rw" description="Whether or not the account is active">
<cocoa key="scriptingIsActive"/>
</property>
<property name="contents" code="Cnts" access="r" description="The type of the account">
<cocoa key="contents"/>
<type type="account item" list="yes"/>
</property>

View File

@ -26,6 +26,16 @@ class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectConta
return (scriptObjectSpecifier)
}
@objc(scriptingIsActive)
var scriptingIsActive: Bool {
get {
return account.isActive
}
set {
account.isActive = newValue
}
}
// MARK: --- ScriptingObject protocol ---
var scriptingKey: String {