mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
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:
parent
d13cc54126
commit
4df6d41343
2 changed files with 17 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Apr 27 15:48:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* 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 <richard@brainstorm.co.uk>
|
||||
|
||||
Changes supplied by Tim.Bissell@dresdnerkb.com
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue