Rename templateImage to just image since we don't use template images anymore

This commit is contained in:
Maurice Parker 2020-10-30 15:42:45 -05:00
parent d4dbc5a8b2
commit 198a5c29bf
9 changed files with 12 additions and 12 deletions

View File

@ -92,7 +92,7 @@ struct EnableExtensionPointView: View {
ForEach(extensionPointTypeNames, id: \.self, content: { extensionPointTypeName in
let extensionPointType = typeFromName(extensionPointTypeName)
HStack(alignment: .center) {
Image(nsImage: extensionPointType.templateImage)
Image(nsImage: extensionPointType.image)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 25, height: 25, alignment: .center)
@ -129,7 +129,7 @@ struct EnableExtensionPointView: View {
ForEach(extensionPointTypeNames, id: \.self, content: { extensionPointTypeName in
let extensionPointType = typeFromName(extensionPointTypeName)
HStack(alignment: .center) {
Image(nsImage: extensionPointType.templateImage)
Image(nsImage: extensionPointType.image)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 25, height: 25, alignment: .center)

View File

@ -29,7 +29,7 @@ class ExtensionPointDetailViewController: NSViewController {
override func viewDidLoad() {
super.viewDidLoad()
guard let extensionPoint = extensionPoint else { return }
imageView.image = extensionPoint.templateImage
imageView.image = extensionPoint.image
titleLabel.stringValue = extensionPoint.title
descriptionLabel.attributedStringValue = extensionPoint.description
}

View File

@ -33,7 +33,7 @@ class ExtensionPointEnableWindowController: NSWindowController {
super.windowDidLoad()
guard let extensionPointType = extensionPointType else { return }
imageView.image = extensionPointType.templateImage
imageView.image = extensionPointType.image
titleLabel.stringValue = extensionPointType.title
descriptionLabel.attributedStringValue = extensionPointType.description
}

View File

@ -87,7 +87,7 @@ extension ExtensionPointPreferencesViewController: NSTableViewDelegate {
if let cell = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "Cell"), owner: nil) as? NSTableCellView {
let extensionPoint = activeExtensionPoints[row]
cell.textField?.stringValue = extensionPoint.title
cell.imageView?.image = extensionPoint.templateImage
cell.imageView?.image = extensionPoint.image
return cell
}
return nil

View File

@ -18,7 +18,7 @@ protocol ExtensionPoint {
static var isSinglton: Bool { get }
static var isDeveloperBuildRestricted: Bool { get }
static var title: String { get }
static var templateImage: RSImage { get }
static var image: RSImage { get }
static var description: NSAttributedString { get }
var title: String { get }
@ -28,8 +28,8 @@ protocol ExtensionPoint {
extension ExtensionPoint {
var templateImage: RSImage {
return extensionPointID.extensionPointType.templateImage
var image: RSImage {
return extensionPointID.extensionPointType.image
}
var description: NSAttributedString {

View File

@ -14,7 +14,7 @@ extension RedditFeedProvider: ExtensionPoint {
static var isSinglton = false
static var isDeveloperBuildRestricted = true
static var title = NSLocalizedString("Reddit", comment: "Reddit")
static var templateImage = AppAssets.extensionPointReddit
static var image = AppAssets.extensionPointReddit
static var description: NSAttributedString = {
return RedditFeedProvider.makeAttrString("This extension enables you to subscribe to Reddit URL's as if they were RSS feeds. It only works with \(Account.defaultLocalAccountName) or iCloud accounts.")
}()

View File

@ -15,7 +15,7 @@ final class SendToMarsEditCommand: ExtensionPoint, SendToCommand {
static var isSinglton = true
static var isDeveloperBuildRestricted = false
static var title = NSLocalizedString("MarsEdit", comment: "MarsEdit")
static var templateImage = AppAssets.extensionPointMarsEdit
static var image = AppAssets.extensionPointMarsEdit
static var description: NSAttributedString = {
let attrString = SendToMarsEditCommand.makeAttrString("This extension enables share menu functionality to send selected article text to MarsEdit. You need the MarsEdit application for this to work.")
let range = NSRange(location: 81, length: 8)

View File

@ -17,7 +17,7 @@ final class SendToMicroBlogCommand: ExtensionPoint, SendToCommand {
static var isSinglton = true
static var isDeveloperBuildRestricted = false
static var title: String = NSLocalizedString("Micro.blog", comment: "Micro.blog")
static var templateImage = AppAssets.extensionPointMicroblog
static var image = AppAssets.extensionPointMicroblog
static var description: NSAttributedString = {
let attrString = SendToMicroBlogCommand.makeAttrString("This extension enables share menu functionality to send selected article text to Micro.blog. You need the Micro.blog application for this to work.")
let range = NSRange(location: 81, length: 10)

View File

@ -14,7 +14,7 @@ extension TwitterFeedProvider: ExtensionPoint {
static var isSinglton = false
static var isDeveloperBuildRestricted = true
static var title = NSLocalizedString("Twitter", comment: "Twitter")
static var templateImage = AppAssets.extensionPointTwitter
static var image = AppAssets.extensionPointTwitter
static var description: NSAttributedString = {
return TwitterFeedProvider.makeAttrString("This extension enables you to subscribe to Twitter URL's as if they were RSS feeds. It only works with \(Account.defaultLocalAccountName) or iCloud accounts.")
}()