Revision: 14705
http://sourceforge.net/p/skim-app/code/14705
Author: hofman
Date: 2024-11-17 15:43:35 +0000 (Sun, 17 Nov 2024)
Log Message:
-----------
remove moveToTrash: action methods, menu item does not exist anymore
Modified Paths:
--------------
trunk/SKDownloadController.h
trunk/SKDownloadController.m
trunk/SKMainDocument.h
trunk/SKMainDocument.m
Modified: trunk/SKDownloadController.h
===================================================================
--- trunk/SKDownloadController.h 2024-11-17 09:38:13 UTC (rev 14704)
+++ trunk/SKDownloadController.h 2024-11-17 15:43:35 UTC (rev 14705)
@@ -63,8 +63,6 @@
- (IBAction)showDownloadPreferences:(nullable id)sender;
- (IBAction)clearDownloads:(nullable id)sender;
-- (IBAction)moveToTrash:(nullable id)sender;
-
@property (nonatomic, readonly) NSArray<SKDownload *> *downloads;
// these notify and animate, so should be used to add/remove downloads
Modified: trunk/SKDownloadController.m
===================================================================
--- trunk/SKDownloadController.m 2024-11-17 09:38:13 UTC (rev 14704)
+++ trunk/SKDownloadController.m 2024-11-17 15:43:35 UTC (rev 14705)
@@ -274,20 +274,6 @@
[self removeDownloadsAtIndexes:indexes];
}
-- (IBAction)moveToTrash:(id)sender {
- SKDownload *download = nil;
- NSInteger row = [tableView selectedRow];
- if (row != -1)
- download = [self objectInDownloadsAtIndex:row];
- if ([download canRemove]) {
- if ([download status] == SKDownloadStatusFinished)
- [download moveToTrash];
- [self removeObjectFromDownloads:download];
- } else {
- NSBeep();
- }
-}
-
- (void)cancelDownload:(id)sender {
SKDownload *download = nil;
if ([sender respondsToSelector:@selector(representedObject)])
@@ -374,16 +360,6 @@
[download moveToTrash];
}
-#pragma mark Menu validation
-
-- (BOOL)validateMenuItem:(NSMenuItem *)menuItem {
- if ([menuItem action] == @selector(moveToTrash:)) {
- NSInteger row = [tableView selectedRow];
- return (row != -1 && [[self objectInDownloadsAtIndex:row] canRemove]);
- }
- return YES;
-}
-
#pragma mark NSTableViewDataSource
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tv {
Modified: trunk/SKMainDocument.h
===================================================================
--- trunk/SKMainDocument.h 2024-11-17 09:38:13 UTC (rev 14704)
+++ trunk/SKMainDocument.h 2024-11-17 15:43:35 UTC (rev 14705)
@@ -76,7 +76,6 @@
- (IBAction)readNotes:(nullable id)sender;
- (IBAction)convertNotes:(nullable id)sender;
-- (IBAction)moveToTrash:(nullable id)sender;
@property (nonatomic, nullable, readonly) SKMainWindowController
*mainWindowController;
@property (nonatomic, nullable, readonly) PDFDocument *pdfDocument;
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2024-11-17 09:38:13 UTC (rev 14704)
+++ trunk/SKMainDocument.m 2024-11-17 15:43:35 UTC (rev 14705)
@@ -1295,18 +1295,6 @@
}
}
-- (IBAction)moveToTrash:(id)sender {
- NSURL *fileURL = [self fileURL];
- if ([fileURL checkResourceIsReachableAndReturnError:NULL]) {
- [[NSWorkspace sharedWorkspace] recycleURLs:@[fileURL]
completionHandler:^(NSDictionary *newuRLs, NSError *error){
- if (error == nil)
- [self close];
- else
- NSBeep();
- }];
- } else NSBeep();
-}
-
static NSDate *fileModificationDate(NSURL *fileURL) {
NSDate *modDate = nil;
[fileURL getResourceValue:&modDate
forKey:NSURLAttributeModificationDateKey error:NULL];
@@ -1357,8 +1345,6 @@
return [[NSWorkspace sharedWorkspace] type:[self fileType]
conformsToType:SKPDFDocumentType] && [[self pdfDocument] allowsNotes];
} else if ([anItem action] == @selector(readNotes:)) {
return [[self pdfDocument] allowsNotes];
- } else if ([anItem action] == @selector(moveToTrash:)) {
- return [self fileURL] && [[self fileURL]
checkResourceIsReachableAndReturnError:NULL];
} else if ([anItem action] == @selector(performFindPanelAction:)) {
if ([[self mainWindowController] interactionMode] ==
SKPresentationMode)
return NO;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit