Revision: 4458
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4458&view=rev
Author:   hofman
Date:     2008-08-27 11:26:01 +0000 (Wed, 27 Aug 2008)

Log Message:
-----------
Show note when selecting it from the contextual menu. Add a contextual menu 
item to show the note.

Modified Paths:
--------------
    trunk/SKMainWindowController_UI.m

Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m   2008-08-27 09:53:55 UTC (rev 4457)
+++ trunk/SKMainWindowController_UI.m   2008-08-27 11:26:01 UTC (rev 4458)
@@ -865,9 +865,15 @@
 
 - (void)selectNote:(id)sender {
     PDFAnnotation *annotation = [sender representedObject];
+    [pdfView scrollAnnotationToVisible:annotation];
     [pdfView setActiveAnnotation:annotation];
 }
 
+- (void)revealNote:(id)sender {
+    PDFAnnotation *annotation = [sender representedObject];
+    [pdfView scrollAnnotationToVisible:annotation];
+}
+
 - (void)deselectNote:(id)sender {
     [pdfView setActiveAnnotation:nil];
 }
@@ -947,6 +953,8 @@
                 else
                     menuItem = [menu 
addItemWithTitle:NSLocalizedString(@"Select", @"Menu item title") 
action:@selector(selectNote:) target:self];
                 [menuItem setRepresentedObject:annotation];
+                menuItem = [menu addItemWithTitle:NSLocalizedString(@"Show", 
@"Menu item title") action:@selector(revealNote:) target:self];
+                [menuItem setRepresentedObject:annotation];
             }
         }
         if ([menu numberOfItems] > 0)


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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to