Changeset 5984
- Timestamp:
- May 31, 2008, 3:11:59 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/GroupsController.m
r5983 r5984 158 158 - (NSColor *) setColor: (NSColor *) color forIndex: (int) index 159 159 { 160 [[fGroups objectAtIndex: [self rowValueForIndex: index]] setObject: color forKey: @"Color"]; 160 NSMutableDictionary * dict = [fGroups objectAtIndex: [self rowValueForIndex: index]]; 161 [dict removeObjectForKey: @"Icon"]; 162 163 [dict setObject: color forKey: @"Color"]; 161 164 162 165 [[GroupsController groups] saveGroups]; … … 297 300 - (void) saveGroups 298 301 { 299 [[NSUserDefaults standardUserDefaults] setObject: [NSArchiver archivedDataWithRootObject: fGroups] forKey: @"Groups"]; 302 //don't archive the icon 303 NSMutableArray * groups = [NSMutableArray arrayWithCapacity: [fGroups count]]; 304 NSEnumerator * enumerator = [fGroups objectEnumerator]; 305 NSDictionary * dict; 306 while ((dict = [enumerator nextObject])) 307 { 308 NSMutableDictionary * newDict = [dict mutableCopy]; 309 [newDict removeObjectForKey: @"Icon"]; 310 [groups addObject: newDict]; 311 [newDict release]; 312 } 313 314 [[NSUserDefaults standardUserDefaults] setObject: [NSArchiver archivedDataWithRootObject: groups] forKey: @"Groups"]; 300 315 } 301 316
Note: See TracChangeset
for help on using the changeset viewer.