Revision: 29397
          http://sourceforge.net/p/bibdesk/svn/29397
Author:   hofman
Date:     2025-07-30 08:54:37 +0000 (Wed, 30 Jul 2025)
Log Message:
-----------
move sharingServices to UI category

Modified Paths:
--------------
    trunk/bibdesk/BibDocument.h
    trunk/bibdesk/BibDocument.m
    trunk/bibdesk/BibDocument_UI.h
    trunk/bibdesk/BibDocument_UI.m

Modified: trunk/bibdesk/BibDocument.h
===================================================================
--- trunk/bibdesk/BibDocument.h 2025-07-29 14:54:00 UTC (rev 29396)
+++ trunk/bibdesk/BibDocument.h 2025-07-30 08:54:37 UTC (rev 29397)
@@ -442,8 +442,6 @@
 - (void)runScriptHookWithName:(NSString *)name forPublications:(nullable 
NSArray *)items completionHandler:(void (^ _Nullable)(BOOL cancelled))handler;
 - (void)runScriptHookWithName:(NSString *)name forPublications:(nullable 
NSArray *)items field:(nullable NSString *)field oldValues:(nullable NSArray 
*)oldValues newValues:(nullable NSArray *)newValues completionHandler:(void (^ 
_Nullable)(BOOL cancelled))handler;
 
-@property (nonatomic, nullable, readonly) NSArray *sharingServices;
-
 @property (nonatomic, readonly) NSDate *openDate;
 
 @end

Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2025-07-29 14:54:00 UTC (rev 29396)
+++ trunk/bibdesk/BibDocument.m 2025-07-30 08:54:37 UTC (rev 29397)
@@ -187,7 +187,7 @@
 @implementation BibDocument
 
 @synthesize documentWindow, tableView, mainScrollView, splitView, mainBox, 
mainView, controlContentView, controlContentViewHeightConstraint, statusBar, 
groupOutlineView, groupSplitView, groupActionButton, groupAddButton, 
groupButtonView, groupButtonViewWidthConstraint, groupFieldMenu, 
sidePreviewTabView, sidePreviewTextView, sideFileView, sidePreviewButton, 
sidePreviewButtonView, sidePreviewButtonViewWidthConstraint, 
bottomPreviewTabView, bottomPreviewTextView, bottomFileView, 
bottomPreviewButton, actionMenuButton, groupActionMenuButton, searchField, 
groupMenu, actionMenu, alternateCopyMenu, sharingMenu, publications, 
shownPublications, groups, documentInfo, macroResolver, basePath, openDate;
-@dynamic atomData, MODSData, endNoteData, wordXMLData, numberOfSelectedPubs, 
numberOfClickedOrSelectedPubs, selectedPublications, 
clickedOrSelectedPublications, singleSelectedPublication, selectedFileURLs, 
clickedOrSelectedFileURLs, selectedRemoteURLs, clickedOrSelectedRemoteURLs, 
documentStringEncoding, sharingServices;
+@dynamic atomData, MODSData, endNoteData, wordXMLData, numberOfSelectedPubs, 
numberOfClickedOrSelectedPubs, selectedPublications, 
clickedOrSelectedPublications, singleSelectedPublication, selectedFileURLs, 
clickedOrSelectedFileURLs, selectedRemoteURLs, clickedOrSelectedRemoteURLs, 
documentStringEncoding;
 
 + (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
     NSSet *keyPaths = [super keyPathsForValuesAffectingValueForKey:key];
@@ -2676,25 +2676,4 @@
     }
 }
 
-#pragma mark Sharing
-
-- (NSArray *)sharingServices {
-    NSArray *pubs = [self clickedOrSelectedPublications];
-    if ([pubs count] == 0)
-        return nil;
-        
-    NSURL *fileURL = nil;
-    for (BibItem *pub in pubs) {
-        for (BDSKLinkedFile *file in [pub files]) {
-            if ([file isFile] && [file path]) {
-                fileURL = [file URL];
-                break;
-            }
-        }
-        if (fileURL)
-            break;
-    }
-    return [NSSharingService sharingServicesForItems:[NSArray 
arrayWithObjects:@"", fileURL, nil]];
-}
-
 @end

Modified: trunk/bibdesk/BibDocument_UI.h
===================================================================
--- trunk/bibdesk/BibDocument_UI.h      2025-07-29 14:54:00 UTC (rev 29396)
+++ trunk/bibdesk/BibDocument_UI.h      2025-07-30 08:54:37 UTC (rev 29397)
@@ -78,6 +78,8 @@
 - (void)previewURLs:(nullable NSArray *)urls;
 - (void)stopPreviewing;
 
+@property (nonatomic, nullable, readonly) NSArray *sharingServices;
+
 @end
 
 NS_ASSUME_NONNULL_END

Modified: trunk/bibdesk/BibDocument_UI.m
===================================================================
--- trunk/bibdesk/BibDocument_UI.m      2025-07-29 14:54:00 UTC (rev 29396)
+++ trunk/bibdesk/BibDocument_UI.m      2025-07-30 08:54:37 UTC (rev 29397)
@@ -1851,6 +1851,27 @@
     }
 }
 
+#pragma mark Sharing
+
+- (NSArray *)sharingServices {
+    NSArray *pubs = [self clickedOrSelectedPublications];
+    if ([pubs count] == 0)
+        return nil;
+        
+    NSURL *fileURL = nil;
+    for (BibItem *pub in pubs) {
+        for (BDSKLinkedFile *file in [pub files]) {
+            if ([file isFile] && [file path]) {
+                fileURL = [file URL];
+                break;
+            }
+        }
+        if (fileURL)
+            break;
+    }
+    return [NSSharingService sharingServicesForItems:[NSArray 
arrayWithObjects:@"", fileURL, nil]];
+}
+
 @end
 
 #pragma mark -

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