mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Fixed bug #31039
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32045 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e310aaa25b
commit
c9a8e3c3ae
2 changed files with 42 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
2011-02-10 German Arias <german@xelalug.org>
|
||||
|
||||
* Source/GSGormLoader.m (+initialize): Load the app icon here, at launch
|
||||
time, since GSGormLoader is initialized before call -finishLaunching
|
||||
in NSApp (In non document-based apps that load a gorm file at launch).
|
||||
So the windows and panels at initial gorm file don't show the app
|
||||
icon (bug #31039).
|
||||
|
||||
2011-02-10 German Arias <german@xelalug.org>
|
||||
|
||||
* Source/GSGormLoading.m (-awakeWithContext:): Call directly the method
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#import "config.h"
|
||||
#import <Foundation/NSArchiver.h>
|
||||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSBundle.h>
|
||||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSDebug.h>
|
||||
#import <Foundation/NSDictionary.h>
|
||||
|
@ -36,6 +37,8 @@
|
|||
#import <Foundation/NSFileManager.h>
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <AppKit/NSApplication.h>
|
||||
#import <AppKit/NSImage.h>
|
||||
#import "GNUstepGUI/GSModelLoaderFactory.h"
|
||||
#import "GNUstepGUI/GSGormLoading.h"
|
||||
|
||||
|
@ -45,7 +48,37 @@
|
|||
@implementation GSGormLoader
|
||||
+ (void) initialize
|
||||
{
|
||||
// should do something...
|
||||
/* We load the app icon here, at launch time, since GSGormLoader is
|
||||
initialized before call -finishLaunching in NSApp (In non document-based
|
||||
apps that load a gorm file at launch). So the windows and panels at initial
|
||||
gorm file don't show the app icon. Maybe this is a duplicate code,
|
||||
but solve the problem (bug #31039). */
|
||||
if (![NSApp isRunning])
|
||||
{
|
||||
NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
|
||||
NSString *appIconFile;
|
||||
NSImage *image = nil;
|
||||
|
||||
appIconFile = [infoDict objectForKey: @"NSIcon"];
|
||||
if (appIconFile && ![appIconFile isEqual: @""])
|
||||
{
|
||||
image = [NSImage imageNamed: appIconFile];
|
||||
}
|
||||
|
||||
// Try to look up the icns file.
|
||||
appIconFile = [infoDict objectForKey: @"CFBundleIconFile"];
|
||||
if (appIconFile && ![appIconFile isEqual: @""])
|
||||
{
|
||||
image = [NSImage imageNamed: appIconFile];
|
||||
}
|
||||
|
||||
if (image == nil)
|
||||
{
|
||||
image = [NSImage imageNamed: @"GNUstep"];
|
||||
}
|
||||
|
||||
[NSApp setApplicationIconImage: image];
|
||||
}
|
||||
}
|
||||
|
||||
+ (NSString *)type
|
||||
|
|
Loading…
Reference in a new issue