diff --git a/ChangeLog b/ChangeLog index ab39d1764..486314b47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Apr 27 15:48:00 1999 Richard Frith-Macdonald + + * Source/NSApplication.m: Load image specified in Info-gnustep.plist + and use it as app icon if possible. + Tue Apr 27 15:10:00 1999 Richard Frith-Macdonald Changes supplied by Tim.Bissell@dresdnerkb.com diff --git a/Source/NSApplication.m b/Source/NSApplication.m index 1ef3d2607..1e86bcd62 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -179,9 +179,9 @@ NSApplication *NSApp = nil; NSBundle *mainBundle = [NSBundle mainBundle]; NSDictionary *infoDict = [mainBundle infoDictionary]; NSString *mainModelFile; + NSString *appIconFile; mainModelFile = [infoDict objectForKey: @"NSMainNibFile"]; - if (mainModelFile && ![mainModelFile isEqual: @""]) { if (![GMModel loadIMFile: mainModelFile @@ -189,6 +189,17 @@ NSApplication *NSApp = nil; NSLog (@"Cannot load the main model file '%@", mainModelFile); } + appIconFile = [infoDict objectForKey: @"NSIcon"]; + if (appIconFile && ![appIconFile isEqual: @""]) + { + NSImage *image = [NSImage imageNamed: appIconFile]; + + if (image != nil) + { + [self setApplicationIconImage: image]; + } + } + /* post notification that launch will finish */ [nc postNotificationName: NSApplicationWillFinishLaunchingNotification object: self];