-
- //Album and name get special treatment because they are defaults
- if ( (temp = [defaults stringForKey:@"showAlbum"]) )
- {
- if ((temp == nil) || [temp isEqualToString:@"1"])
- {
- [albumCheckbox setState:NSOnState];
- }
- else
- {
- [albumCheckbox setState:NSOffState];
- }
- }
-
- if ( (temp = [defaults stringForKey:@"showName"]) )
- {
- if ((temp == nil) || [temp isEqualToString:@"1"])
- {
- [nameCheckbox setState:NSOnState];
- }
- else
- {
- [nameCheckbox setState:NSOffState];
- }
- }
-
+ [albumCheckbox setState:[defaults boolForKey:@"showAlbum"] ? NSOnState : NSOffState];
+ [nameCheckbox setState:[defaults boolForKey:@"showName"] ? NSOnState : NSOffState];