mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 10:51:56 +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
0895d7ea4f
commit
55047f5dcf
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>
|
Tue Apr 27 15:10:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
Changes supplied by Tim.Bissell@dresdnerkb.com
|
Changes supplied by Tim.Bissell@dresdnerkb.com
|
||||||
|
|
|
@ -179,9 +179,9 @@ NSApplication *NSApp = nil;
|
||||||
NSBundle *mainBundle = [NSBundle mainBundle];
|
NSBundle *mainBundle = [NSBundle mainBundle];
|
||||||
NSDictionary *infoDict = [mainBundle infoDictionary];
|
NSDictionary *infoDict = [mainBundle infoDictionary];
|
||||||
NSString *mainModelFile;
|
NSString *mainModelFile;
|
||||||
|
NSString *appIconFile;
|
||||||
|
|
||||||
mainModelFile = [infoDict objectForKey: @"NSMainNibFile"];
|
mainModelFile = [infoDict objectForKey: @"NSMainNibFile"];
|
||||||
|
|
||||||
if (mainModelFile && ![mainModelFile isEqual: @""])
|
if (mainModelFile && ![mainModelFile isEqual: @""])
|
||||||
{
|
{
|
||||||
if (![GMModel loadIMFile: mainModelFile
|
if (![GMModel loadIMFile: mainModelFile
|
||||||
|
@ -189,6 +189,17 @@ NSApplication *NSApp = nil;
|
||||||
NSLog (@"Cannot load the main model file '%@", mainModelFile);
|
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 */
|
/* post notification that launch will finish */
|
||||||
[nc postNotificationName: NSApplicationWillFinishLaunchingNotification
|
[nc postNotificationName: NSApplicationWillFinishLaunchingNotification
|
||||||
object: self];
|
object: self];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue