Revision: 11517
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=11517&view=rev
Author: hofman
Date: 2007-11-09 13:32:22 -0800 (Fri, 09 Nov 2007)
Log Message:
-----------
Initialize correct type of bookmark from dictionary.
Modified Paths:
--------------
trunk/bibdesk/BDSKBookmarkController.m
Modified: trunk/bibdesk/BDSKBookmarkController.m
===================================================================
--- trunk/bibdesk/BDSKBookmarkController.m 2007-11-09 21:15:50 UTC (rev
11516)
+++ trunk/bibdesk/BDSKBookmarkController.m 2007-11-09 21:32:22 UTC (rev
11517)
@@ -673,6 +673,18 @@
- (id)initWithDictionary:(NSDictionary *)dictionary {
return [self initWithUrlString:[dictionary objectForKey:URL_KEY]
name:[dictionary objectForKey:TITLE_KEY]];
+ if ([[dictionary objectForKey:TYPE_KEY]
isEqualToString:BDSKBookmarkTypeFolderString]) {
+ 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]];
+ return [self initFolderWithChildren:newChildren name:[dictionary
objectForKey:TITLE_KEY]];
+ } else if ([[dictionary objectForKey:TYPE_KEY]
isEqualToString:BDSKBookmarkTypeSeparatorString]) {
+ return [self initSeparator];
+ } else {
+ return [self initWithUrlString:[dictionary objectForKey:URL_KEY]
name:[dictionary objectForKey:TITLE_KEY]];
+ }
}
- (id)copyWithZone:(NSZone *)aZone {
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: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit