mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Remove warning when loading images in delegate
This commit is contained in:
parent
c02fbdcbe8
commit
c25ebdd4eb
3 changed files with 27 additions and 13 deletions
|
@ -55,20 +55,23 @@
|
|||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
NSNotificationCenter *ndc = [NSDistributedNotificationCenter defaultCenter];
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
NSString *path;
|
||||
NSConnection *conn = [NSConnection defaultConnection];
|
||||
NSString *path = nil;
|
||||
|
||||
path = [bundle pathForImageResource: @"GormLinkImage"];
|
||||
linkImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"GormSourceTag"];
|
||||
sourceImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"GormTargetTag"];
|
||||
targetImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"Gorm"];
|
||||
gormImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"GormTesting"];
|
||||
testingImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
|
||||
if ([self isInTool] == NO)
|
||||
{
|
||||
path = [bundle pathForImageResource: @"GormLinkImage"];
|
||||
linkImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"GormSourceTag"];
|
||||
sourceImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"GormTargetTag"];
|
||||
targetImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"Gorm"];
|
||||
gormImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"GormTesting"];
|
||||
testingImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
}
|
||||
|
||||
// regular notifications...
|
||||
[nc addObserver: self
|
||||
selector: @selector(handleNotification:)
|
||||
|
@ -144,7 +147,10 @@
|
|||
}
|
||||
|
||||
// Gorm specific methods...
|
||||
|
||||
- (BOOL) isInTool
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (id<IBDocuments>) activeDocument
|
||||
{
|
||||
|
|
|
@ -52,6 +52,9 @@
|
|||
- (GormClassManager*) classManager;
|
||||
- (NSMenu*) classMenu;
|
||||
|
||||
// Check if we are in the app or the tool
|
||||
- (BOOL) isInTool;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -30,6 +30,11 @@
|
|||
// AppDelegate...
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL) isInTool
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSDictionary *) parseArguments
|
||||
{
|
||||
GormDocumentController *dc = [GormDocumentController sharedDocumentController];
|
||||
|
|
Loading…
Reference in a new issue