Revision: 3595
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3595&view=rev
Author:   hofman
Date:     2008-04-02 05:05:02 -0700 (Wed, 02 Apr 2008)

Log Message:
-----------
Rename initializer and accessor to properties also for bookmarks.

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

Modified: trunk/SKBookmark.h
===================================================================
--- trunk/SKBookmark.h  2008-04-02 12:01:48 UTC (rev 3594)
+++ trunk/SKBookmark.h  2008-04-02 12:05:02 UTC (rev 3595)
@@ -59,9 +59,9 @@
 - (id)initFolderWithChildren:(NSArray *)aChildren label:(NSString *)aLabel;
 - (id)initFolderWithLabel:(NSString *)aLabel;
 - (id)initSeparator;
-- (id)initWithDictionary:(NSDictionary *)dictionary;
+- (id)initWithProperties:(NSDictionary *)dictionary;
 
-- (NSDictionary *)dictionaryValue;
+- (NSDictionary *)properties;
 
 - (int)bookmarkType;
 

Modified: trunk/SKBookmark.m
===================================================================
--- trunk/SKBookmark.m  2008-04-02 12:01:48 UTC (rev 3594)
+++ trunk/SKBookmark.m  2008-04-02 12:05:02 UTC (rev 3595)
@@ -123,13 +123,13 @@
     return [[SKSeparatorBookmark alloc] init];
 }
 
-- (id)initWithDictionary:(NSDictionary *)dictionary {
+- (id)initWithProperties:(NSDictionary *)dictionary {
     if ([[dictionary objectForKey:TYPE_KEY] 
isEqualToString:SKBookmarkTypeFolderString]) {
         NSEnumerator *dictEnum = [[dictionary objectForKey:CHILDREN_KEY] 
objectEnumerator];
         NSDictionary *dict;
         NSMutableArray *newChildren = [NSMutableArray array];
         while (dict = [dictEnum nextObject])
-            [newChildren addObject:[[[[self class] alloc] 
initWithDictionary:dict] autorelease]];
+            [newChildren addObject:[[[[self class] alloc] 
initWithProperties:dict] autorelease]];
         return [self initFolderWithChildren:newChildren label:[dictionary 
objectForKey:LABEL_KEY]];
     } else if ([[dictionary objectForKey:TYPE_KEY] 
isEqualToString:SKBookmarkTypeSeparatorString]) {
         return [self initSeparator];
@@ -148,7 +148,7 @@
         [super dealloc];
 }
 
-- (NSDictionary *)dictionaryValue { return nil; }
+- (NSDictionary *)properties { return nil; }
 
 - (int)bookmarkType { return SKBookmarkTypeSeparator; }
 
@@ -234,7 +234,7 @@
     return [NSString stringWithFormat:@"<%@: label=%@, path=%@, page=%i>", 
[self class], label, [self path], pageIndex];
 }
 
-- (NSDictionary *)dictionaryValue {
+- (NSDictionary *)properties {
     return [NSDictionary 
dictionaryWithObjectsAndKeys:SKBookmarkTypeBookmarkString, TYPE_KEY, [self 
aliasData], ALIAS_DATA_KEY, [NSNumber numberWithUnsignedInt:pageIndex], 
PAGE_INDEX_KEY, label, LABEL_KEY, nil];
 }
 
@@ -336,8 +336,8 @@
     return [NSString stringWithFormat:@"<%@: label=%@, children=%@>", [self 
class], label, children];
 }
 
-- (NSDictionary *)dictionaryValue {
-    return [NSDictionary 
dictionaryWithObjectsAndKeys:SKBookmarkTypeFolderString, TYPE_KEY, [children 
valueForKey:@"dictionaryValue"], CHILDREN_KEY, label, LABEL_KEY, nil];
+- (NSDictionary *)properties {
+    return [NSDictionary 
dictionaryWithObjectsAndKeys:SKBookmarkTypeFolderString, TYPE_KEY, [children 
valueForKey:@"properties"], CHILDREN_KEY, label, LABEL_KEY, nil];
 }
 
 - (int)bookmarkType {
@@ -401,7 +401,7 @@
     return [NSString stringWithFormat:@"<%@: separator>", [self class]];
 }
 
-- (NSDictionary *)dictionaryValue {
+- (NSDictionary *)properties {
     return [NSDictionary 
dictionaryWithObjectsAndKeys:SKBookmarkTypeSeparatorString, TYPE_KEY, nil];
 }
 

Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m        2008-04-02 12:01:48 UTC (rev 3594)
+++ trunk/SKBookmarkController.m        2008-04-02 12:05:02 UTC (rev 3595)
@@ -114,7 +114,7 @@
                 NSDictionary *dict;
                 
                 while (dict = [dictEnum nextObject]) {
-                    SKBookmark *bookmark = [[SKBookmark alloc] 
initWithDictionary:dict];
+                    SKBookmark *bookmark = [[SKBookmark alloc] 
initWithProperties:dict];
                     if (bookmark)
                         [bookmarks addObject:bookmark];
                     [bookmark release];
@@ -452,7 +452,7 @@
 
 - (void)handleApplicationWillTerminateNotification:(NSNotification 
*)notification  {
     [recentDocuments makeObjectsPerformSelector:@selector(removeObjectForKey:) 
withObject:ALIAS_KEY];
-    NSDictionary *bookmarksDictionary = [NSDictionary 
dictionaryWithObjectsAndKeys:[bookmarks valueForKey:@"dictionaryValue"], 
BOOKMARKS_KEY, recentDocuments, RECENT_DOCUMENTS_KEY, nil];
+    NSDictionary *bookmarksDictionary = [NSDictionary 
dictionaryWithObjectsAndKeys:[bookmarks valueForKey:@"properties"], 
BOOKMARKS_KEY, recentDocuments, RECENT_DOCUMENTS_KEY, nil];
     NSString *error = nil;
     NSPropertyListFormat format = NSPropertyListBinaryFormat_v1_0;
     NSData *data = [NSPropertyListSerialization 
dataFromPropertyList:bookmarksDictionary format:format errorDescription:&error];


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

Reply via email to