Revision: 6927
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6927&view=rev
Author:   hofman
Date:     2010-12-04 12:14:57 +0000 (Sat, 04 Dec 2010)

Log Message:
-----------
allow scripting to add session bookmark, using the current session

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

Modified: trunk/SKBookmark.m
===================================================================
--- trunk/SKBookmark.m  2010-12-03 16:07:15 UTC (rev 6926)
+++ trunk/SKBookmark.m  2010-12-04 12:14:57 UTC (rev 6927)
@@ -286,6 +286,18 @@
             case SKScriptingBookmarkTypeSeparator:
                 bookmark = [[SKBookmark alloc] initSeparator];
                 break;
+            case SKScriptingBookmarkTypeSession:
+            {
+                NSMutableArray *children = [NSMutableArray array];
+                SKBookmark *child;
+                for (NSDictionary *setup in [[NSApp orderedDocuments] 
valueForKey:@"currentDocumentSetup"]) {
+                    if (child = [SKBookmark bookmarkWithSetup:setup label:@""])
+                        [children addObject:child];
+                }
+                NSString *aLabel = [properties objectForKey:@"label"] ?: @"";
+                bookmark = [SKBookmark bookmarkSessionWithChildren:children 
label:aLabel];
+                break;
+            }
             default:
                 [[NSScriptCommand currentCommand] 
setScriptErrorNumber:NSArgumentsWrongScriptError];
                 [[NSScriptCommand currentCommand] setScriptErrorString:@"New 
bookmark requires a supported bookmark type."];


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

------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly 
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus 
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to