Revision: 7228
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7228&view=rev
Author:   hofman
Date:     2011-05-13 11:11:28 +0000 (Fri, 13 May 2011)

Log Message:
-----------
optional argument for script command to animate selection

Modified Paths:
--------------
    trunk/SKSelectCommand.m
    trunk/Skim.sdef

Modified: trunk/SKSelectCommand.m
===================================================================
--- trunk/SKSelectCommand.m     2011-05-13 10:21:08 UTC (rev 7227)
+++ trunk/SKSelectCommand.m     2011-05-13 11:11:28 UTC (rev 7228)
@@ -49,12 +49,13 @@
     id dP = [self directParameter];
     PDFSelection *selection = [PDFSelection selectionWithSpecifier:dP];
     id doc = [[[selection pages] lastObject] containingDocument];
+    BOOL animate = [[[self evaluatedArguments] objectForKey:@"Animate"] 
boolValue];
     
     if ([doc respondsToSelector:@selector(pdfView)]) {
         SKPDFView *pdfView = [doc pdfView];
         [[pdfView window] makeKeyAndOrderFront:nil];
-        [pdfView setCurrentSelection:selection];
         [pdfView goToSelection:selection];
+        [pdfView setCurrentSelection:selection animate:animate];
     }
     
     return nil;

Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef     2011-05-13 10:21:08 UTC (rev 7227)
+++ trunk/Skim.sdef     2011-05-13 11:11:28 UTC (rev 7228)
@@ -552,6 +552,10 @@
                 <type type="specifier" list="yes"/>
                 <type type="specifier"/>
             </direct-parameter>
+                       <parameter name="animating" code="Anim" type="boolean" 
optional="yes" 
+                               description="Animate when selecting?"> 
+                               <cocoa key="Animate"/> 
+                       </parameter>
         </command>
 
         <command name="go" code="SKIMGoTo"


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to