mirror of
https://github.com/transmission/transmission
synced 2024-12-22 07:42:37 +00:00
chore: replace deprecated NSNamePboardType with NSPasteboardTypeName (#6107)
* chore: replace deprecated NSNamePboardType with NSPasteboardTypeName * chore: remove NSServices section from Info.plist It appears to be noop on modern macOS if no action specified.
This commit is contained in:
parent
2df67c1a73
commit
1b53226853
3 changed files with 3 additions and 27 deletions
|
@ -75,18 +75,6 @@
|
|||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSServices</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPortName</key>
|
||||
<string>Transmission</string>
|
||||
<key>NSSendTypes</key>
|
||||
<array>
|
||||
<string>NSStringPboardType</string>
|
||||
<string>NSURLPboardType</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||
<true/>
|
||||
<key>SUAllowsAutomaticUpdates</key>
|
||||
|
|
|
@ -79,18 +79,6 @@
|
|||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
<key>NSServices</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>NSPortName</key>
|
||||
<string>Transmission</string>
|
||||
<key>NSSendTypes</key>
|
||||
<array>
|
||||
<string>NSStringPboardType</string>
|
||||
<string>NSURLPboardType</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||
<true/>
|
||||
<key>SUAllowsAutomaticUpdates</key>
|
||||
|
|
|
@ -659,8 +659,8 @@ static NSTimeInterval const kToggleProgressSeconds = 0.175;
|
|||
}
|
||||
NSPasteboard* pasteBoard = NSPasteboard.generalPasteboard;
|
||||
NSString* links = [[selectedTorrents valueForKeyPath:@"magnetLink"] componentsJoinedByString:@"\n"];
|
||||
[pasteBoard declareTypes:@[ NSStringPboardType ] owner:nil];
|
||||
[pasteBoard setString:links forType:NSStringPboardType];
|
||||
[pasteBoard declareTypes:@[ NSPasteboardTypeString ] owner:nil];
|
||||
[pasteBoard setString:links forType:NSPasteboardTypeString];
|
||||
}
|
||||
|
||||
- (void)paste:(id)sender
|
||||
|
@ -706,7 +706,7 @@ static NSTimeInterval const kToggleProgressSeconds = 0.175;
|
|||
|
||||
if (action == @selector(paste:))
|
||||
{
|
||||
if ([NSPasteboard.generalPasteboard.types containsObject:NSURLPboardType])
|
||||
if ([NSPasteboard.generalPasteboard.types containsObject:NSPasteboardTypeURL])
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue