From a3c99039fea0827520aa83e412ce98cf15e3e57d Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Fri, 12 Nov 2010 22:46:43 +0000 Subject: The favorites controller needs to load favorites into a mutable dictionary. --- Source/SPFavoritesController.h | 4 ++-- Source/SPFavoritesController.m | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/SPFavoritesController.h b/Source/SPFavoritesController.h index bb698d16..1b9f0aca 100644 --- a/Source/SPFavoritesController.h +++ b/Source/SPFavoritesController.h @@ -35,13 +35,13 @@ */ @interface SPFavoritesController : SPSingleton { - NSDictionary *favorites; + NSMutableDictionary *favorites; } /** * @property favorites Favorites data dictionary */ -@property (readonly) NSDictionary *favorites; +@property (readonly) NSMutableDictionary *favorites; + (SPFavoritesController *)sharedFavoritesController; diff --git a/Source/SPFavoritesController.m b/Source/SPFavoritesController.m index d66f9b72..285cbd90 100644 --- a/Source/SPFavoritesController.m +++ b/Source/SPFavoritesController.m @@ -182,7 +182,7 @@ static SPFavoritesController *sharedFavoritesController = nil; favorites = [[NSDictionary alloc] initWithContentsOfFile:favoritesFile]; } else { - NSDictionary *newFavorites = [NSDictionary dictionaryWithObject:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Favorites", @"favorites label"), SPFavoritesGroupNameKey, [NSArray array], SPFavoriteChildrenKey, nil] forKey:SPFavoritesRootKey]; + NSDictionary *newFavorites = [NSMutableDictionary dictionaryWithObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Favorites", @"favorites label"), SPFavoritesGroupNameKey, [NSArray array], SPFavoriteChildrenKey, nil] forKey:SPFavoritesRootKey]; NSError *error = nil; NSString *errorString = nil; -- cgit v1.2.3