Revision: 16750
http://sourceforge.net/p/skim-app/code/16750
Author: hofman
Date: 2026-10-30 16:03:45 +0000 (Fri, 30 Oct 2026)
Log Message:
-----------
validate addBookmark:, invalidate when fileURL does not exist
Modified Paths:
--------------
trunk/SKMainDocument.m
trunk/SKNotesDocument.m
Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m 2026-10-30 15:49:37 UTC (rev 16749)
+++ trunk/SKMainDocument.m 2026-10-30 16:03:45 UTC (rev 16750)
@@ -1422,6 +1422,8 @@
}
} else if ([anItem action] == @selector(copyURL:)) {
return [self fileURL] != nil;
+ } else if ([anItem action] == @selector(addBookmark:)) {
+ return [anItem tag] == 2 || [[self fileURL]
checkResourceIsReachableAndReturnError:NULL];
}
return [super validateUserInterfaceItem:anItem];
}
Modified: trunk/SKNotesDocument.m
===================================================================
--- trunk/SKNotesDocument.m 2026-10-30 15:49:37 UTC (rev 16749)
+++ trunk/SKNotesDocument.m 2026-10-30 16:03:45 UTC (rev 16750)
@@ -641,6 +641,8 @@
default:
return NO;
}
+ } else if ([menuItem action] == @selector(addBookmark:)) {
+ return [menuItem tag] == 2 || [[self fileURL]
checkResourceIsReachableAndReturnError:NULL];
} else if ([[SKNotesDocument superclass] instancesRespondToSelector:_cmd])
{
return [super validateMenuItem:menuItem];
}
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