mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-23 06:20:47 +00:00
Update images and classes to load resources correctly, move plists
This commit is contained in:
parent
52b3262674
commit
48b1c4f38d
14 changed files with 44 additions and 19 deletions
|
@ -75,11 +75,21 @@ Gorm_RESOURCE_FILES = \
|
|||
Palettes/2Controls/2Controls.palette \
|
||||
Palettes/3Containers/3Containers.palette \
|
||||
Palettes/4Data/4Data.palette \
|
||||
Images/Gorm.tiff \
|
||||
Images/FileIcon_gmodel.tiff \
|
||||
Images/GormEHCoil.tiff \
|
||||
Images/GormEHLine.tiff \
|
||||
Images/GormEVCoil.tiff \
|
||||
Images/GormEVLine.tiff \
|
||||
Images/GormFile.tiff \
|
||||
Images/GormMenu.tiff \
|
||||
Images/GormMHCoil.tiff \
|
||||
Images/GormMHLine.tiff \
|
||||
Images/GormMVCoil.tiff \
|
||||
Images/GormMVLine.tiff \
|
||||
Images/GormNib.tiff \
|
||||
Images/GormPalette.tiff \
|
||||
Images/FileIcon_gmodel.tiff \
|
||||
Images/Gorm.tiff \
|
||||
|
||||
|
||||
Gorm_LOCALIZED_RESOURCE_FILES = \
|
||||
GormDocument.gorm \
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
if (image == nil)
|
||||
{
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
NSString *path = [bundle pathForImageResource: @"GormWindow"];
|
||||
image = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
}
|
||||
|
@ -83,7 +83,7 @@
|
|||
|
||||
if (image == nil)
|
||||
{
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [WindowsPalette class]];
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
NSString *path = [bundle pathForImageResource: @"DrawerSmall"];
|
||||
image = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
}
|
||||
|
|
|
@ -186,6 +186,7 @@ GormCore_RESOURCE_FILES = \
|
|||
Images/GormEHLine.tiff \
|
||||
Images/GormEVCoil.tiff \
|
||||
Images/GormEVLine.tiff \
|
||||
Images/GormFile.tiff \
|
||||
Images/GormFilesOwner.tiff \
|
||||
Images/GormFirstResponder.tiff \
|
||||
Images/GormFontManager.tiff \
|
||||
|
@ -236,7 +237,9 @@ GormCore_RESOURCE_FILES = \
|
|||
Images/Sunday_seurat.tiff \
|
||||
Images/tabbot_nib.tiff \
|
||||
Images/tabtop_nib.tiff \
|
||||
Images/titleOnly_nib.tiff
|
||||
Images/titleOnly_nib.tiff \
|
||||
Resources/VersionProfiles.plist \
|
||||
Resources/ClassInformation.plist
|
||||
|
||||
|
||||
GormCore_LANGUAGES = English
|
||||
|
|
|
@ -56,8 +56,13 @@ NSImage *browserImage = nil;
|
|||
{
|
||||
if(self == [GormClassEditor class])
|
||||
{
|
||||
outlineImage = [NSImage imageNamed: @"outlineView"];
|
||||
browserImage = [NSImage imageNamed: @"browserView"];
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
NSString *path = nil;
|
||||
|
||||
path = [bundle pathForImageResource: @"outlineView"];
|
||||
outlineImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"browserView"];
|
||||
browserImage = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
|
||||
if (image == nil)
|
||||
{
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
NSString *path = [bundle pathForImageResource: @"GormFirstResponder"];
|
||||
|
||||
image = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
|
@ -146,7 +146,7 @@ static NSImage *fileImage = nil;
|
|||
NSBundle *bundle;
|
||||
NSString *path;
|
||||
|
||||
bundle = [NSBundle mainBundle];
|
||||
bundle = [NSBundle bundleForClass: [self class]];
|
||||
path = [bundle pathForImageResource: @"GormObject"];
|
||||
if (path != nil)
|
||||
{
|
||||
|
|
|
@ -69,7 +69,7 @@ NSString *formatVersion(NSInteger version)
|
|||
{
|
||||
if((self = [super init]) != nil)
|
||||
{
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
NSString *path = [bundle pathForResource: @"VersionProfiles" ofType: @"plist"];
|
||||
versionProfiles = RETAIN([[NSString stringWithContentsOfFile: path] propertyList]);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
if (image == nil)
|
||||
{
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
NSString *path = [bundle pathForImageResource: @"GormFilesOwner"];
|
||||
|
||||
image = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
|
|
|
@ -65,7 +65,7 @@ static NSImage *horizontalImage;
|
|||
|
||||
if (image == nil)
|
||||
{
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
NSString *path = [bundle pathForImageResource: @"GormView"];
|
||||
image = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
if (image == nil)
|
||||
{
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
NSString *path = [bundle pathForImageResource: @"GormUnknown"];
|
||||
image = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
}
|
||||
|
|
|
@ -81,16 +81,23 @@ static NSColor *darkGreyBlueColor = nil;
|
|||
{
|
||||
if (self == [GormOutlineView class])
|
||||
{
|
||||
NSBundle *bundle = [NSBundle bundleForClass: self];
|
||||
NSString *path = nil;
|
||||
|
||||
// initialize images
|
||||
[self setVersion: current_version];
|
||||
nc = [NSNotificationCenter defaultCenter];
|
||||
collapsed = [NSImage imageNamed: @"common_outlineCollapsed"];
|
||||
expanded = [NSImage imageNamed: @"common_outlineExpanded"];
|
||||
unexpandable = [NSImage imageNamed: @"common_outlineUnexpandable"];
|
||||
action = [NSImage imageNamed: @"GormAction"];
|
||||
outlet = [NSImage imageNamed: @"GormOutlet"];
|
||||
actionSelected = [NSImage imageNamed: @"GormActionSelected"];
|
||||
outletSelected = [NSImage imageNamed: @"GormOutletSelected"];
|
||||
path = [bundle pathForImageResource: @"GormAction"];
|
||||
action = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"GormOutlet"];
|
||||
outlet = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"GormActionSelected"];
|
||||
actionSelected = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
path = [bundle pathForImageResource: @"GormOutletSelected"];
|
||||
outletSelected = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
|
||||
// initialize colors
|
||||
salmonColor =
|
||||
|
|
|
@ -214,7 +214,7 @@ static BOOL _isInInterfaceBuilder = NO;
|
|||
NSImage *image = [super imageForViewer];
|
||||
if([theClass isEqual: @"NSFontManager"])
|
||||
{
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self bundle]];
|
||||
NSString *path = [bundle pathForImageResource: @"GormFontManager"];
|
||||
image = [[NSImage alloc] initWithContentsOfFile: path];
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
|
||||
if (image == nil)
|
||||
{
|
||||
NSBundle *bundle = [NSBundle mainBundle];
|
||||
NSBundle *bundle = [NSBundle bundleForClass: [self class]];
|
||||
NSString *bpath = [bundle pathForImageResource: @"GormSound"];
|
||||
|
||||
image = [[NSImage alloc] initWithContentsOfFile: bpath];
|
||||
|
|
Loading…
Reference in a new issue