diff --git a/iMBMusicFolder.m b/iMBMusicFolder.m index 73320c358..dfe67fdd9 100644 --- a/iMBMusicFolder.m +++ b/iMBMusicFolder.m @@ -31,7 +31,20 @@ copy of this software and associated documentation files (the "Software"), @implementation iMBMusicFolder -+ (void)load ++ (void)initialize // preferred over +load in most cases +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + NSBundle *bndl = [NSBundle bundleForClass:[self class]]; + NSString *iconPath = [bndl pathForResource:@"MBiTunes4Song" ofType:@"png"]; + sSongIcon = [[NSImage alloc] initWithContentsOfFile:iconPath]; + iconPath = [bndl pathForResource:@"iTunesDRM" ofType:@"png"]; + sDRMIcon = [[NSImage alloc] initWithContentsOfFile:iconPath]; + + [pool release]; +} + ++ (void)load // registration of this class { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; diff --git a/iMediaBrowser.m b/iMediaBrowser.m index a3f7cb24f..75f98c88d 100644 --- a/iMediaBrowser.m +++ b/iMediaBrowser.m @@ -55,7 +55,7 @@ - (id)observedObject; @implementation iMediaBrowser -+ (void)load ++ (void)initialize // preferred over +load in most cases { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; _browserClasses = [[NSMutableArray alloc] init];