Revision: 27483
          http://sourceforge.net/p/bibdesk/svn/27483
Author:   hofman
Date:     2022-05-26 14:12:17 +0000 (Thu, 26 May 2022)
Log Message:
-----------
clean up editor header file

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

Modified: trunk/bibdesk/BDSKEditor.h
===================================================================
--- trunk/bibdesk/BDSKEditor.h  2022-05-26 13:36:15 UTC (rev 27482)
+++ trunk/bibdesk/BDSKEditor.h  2022-05-26 14:12:17 UTC (rev 27483)
@@ -39,23 +39,16 @@
 */ 
 
 #import <Cocoa/Cocoa.h>
-#import <WebKit/WebKit.h>
 #import "BDSKStatusBar.h"
 #import "BDSKCitationFormatter.h"
 #import <FileView/FileView.h>
 #import <Quartz/Quartz.h>
 #import "NSTouchBar_BDSKForwardDeclarations.h"
-#import "BibItem.h"
 
 @class BDSKStatusBar, BDSKZoomablePDFView, BDSKEditorTableView, 
BDSKEditorTextView;
 @class BDSKCiteKeyFormatter, BDSKComplexStringFormatter;
-@class BibAuthor;
+@class BibItem, BibAuthor;
 
-/*!
-    @class BDSKEditor
-    @abstract WindowController for the edit window
-    @discussion Subclass of the NSWindowController class, This handles making, 
reversing and keeping track of changes to the BibItem, and displaying a nice 
GUI.
-*/
 @interface BDSKEditor : NSWindowController <NSWindowDelegate, 
NSTableViewDelegate, NSTableViewDataSource, NSSplitViewDelegate, 
NSControlTextEditingDelegate, BDSKStatusBarDelegate, 
BDSKCitationFormatterDelegate, FVFileViewDelegate, FVFileViewDataSource, 
QLPreviewPanelDelegate, QLPreviewPanelDataSource, NSTouchBarDelegate> {
     NSSplitView *mainSplitView;
     NSSplitView *fileSplitView;
@@ -130,12 +123,6 @@
     } editorFlags;
 }
 
-/*!
-@method initWithPublication:
-    @abstract designated Initializer
-    @discussion
- @param aBib gives us a bib to edit
-*/
 - (id)initWithPublication:(BibItem *)aBib;
 
 @property (nonatomic, assign) IBOutlet NSSplitView *mainSplitView;
@@ -169,26 +156,8 @@
 - (IBAction)raiseDelField:(id)sender;
 - (IBAction)raiseChangeFieldName:(id)sender;
 
-/*!
-    @method     editSelectedFieldAsRawBibTeX:
-    @abstract   edits the current field as a macro.
-    @discussion This is not necessary if the field is already a macro.
-    @param      sender (description)
-    @result     (description)
-*/
 - (IBAction)editSelectedFieldAsRawBibTeX:(id)sender;
 
-/*!
-    @method     recordChangingField:toValue:
-    @abstract   sets field to value in publication and does other stuff
-    @discussion factored out because setting field and doing other things is 
done from more than one place.
-    @param      fieldName (description)
-    @param      value (description)
-*/
-- (void)recordChangingField:(NSString *)fieldName toValue:(NSString *)value;
-
-- (void)needsToBeFiledDidChange:(NSNotification *)notification;
-
 @property (nonatomic, retain) NSString *status;
 
 - (IBAction)openLinkedFile:(id)sender;
@@ -214,73 +183,14 @@
 
 - (IBAction)pasteAndMerge:(id)sender;
 
-/*!
-    @method     updateSafariRecentDownloadsMenu:
-    @abstract   Updates the menu of items for local paths of recent downloads 
from Safari.
-    @discussion (comprehensive description)
-*/
-- (void)updateSafariRecentDownloadsMenu:(NSMenu *)menu;
+- (void)addLinkedFileFromMenuItem:(id)sender;
+- (void)addLinkedURLFromMenuItem:(id)sender;
 
-/*!
-    @method     updateSafariRecentURLsMenu:
-    @abstract   Updates the menu off items for remote URLs of recent downloads 
from Safari.
-    @discussion (comprehensive description)
-*/
-- (void)updateSafariRecentURLsMenu:(NSMenu *)menu;
-
-/*!
-    @method     updatePreviewRecentDocumentsMenu:
-    @abstract   Updates the menu of items for local paths of recent documents 
from Preview.
-    @discussion (comprehensive description)
-*/
-- (void)updatePreviewRecentDocumentsMenu:(NSMenu *)menu;
-
-/*!
-    @method     recentDownloadsMenu
-    @abstract   Returns a menu of modified files in the system download 
directory using Spotlight.
-    @discussion (comprehensive description)
-    @result     (description)
-*/
-@property (nonatomic, readonly) NSMenu *recentDownloadsMenu;
-
-- (void)updateContextMenu:(NSMenu *)menu;
-
-/*!
-    @method     addLinkedFileFromMenuItem
-    @abstract   Action to select a local file path from a menu item.
-    @discussion (comprehensive description)
-*/
-- (void)addLinkedFileFromMenuItem:(NSMenuItem *)sender;
-
-/*!
-    @method     addRemoteURLFromMenuItem
-    @abstract   Action to select a remote URL from a menu item.
-    @discussion (comprehensive description)
-*/
-- (void)addLinkedURLFromMenuItem:(NSMenuItem *)sender;
-
 - (IBAction)trashLinkedFiles:(id)sender;
 
-/*!
-    @method     showCiteKeyWarning:
-    @abstract   Action of the cite-key warning button. Shows the error string 
in an alert panel.
-    @discussion (comprehensive description)
-*/
 - (IBAction)showCiteKeyWarning:(id)sender;
 
-/*!
-    @method     bibTypeDidChange:
-    @abstract   Action of a form field to set a new value for a bibliography 
field.
-    @discussion (comprehensive description)
-*/
 - (IBAction)bibTypeDidChange:(id)sender;
-/*!
-    @method     updateTypePopup
-    @abstract   Update the type popup menu based on the current bibitem's 
type.  Needed for dragging support (see BDSKDragWindow.m).
-    @discussion (comprehensive description)
-*/
-- (void)updateTypePopup;
-- (void)bibWasAddedOrRemoved:(NSNotification *)notification;
 
 - (IBAction)changeFlag:(id)sender;
 
@@ -288,48 +198,19 @@
 
 - (IBAction)changeCiteKey:(id)sender;
 
-/*!
-    @method     generateCiteKey:
-    @abstract   Action to generate a cite-key for the bibitem, using the 
cite-key format string. 
-    @discussion (comprehensive description)
-*/
 - (IBAction)generateCiteKey:(id)sender;
 
-/*!
-    @method     consolidateLinkedFiles:
-    @abstract   Action to auto file the linked paper, using the local-url 
format string. 
-    @discussion (comprehensive description)
-*/
 - (IBAction)consolidateLinkedFiles:(id)sender;
 
-/*!
-    @method     duplicateTitleToBooktitle:
-    @abstract   Action to copy the title field to the booktitle field. 
Overwrites the booktitle field.
-    @discussion (comprehensive description)
-*/
 - (IBAction)duplicateTitleToBooktitle:(id)sender;
 
 @property (nonatomic, retain) NSString *keyField;
 
-- (void)bibDidChange:(NSNotification *)notification;
-- (void)typeInfoDidChange:(NSNotification *)aNotification;
-- (void)customFieldsDidChange:(NSNotification *)aNotification;
-- (void)fileURLDidChange:(NSNotification *)notification;
-
-- (void)bibWillBeRemoved:(NSNotification *)notification;
-- (void)groupWillBeRemoved:(NSNotification *)notification;
-
-- (void)openParentItemForField:(NSString *)field;
-
 - (IBAction)selectCrossrefParentAction:(id)sender;
 - (IBAction)createNewPubUsingCrossrefAction:(id)sender;
 
 - (IBAction)tableButtonAction:(id)sender;
 
-@property (nonatomic, readonly) NSUndoManager *undoManager;
-
-- (void)deleteURLsAtIndexes:(NSIndexSet *)indexSet 
moveToTrash:(NSInteger)moveToTrash;
-
 - (void)previewURLs:(NSArray *)theURLs;
 - (void)stopPreviewing;
 
@@ -341,11 +222,6 @@
 - (BibAuthor *)personAtIndex:(NSUInteger)anIndex;
 @property (nonatomic, readonly) NSArray *persons;
 
-#pragma mark Macro support
-    
-- (void)macrosDidChange:(NSNotification *)aNotification;
-
-
 - (IBAction)toggleSideBar:(id)sender;
 - (IBAction)toggleStatusBar:(id)sender;
 

Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m  2022-05-26 13:36:15 UTC (rev 27482)
+++ trunk/bibdesk/BDSKEditor.m  2022-05-26 14:12:17 UTC (rev 27483)
@@ -113,8 +113,26 @@
 enum { BDSKMoveToTrashAsk = -1, BDSKMoveToTrashNo = 0, BDSKMoveToTrashYes = 1 
};
 enum { BDSKUpdateTable = -1, BDSKNoReload = 0, BDSKReloadTable = 1 };
 
-@interface BDSKEditor (Private)
+@interface BDSKEditor ()
 
+- (void)bibWillBeRemoved:(NSNotification *)notification;
+- (void)groupWillBeRemoved:(NSNotification *)notification;
+- (void)bibWasAddedOrRemoved:(NSNotification *)notification;
+- (void)bibDidChange:(NSNotification *)notification;
+- (void)typeInfoDidChange:(NSNotification *)aNotification;
+- (void)customFieldsDidChange:(NSNotification *)aNotification;
+- (void)macrosDidChange:(NSNotification *)aNotification;
+- (void)fileURLDidChange:(NSNotification *)notification;
+- (void)needsToBeFiledDidChange:(NSNotification *)notification;
+
+- (void)recordChangingField:(NSString *)fieldName toValue:(NSString *)value;
+
+- (void)openParentItemForField:(NSString *)field;
+
+- (void)deleteURLsAtIndexes:(NSIndexSet *)indexSet 
moveToTrash:(NSInteger)moveToTrash;
+
+- (void)updateTypePopup;
+
 - (void)setupCollectionView;
 - (void)collectionViewFrameDidChange:(NSNotification *)notification;
 - (void)setupTypePopUp;
@@ -135,7 +153,7 @@
 @implementation BDSKEditor
 
 @synthesize mainSplitView, fileSplitView, bibTypeButton, tableView, 
collectionView, tabView, notesView, abstractView, rssDescriptionView, 
citeKeyField, citeKeyTitle, actionButton, addFieldButton, contextMenu, 
statusBar, citeKeyWarningButton, authorTableView, fileView, heightConstraint, 
publication;
-@dynamic status, recentDownloadsMenu, keyField, undoManager, numberOfPersons, 
persons;
+@dynamic status, keyField, numberOfPersons, persons;
 
 - (NSString *)windowNibName{
     return @"BDSKEditor";
@@ -706,7 +724,7 @@
     }];
 }
 
-- (void)addLinkedFileFromMenuItem:(NSMenuItem *)sender{
+- (void)addLinkedFileFromMenuItem:(id)sender{
        NSURL *aURL = [sender representedObject];
     [publication addFileForURL:aURL autoFile:YES runScriptHook:YES];
     [[self undoManager] setActionName:NSLocalizedString(@"Edit Publication", 
@"Undo action name")];
@@ -757,7 +775,7 @@
     }];
 }
 
-- (void)addLinkedURLFromMenuItem:(NSMenuItem *)sender{
+- (void)addLinkedURLFromMenuItem:(id)sender{
     NSURL *aURL = [sender representedObject];
     [publication addFileForURL:aURL autoFile:YES runScriptHook:YES];
     [[self undoManager] setActionName:NSLocalizedString(@"Edit Publication", 
@"Undo action name")];
@@ -3339,10 +3357,8 @@
     return item;
 }
 
-@end
+#pragma mark Private
 
-@implementation BDSKEditor (Private)
-
 - (void)reloadTableWithFields:(NSArray *)newFields{
        // if we were editing in the tableView, we will restore the selected 
cell and the selection
     NSString *editedTitle = nil;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to