mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-22 23:58:36 +01:00
Fix deprecation warnings.
This commit is contained in:
parent
d2afd4582b
commit
a1a199860e
@ -10,6 +10,7 @@ import AppKit
|
||||
import RSCore
|
||||
import RSWeb
|
||||
import UserNotifications
|
||||
import UniformTypeIdentifiers
|
||||
|
||||
final class GeneralPreferencesViewController: NSViewController {
|
||||
|
||||
@ -125,7 +126,7 @@ private extension GeneralPreferencesViewController {
|
||||
let item = NSMenuItem(title: name, action: nil, keyEquivalent: "")
|
||||
item.representedObject = browser.bundleIdentifier
|
||||
|
||||
let icon = browser.icon ?? NSWorkspace.shared.icon(forFileType: kUTTypeApplicationBundle as String)
|
||||
let icon = browser.icon ?? NSWorkspace.shared.icon(for: UTType.applicationBundle)
|
||||
icon.size = NSSize(width: 16.0, height: 16.0)
|
||||
item.image = browser.icon
|
||||
menu.addItem(item)
|
||||
|
@ -61,14 +61,14 @@ class ShareViewController: NSViewController {
|
||||
// Try to get the URL if it is passed in as a URL
|
||||
for item in self.extensionContext!.inputItems as! [NSExtensionItem] {
|
||||
for itemProvider in item.attachments! {
|
||||
if itemProvider.hasItemConformingToTypeIdentifier(kUTTypeURL as String) {
|
||||
if itemProvider.hasItemConformingToTypeIdentifier(UTType.url.identifier) {
|
||||
provider = itemProvider
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if provider != nil {
|
||||
provider!.loadItem(forTypeIdentifier: kUTTypeURL as String, options: nil, completionHandler: { [weak self] (urlCoded, error) in
|
||||
provider!.loadItem(forTypeIdentifier: UTType.url.identifier, options: nil, completionHandler: { [weak self] (urlCoded, error) in
|
||||
if error != nil {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user