Merge pull request #1621 from Wevah/ios-candidate

Update to latest RSCore, and add MarsEdit to the AppleEvents temporary entitlement
This commit is contained in:
Brent Simmons 2020-01-13 14:26:10 -08:00 committed by GitHub
commit 59de1edbfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 33 additions and 19 deletions

View File

@ -285,7 +285,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
tableView.scrollTo(row: 0, extraHeight: 0)
}
tableView.rs_selectRow(nextRowIndex)
tableView.selectRow(nextRowIndex)
let followingRowIndex = nextRowIndex - 1
if followingRowIndex < 0 {
@ -307,7 +307,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
tableView.scrollTo(row: tableMaxIndex, extraHeight: 0)
}
tableView.rs_selectRow(nextRowIndex)
tableView.selectRow(nextRowIndex)
let followingRowIndex = nextRowIndex + 1
if followingRowIndex > tableMaxIndex {
@ -412,7 +412,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
guard let ix = articles.firstIndex(where: { $0.articleID == articleID }) else { return }
NSCursor.setHiddenUntilMouseMoves(true)
tableView.rs_selectRow(ix)
tableView.selectRow(ix)
tableView.scrollTo(row: ix)
}
@ -421,7 +421,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
return
}
NSCursor.setHiddenUntilMouseMoves(true)
tableView.rs_selectRow(ix)
tableView.selectRow(ix)
tableView.scrollTo(row: ix)
}
@ -443,7 +443,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr
window.makeFirstResponderUnlessDescendantIsFirstResponder(tableView)
if !hasAtLeastOneSelectedArticle && articles.count > 0 {
tableView.rs_selectRowAndScrollToVisible(0)
tableView.selectRowAndScrollToVisible(0)
}
}

View File

@ -2,8 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.developer.icloud-container-identifiers</key>
<array/>
<key>com.apple.security.automation.apple-events</key>
@ -12,5 +12,9 @@
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.temporary-exception.apple-events</key>
<array>
<string>com.red-sweater.marsedit4</string>
</array>
</dict>
</plist>

View File

@ -170,6 +170,6 @@ class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectConta
case .freshRSS:
osType = "Frsh"
}
return osType.fourCharCode()
return osType.fourCharCode
}
}

View File

@ -22,7 +22,7 @@ extension NSScriptCommand {
func isCreateCommand(forClass whatClass:String) -> Bool {
guard let arguments = self.arguments else {return false}
guard let newObjectClass = arguments["ObjectClass"] as? Int else {return false}
guard (newObjectClass.fourCharCode() == whatClass.fourCharCode()) else {return false}
guard (newObjectClass.fourCharCode == whatClass.fourCharCode) else {return false}
return true
}
@ -36,12 +36,12 @@ extension NSScriptCommand {
print("insertionLocation : \(insertionLocationDescriptor)")
// insertion location can be a typeObjectSpecifier, e.g. 'in account "Acct"'
// or a typeInsertionLocation, e.g. 'at end of folder "
if (insertionLocationDescriptor.descriptorType == "insl".fourCharCode()) {
descriptorToConsider = insertionLocationDescriptor.forKeyword("kobj".fourCharCode())
} else if ( insertionLocationDescriptor.descriptorType == "obj ".fourCharCode()) {
if (insertionLocationDescriptor.descriptorType == "insl".fourCharCode) {
descriptorToConsider = insertionLocationDescriptor.forKeyword("kobj".fourCharCode)
} else if ( insertionLocationDescriptor.descriptorType == "obj ".fourCharCode) {
descriptorToConsider = insertionLocationDescriptor
}
} else if let subjectDescriptor = appleEvent.attributeDescriptor(forKeyword:"subj".fourCharCode()) {
} else if let subjectDescriptor = appleEvent.attributeDescriptor(forKeyword:"subj".fourCharCode) {
descriptorToConsider = subjectDescriptor
}

View File

@ -6,7 +6,12 @@
// Copyright © 2015 Ranchero Software, LLC. All rights reserved.
//
import Foundation
#if os(macOS)
import AppKit
#else
import UIKit
#endif
import RSCore
let ArticleStyleNamesDidChangeNotification = "ArticleStyleNamesDidChangeNotification"

View File

@ -57,7 +57,7 @@ private extension SendToMarsEditCommand {
let body = article.contentHTML ?? article.contentText ?? article.summary
let authorName = article.authors?.first?.name
let sender = SendToBlogEditorApp(targetDesciptor: targetDescriptor, title: article.title, body: body, summary: article.summary, link: article.externalURL, permalink: article.url, subject: nil, creator: authorName, commentsURL: nil, guid: article.uniqueID, sourceName: article.webFeed?.nameForDisplay, sourceHomeURL: article.webFeed?.homePageURL, sourceFeedURL: article.webFeed?.url)
let sender = SendToBlogEditorApp(targetDescriptor: targetDescriptor, title: article.title, body: body, summary: article.summary, link: article.externalURL, permalink: article.url, subject: nil, creator: authorName, commentsURL: nil, guid: article.uniqueID, sourceName: article.webFeed?.nameForDisplay, sourceHomeURL: article.webFeed?.homePageURL, sourceFeedURL: article.webFeed?.url)
let _ = sender.send()
}

View File

@ -6,7 +6,12 @@
// Copyright © 2019 Ranchero Software. All rights reserved.
//
import Foundation
#if os(macOS)
import AppKit
#else
import UIKit
#endif
import RSCore
final class IconImage {

View File

@ -29,7 +29,7 @@ extension PseudoFeed {
}
#else
import Foundation
import UIKit
import Articles
import Account
import RSCore

View File

@ -22,7 +22,7 @@ extension NSAppleEventDescriptor {
print ("error: usrfDictionary() expected input to be a record")
return [:]
}
guard let usrfList = self.forKeyword("usrf".fourCharCode()) else {
guard let usrfList = self.forKeyword("usrf".fourCharCode) else {
print ("error: usrfDictionary() couldn't find usrf")
return [:]
}

@ -1 +1 @@
Subproject commit 070f40e9b39ac428d09eafeb8b47ce8dde78ced8
Subproject commit 2eca01e52f7b722b25523d46d2341baa54dca6d1