Use app icon image listed in Info-gnustep.plist

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4150 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-04-27 15:32:03 +00:00
parent 0895d7ea4f
commit 55047f5dcf
2 changed files with 17 additions and 1 deletions

View file

@ -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];