Revision: 12748 http://sourceforge.net/p/skim-app/code/12748 Author: hofman Date: 2022-01-27 22:25:58 +0000 (Thu, 27 Jan 2022) Log Message: ----------- Remove Remove Note and Remove Highlight items from context menu
Modified Paths: -------------- trunk/SKPDFView.m Modified: trunk/SKPDFView.m =================================================================== --- trunk/SKPDFView.m 2022-01-26 15:59:47 UTC (rev 12747) +++ trunk/SKPDFView.m 2022-01-27 22:25:58 UTC (rev 12748) @@ -1892,6 +1892,17 @@ [menu removeItemAtIndex:0]; } + static NSSet *annotationActions = nil; + if (annotationActions == nil) + annotationActions = [[NSSet alloc] initWithObjects:@"_removeNote:", @"_removeMarkup:", nil]; + while ([menu numberOfItems] > 0) { + item = [menu itemAtIndex:0]; + if ([item isSeparatorItem] || [annotationActions containsObject:NSStringFromSelector([item action])]) + [menu removeItemAtIndex:0]; + else + break; + } + // On Leopard the selection is automatically set. In some cases we never want a selection though. if ((interactionMode == SKPresentationMode) || (toolMode != SKTextToolMode && [[self currentSelection] hasCharacters])) { static NSSet *selectionActions = nil; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit