Revision: 6777
http://skim-app.svn.sourceforge.net/skim-app/?rev=6777&view=rev
Author: hofman
Date: 2010-09-04 11:33:31 +0000 (Sat, 04 Sep 2010)
Log Message:
-----------
implement entire contents property of scriptable bookmarks
Modified Paths:
--------------
trunk/SKBookmark.h
trunk/SKBookmark.m
trunk/Skim.sdef
Modified: trunk/SKBookmark.h
===================================================================
--- trunk/SKBookmark.h 2010-09-03 22:46:59 UTC (rev 6776)
+++ trunk/SKBookmark.h 2010-09-04 11:33:31 UTC (rev 6777)
@@ -92,6 +92,7 @@
@property (nonatomic, readonly) FourCharCode scriptingBookmarkType;
@property (nonatomic, readonly) NSURL *scriptingFile;
@property (nonatomic, readonly) SKBookmark *scriptingParent;
+...@property (nonatomic, readonly) NSArray *entireContents;
- (NSArray *)bookmarks;
- (void)insertInBookmarks:(SKBookmark *)bookmark;
Modified: trunk/SKBookmark.m
===================================================================
--- trunk/SKBookmark.m 2010-09-03 22:46:59 UTC (rev 6776)
+++ trunk/SKBookmark.m 2010-09-04 11:33:31 UTC (rev 6777)
@@ -88,7 +88,7 @@
@implementation SKBookmark
@synthesize parent;
-...@dynamic properties, bookmarkType, label, icon, path, pageIndex,
pageNumber, scriptingBookmarkType, scriptingFile, scriptingParent;
+...@dynamic properties, bookmarkType, label, icon, path, pageIndex,
pageNumber, scriptingBookmarkType, scriptingFile, scriptingParent,
entireContents;
static SKPlaceholderBookmark *defaultPlaceholderBookmark = nil;
static Class SKBookmarkClass = Nil;
@@ -226,6 +226,15 @@
return [parent parent] == nil ? nil : parent;
};
+- (NSArray *)entireContents {
+ NSMutableArray *contents = [NSMutableArray array];
+ for (SKBookmark *bookmark in [self children]) {
+ [contents addObject:bookmark];
+ [contents addObjectsFromArray:[bookmark entireContents]];
+ }
+ return contents;
+}
+
- (NSArray *)bookmarks {
return [self children];
}
Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef 2010-09-03 22:46:59 UTC (rev 6776)
+++ trunk/Skim.sdef 2010-09-04 11:33:31 UTC (rev 6777)
@@ -1135,6 +1135,11 @@
description="The children of the bookmark.">
<cocoa key="bookmarks"/>
</element>
+ <property name="entire contents" code="ects" access="r"
+ description="The entire contents of the bookmark, including
the contents of its children">
+ <type type="bookmark" list="yes"/>
+ <cocoa key="entireContents"/>
+ </property>
<property name="name" code="pnam" type="text"
description="The name for the bookmark.">
<cocoa key="label"/>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit