[Bibdesk-commit] SF.net SVN: bibdesk:[27267] trunk/bibdesk/BDSKItemPasteboardHelper.m
Revision: 27267 http://sourceforge.net/p/bibdesk/svn/27267 Author: hofman Date: 2022-03-05 18:34:33 + (Sat, 05 Mar 2022) Log Message: --- Try to write item to pasteboard all the way at the end, so nothing can come in between Modified Paths: -- trunk/bibdesk/BDSKItemPasteboardHelper.m Modified: trunk/bibdesk/BDSKItemPasteboardHelper.m === --- trunk/bibdesk/BDSKItemPasteboardHelper.m2022-03-05 07:30:16 UTC (rev 27266) +++ trunk/bibdesk/BDSKItemPasteboardHelper.m2022-03-05 18:34:33 UTC (rev 27267) @@ -115,15 +115,16 @@ [pboard clearContents]; -if (text != nil) -[pboard writeObjects:[NSArray arrayWithObjects:text, nil]]; -else if (dragCopyType == BDSKDragCopyURL) +NSPasteboardItem *item = nil; + +if (dragCopyType == BDSKDragCopyURL) { [pboard writeURLs:[items valueForKey:@"bdskURL"] names:[items valueForKey:@"citeKey"]]; - -if ([[pboard pasteboardItems] count] > 0) { -[[[pboard pasteboardItems] firstObject] setDataProvider:self forTypes:types]; -} else { -NSPasteboardItem *item = [[[NSPasteboardItem alloc] init] autorelease]; +item = [[pboard pasteboardItems] firstObject]; +} +if (item == nil) { +item = [[[NSPasteboardItem alloc] init] autorelease]; +if (text) +[item setString:text forType:NSPasteboardTypeString]; [item setDataProvider:self forTypes:types]; [pboard writeObjects:[NSArray arrayWithObjects:item, nil]]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[27268] trunk/bibdesk/BDSKItemPasteboardHelper.m
Revision: 27268 http://sourceforge.net/p/bibdesk/svn/27268 Author: hofman Date: 2022-03-05 19:05:24 + (Sat, 05 Mar 2022) Log Message: --- We need to register pasteboard info after clearing the pboard, or it may be removed immediately Modified Paths: -- trunk/bibdesk/BDSKItemPasteboardHelper.m Modified: trunk/bibdesk/BDSKItemPasteboardHelper.m === --- trunk/bibdesk/BDSKItemPasteboardHelper.m2022-03-05 18:34:33 UTC (rev 27267) +++ trunk/bibdesk/BDSKItemPasteboardHelper.m2022-03-05 19:05:24 UTC (rev 27268) @@ -92,8 +92,6 @@ - (void)writeItems:(NSArray *)items textRepresentation:(id)text forDragCopyType:(BDSKDragCopyType)dragCopyType toPasteboard:(NSPasteboard *)pboard { -BDSKASSERT([promisedPboardTypes objectForKey:[pboard name]] == nil); - NSMutableArray *types = [NSMutableArray arrayWithObjects:BDSKPasteboardTypePublications, nil]; switch (dragCopyType) { @@ -111,10 +109,12 @@ break; } +[pboard clearContents]; + +BDSKASSERT([promisedPboardTypes objectForKey:[pboard name]] == nil); + [self setPromisedTypes:types items:items dragCopyType:dragCopyType forPasteboard:pboard]; -[pboard clearContents]; - NSPasteboardItem *item = nil; if (dragCopyType == BDSKDragCopyURL) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit
[Bibdesk-commit] SF.net SVN: bibdesk:[27269] trunk/bibdesk/Bibdesk.xcodeproj/ project.pbxproj
Revision: 27269 http://sourceforge.net/p/bibdesk/svn/27269 Author: amaxwell Date: 2022-03-06 07:30:17 + (Sun, 06 Mar 2022) Log Message: --- Change version to 5851 Modified Paths: -- trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj Modified: trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj === --- trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2022-03-05 19:05:24 UTC (rev 27268) +++ trunk/bibdesk/Bibdesk.xcodeproj/project.pbxproj 2022-03-06 07:30:17 UTC (rev 27269) @@ -6052,7 +6052,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = CE17EE7E0E24F27400DE06EA /* BibDesk-App.xcconfig */; buildSettings = { - CURRENT_PROJECT_VERSION = 5850; + CURRENT_PROJECT_VERSION = 5851; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -6061,7 +6061,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = CE17EE7E0E24F27400DE06EA /* BibDesk-App.xcconfig */; buildSettings = { - CURRENT_PROJECT_VERSION = 5850; + CURRENT_PROJECT_VERSION = 5851; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ___ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit