Revision: 12583
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=12583&view=rev
Author:   hofman
Date:     2008-01-19 09:13:25 -0800 (Sat, 19 Jan 2008)

Log Message:
-----------
Remove trash contextual menu item.

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

Modified: trunk/bibdesk/BDSKEditor.h
===================================================================
--- trunk/bibdesk/BDSKEditor.h  2008-01-19 17:13:11 UTC (rev 12582)
+++ trunk/bibdesk/BDSKEditor.h  2008-01-19 17:13:25 UTC (rev 12583)
@@ -151,8 +151,6 @@
 - (IBAction)chooseLocalFile:(id)sender;
 - (void)chooseLocalFilePanelDidEnd:(NSOpenPanel *)sheet 
returnCode:(int)returnCode contextInfo:(void *)contextInfo;
 
-- (IBAction)trashLocalFile:(id)sender;
-
 - (IBAction)chooseRemoteURL:(id)sender;
 - (IBAction)dismissChooseURLSheet:(id)sender;
 - (void)chooseRemoteURLSheetDidEnd:(NSWindow *)sheet 
returnCode:(int)returnCode contextInfo:(void *)contextInfo;

Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m  2008-01-19 17:13:11 UTC (rev 12582)
+++ trunk/bibdesk/BDSKEditor.m  2008-01-19 17:13:25 UTC (rev 12583)
@@ -552,21 +552,6 @@
     [[self undoManager] setActionName:NSLocalizedString(@"Edit Publication", 
@"Undo action name")];
 }
 
-- (IBAction)trashLocalFile:(id)sender{
-    unsigned int anIndex = [[sender representedObject] unsignedIntValue];
-    NSString *path = [[[publication objectInFilesAtIndex:anIndex] URL] path];
-    NSString *folderPath = [path stringByDeletingLastPathComponent];
-    NSString *fileName = [path lastPathComponent];
-    int tag = 0;
-    NSURL *oldURL = [[[publication objectInFilesAtIndex:anIndex] URL] retain];
-    [publication removeObjectFromFilesAtIndex:anIndex];
-    if (oldURL)
-        [[self document] userRemovedURL:oldURL forPublication:publication];
-    [oldURL release];
-    [[NSWorkspace sharedWorkspace] 
performFileOperation:NSWorkspaceRecycleOperation source:folderPath 
destination:nil files:[NSArray arrayWithObjects:fileName, nil] tag:&tag];
-    [[self undoManager] setActionName:NSLocalizedString(@"Edit Publication", 
@"Undo action name")];
-}
-
 - (IBAction)chooseRemoteURL:(id)sender{
     unsigned int anIndex = NSNotFound;
     NSNumber *indexNumber = [sender representedObject];
@@ -1091,13 +1076,6 @@
                                    keyEquivalent:@""
                                          atIndex:++i];
                 [item setRepresentedObject:[NSNumber 
numberWithUnsignedInt:anIndex]];
-                
-                i = [menu indexOfItemWithTag:FVRemoveMenuItemTag];
-                item = [menu insertItemWithTitle:NSLocalizedString(@"Move To 
Trash",@"Menu item title")
-                                          action:@selector(trashLocalFile:)
-                                   keyEquivalent:@""
-                                         atIndex:++i];
-                [item setRepresentedObject:[NSNumber 
numberWithUnsignedInt:anIndex]];
             }
         } else if (isEditable) {
             item = [menu insertItemWithTitle:[NSLocalizedString(@"Replace 
URL",@"Menu item title: Replace File...") stringByAppendingEllipsis]


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to