Change preference pane to Extensions for demo purposes.

This commit is contained in:
Maurice Parker 2020-04-07 12:02:07 -05:00
parent fed8fbce98
commit f8667be32b
9 changed files with 40 additions and 9 deletions

View File

@ -11,7 +11,9 @@ import RSCore
public enum FeedProviderType: Int, Codable {
// Raw values should not change since theyre stored.
case twitter = 1
case marsEdit = 1
case microblog = 2
case twitter = 3
}

View File

@ -45,6 +45,18 @@ struct AppAssets {
return RSImage(named: "accountNewsBlur")
}()
static var adapterMarsEdit: RSImage = {
return RSImage(named: "adapterMarsEdit")!
}()
static var adapterMicroblog: RSImage = {
return RSImage(named: "adapterMicroblog")!
}()
static var adapterTwitter: RSImage = {
return RSImage(named: "adapterTwitter")!
}()
static var articleExtractor: RSImage! = {
return RSImage(named: "articleExtractor")
}()
@ -78,7 +90,7 @@ struct AppAssets {
}()
static var bookmarkImage: RSImage? = {
let path = "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/BookmarkIcon.icns"
let path = "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/KEXT.icns"
let image = RSImage(contentsOfFile: path)
return image
}()
@ -87,10 +99,6 @@ struct AppAssets {
return RSImage(named: "faviconTemplateImage")!
}()
static var feedProviderTwitter: RSImage = {
return RSImage(named: "feedProviderTwitter")!
}()
static var filterActive: RSImage = {
return RSImage(named: "filterActive")!
}()

View File

@ -16,7 +16,7 @@ class FeedProvidersAddViewController: NSViewController {
private var accountsAddWindowController: NSWindowController?
#if DEBUG
private var addableFeedProviderTypes: [FeedProviderType] = [.twitter]
private var addableFeedProviderTypes: [FeedProviderType] = [.marsEdit, .microblog, .twitter]
#else
private var addableFeedProviderTypes: [FeedProviderType] = [.twitter]
#endif
@ -60,9 +60,15 @@ extension FeedProvidersAddViewController: NSTableViewDelegate {
if let cell = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "Cell"), owner: nil) as? FeedProvidersAddTableCellView {
switch addableFeedProviderTypes[row] {
case .marsEdit:
cell.feedProviderNameLabel?.stringValue = NSLocalizedString("MarsEdit", comment: "MarsEdit")
cell.feedProviderImageView?.image = AppAssets.adapterMarsEdit
case .microblog:
cell.feedProviderNameLabel?.stringValue = NSLocalizedString("Micro.blog", comment: "Micro.blog")
cell.feedProviderImageView?.image = AppAssets.adapterMicroblog
case .twitter:
cell.feedProviderNameLabel?.stringValue = NSLocalizedString("Twitter", comment: "Twitter")
cell.feedProviderImageView?.image = AppAssets.feedProviderTwitter
cell.feedProviderImageView?.image = AppAssets.adapterTwitter
}
return cell
}

View File

@ -41,7 +41,7 @@ class PreferencesWindowController : NSWindowController, NSToolbarDelegate {
name: NSLocalizedString("Accounts", comment: "Preferences"),
image: NSImage(named: NSImage.userAccountsName))]
specs += [PreferencesToolbarItemSpec(identifierRawValue: ToolbarItemIdentifier.FeedProvider,
name: NSLocalizedString("Integrations", comment: "Preferences"),
name: NSLocalizedString("Extensions", comment: "Preferences"),
image: AppAssets.bookmarkImage)]
// Omit the Advanced Preferences for now because the Software Update related functionality is

View File

@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "marsedit.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}

Binary file not shown.