Revision: 3610 http://skim-app.svn.sourceforge.net/skim-app/?rev=3610&view=rev Author: hofman Date: 2008-04-03 11:07:42 -0700 (Thu, 03 Apr 2008)
Log Message: ----------- Perform action of outline item when it does not have a destination. Leopard only. Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2008-04-03 17:51:36 UTC (rev 3609) +++ trunk/SKMainWindowController.m 2008-04-03 18:07:42 UTC (rev 3610) @@ -1427,8 +1427,13 @@ } - (void)goToSelectedOutlineItem { + PDFOutline *outlineItem = [outlineView itemAtRow: [outlineView selectedRow]]; + PDFDestination *dest = [outlineItem destination]; updatingOutlineSelection = YES; - [self goToDestination: [[outlineView itemAtRow: [outlineView selectedRow]] destination]]; + if (dest) + [self goToDestination:dest]; + else if ([outlineItem respondsToSelector:@selector(action)] && [outlineItem action]) + [pdfView performAction:[outlineItem action]]; updatingOutlineSelection = NO; } @@ -3813,9 +3818,7 @@ - (void)outlineViewSelectionDidChange:(NSNotification *)notification{ // Get the destination associated with the search result list. Tell the PDFView to go there. if ([[notification object] isEqual:outlineView] && (updatingOutlineSelection == NO)){ - updatingOutlineSelection = YES; - [self goToDestination: [[outlineView itemAtRow: [outlineView selectedRow]] destination]]; - updatingOutlineSelection = NO; + [self goToSelectedOutlineItem]; if ([self isPresentation] && [[NSUserDefaults standardUserDefaults] boolForKey:SKAutoHidePresentationContentsKey]) [self hideLeftSideWindow]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit