Revision: 28778
          http://sourceforge.net/p/bibdesk/svn/28778
Author:   hofman
Date:     2024-02-20 17:01:31 +0000 (Tue, 20 Feb 2024)
Log Message:
-----------
use activateFileViewerSelectingURLs: to reveal multiple files

Modified Paths:
--------------
    trunk/bibdesk/BDSKEditor.m
    trunk/bibdesk/BibDocument_Actions.m

Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m  2024-02-20 16:47:08 UTC (rev 28777)
+++ trunk/bibdesk/BDSKEditor.m  2024-02-20 17:01:31 UTC (rev 28778)
@@ -512,11 +512,8 @@
     else
         urls = [publication valueForKeyPath:@"localFiles.URL"];
     
-    for (fileURL in urls) {
-        if ([fileURL isEqual:[NSNull null]] == NO) {
-            [[NSWorkspace sharedWorkspace]  selectFile:[fileURL path] 
inFileViewerRootedAtPath:@""];
-        }
-    }
+    if ([urls count])
+        [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:urls];
 }
 
 - (IBAction)openLinkedURL:(id)sender{

Modified: trunk/bibdesk/BibDocument_Actions.m
===================================================================
--- trunk/bibdesk/BibDocument_Actions.m 2024-02-20 16:47:08 UTC (rev 28777)
+++ trunk/bibdesk/BibDocument_Actions.m 2024-02-20 17:01:31 UTC (rev 28778)
@@ -833,11 +833,8 @@
 - (void)revealLinkedFiles:(NSArray *)urls {
     if (urls == nil)
         urls = [self clickedOrSelectedFileURLs];
-    for (NSURL *fileURL in urls) {
-        if ([fileURL isEqual:[NSNull null]] == NO) {
-            [[NSWorkspace sharedWorkspace]  selectFile:[fileURL path] 
inFileViewerRootedAtPath:@""];
-        }
-    }
+    if ([urls count])
+        [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:urls];
 }
 
 - (IBAction)revealLinkedFile:(id)sender{

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

Reply via email to