Add support for sharing to MarsEdit 5. Fix #4289.

This commit is contained in:
Brent Simmons 2024-11-16 12:33:38 -08:00
parent f468585487
commit 4d5b749a65
3 changed files with 6 additions and 2 deletions

View File

@ -13,6 +13,7 @@
<key>com.apple.security.temporary-exception.apple-events</key>
<array>
<string>com.red-sweater.marsedit4</string>
<string>com.red-sweater.marsedit5</string>
</array>
<key>com.apple.security.application-groups</key>
<array>

View File

@ -29,6 +29,7 @@
<key>com.apple.security.temporary-exception.apple-events</key>
<array>
<string>com.red-sweater.marsedit4</string>
<string>com.red-sweater.marsedit5</string>
</array>
</dict>
</plist>

View File

@ -15,7 +15,7 @@ final class SendToMarsEditCommand: SendToCommand {
let title = "MarsEdit"
let image: RSImage? = AppAssets.marsEditIcon
private let marsEditApps = [UserApp(bundleID: "com.red-sweater.marsedit4"), UserApp(bundleID: "com.red-sweater.marsedit")]
private let marsEditApps = [UserApp(bundleID: "com.red-sweater.marsedit5"), UserApp(bundleID: "com.red-sweater.marsedit4"), UserApp(bundleID: "com.red-sweater.marsedit")]
func canSendObject(_ object: Any?, selectedText: String?) -> Bool {
appToUse() != nil
@ -62,7 +62,9 @@ private extension SendToMarsEditCommand {
func appToUse() -> UserApp? {
marsEditApps.forEach{ $0.updateStatus() }
for app in marsEditApps {
app.updateStatus()
}
for app in marsEditApps {
if app.isRunning {