Skip to content

Commit

Permalink
Switch to current pasteboard types
Browse files Browse the repository at this point in the history
  • Loading branch information
barijaona committed Jul 8, 2023
1 parent ced711d commit ada77a5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Vienna/Sources/Main window/ArticleListView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,7 @@ -(BOOL)copyTableSelection:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)
[pboard declareTypes:@[VNAPasteboardTypeRSSItem, VNAPasteboardTypeWebURLsWithTitles, NSPasteboardTypeString, NSPasteboardTypeHTML]
owner:self];
if (count == 1) {
[pboard addTypes:@[VNAPasteboardTypeURL, VNAPasteboardTypeURLName, NSPasteboardTypeURL]
[pboard addTypes:@[NSPasteboardTypeURL, VNAPasteboardTypeURLName]
owner:self];
}

Expand Down Expand Up @@ -1513,7 +1513,7 @@ -(BOOL)copyTableSelection:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)
[fullHTMLText appendFormat:@"<a href=\"%@\">%@</a><br />%@<br /><br />", msgLink, msgTitle, msgText];

if (count == 1) {
[pboard setString:msgLink forType:VNAPasteboardTypeURL];
[pboard setString:msgLink forType:NSPasteboardTypeURL];
[pboard setString:msgTitle forType:VNAPasteboardTypeURLName];

// Write the link to the pastboard.
Expand Down
4 changes: 2 additions & 2 deletions Vienna/Sources/Main window/UnifiedDisplayView.m
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ -(BOOL)copyIndexesSelection:(NSIndexSet*)rowIndexes toPasteboard:(NSPasteboard *
// Set up the pasteboard
[pboard declareTypes:@[VNAPasteboardTypeRSSItem, VNAPasteboardTypeWebURLsWithTitles, NSPasteboardTypeString, NSPasteboardTypeHTML] owner:self];
if (count == 1) {
[pboard addTypes:@[VNAPasteboardTypeURL, VNAPasteboardTypeURLName, NSPasteboardTypeURL]
[pboard addTypes:@[NSPasteboardTypeURL, VNAPasteboardTypeURLName]
owner:self];
}

Expand Down Expand Up @@ -634,7 +634,7 @@ -(BOOL)copyIndexesSelection:(NSIndexSet*)rowIndexes toPasteboard:(NSPasteboard *
[fullHTMLText appendFormat:@"<a href=\"%@\">%@</a><br />%@<br /><br />", msgLink, msgTitle, msgText];

if (count == 1) {
[pboard setString:msgLink forType:VNAPasteboardTypeURL];
[pboard setString:msgLink forType:NSPasteboardTypeURL];
[pboard setString:msgTitle forType:VNAPasteboardTypeURLName];

// Write the link to the pastboard.
Expand Down
1 change: 0 additions & 1 deletion Vienna/Sources/Shared/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ extern NSInteger const MA_Default_ConcurrentDownloads;
extern NSPasteboardType const VNAPasteboardTypeRSSItem;
extern NSPasteboardType const VNAPasteboardTypeFolderList;
extern NSPasteboardType const VNAPasteboardTypeRSSSource;
extern NSPasteboardType const VNAPasteboardTypeURL;
extern NSPasteboardType const VNAPasteboardTypeURLName;
extern NSPasteboardType const VNAPasteboardTypeWebURLsWithTitles;

Expand Down
3 changes: 1 addition & 2 deletions Vienna/Sources/Shared/Constants.m
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,5 @@
NSPasteboardType const VNAPasteboardTypeFolderList = @"ViennaFolderType";
NSPasteboardType const VNAPasteboardTypeRSSSource = @"CorePasteboardFlavorType 0x52535373";
NSPasteboardType const VNAPasteboardTypeRSSItem = @"CorePasteboardFlavorType 0x52535369";
NSPasteboardType const VNAPasteboardTypeURL = @"CorePasteboardFlavorType 0x75726C20";
NSPasteboardType const VNAPasteboardTypeURLName = @"CorePasteboardFlavorType 0x75726C6E";
NSPasteboardType const VNAPasteboardTypeURLName = @"public.url-name";
NSPasteboardType const VNAPasteboardTypeWebURLsWithTitles = @"WebURLsWithTitlesPboardType";

0 comments on commit ada77a5

Please sign in to comment.