Tidy icon usage

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23630 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-09-26 18:29:11 +00:00
parent 07eeaa998d
commit 7b45601256
6 changed files with 55 additions and 39 deletions

View file

@ -1,3 +1,11 @@
2006-09-26 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSWorkspace.m: Use png in preference to tiff.
* Source/NSMenu.m: Remove unused extension from icon names.
* Source/NSSplitView.m: ditto
* Source/NSOutlineView.m: ditto
* Source/NSTabView.m: ditto
2006-09-25 Matt Rice <ratmice@yahoo.com>
* Source/NSTableView.m (_shouldEditTableColumn:row:):

View file

@ -252,7 +252,7 @@ static NSNotificationCenter *nc;
appItem = (NSMenuItem *)[self itemWithTitle: title];
if (!ti)
ti = [[NSImage imageNamed: @"GNUstep.tiff"] copy];
ti = [[NSImage imageNamed: @"GNUstep"] copy];
[ti setScalesWhenResized: YES];
[ti setSize: NSMakeSize(bar, bar)];
@ -273,7 +273,7 @@ static NSNotificationCenter *nc;
float bar = [NSMenuView menuBarHeight] - 4;
if (!ti)
ti = [[NSImage imageNamed: @"GNUstep.tiff"] copy];
ti = [[NSImage imageNamed: @"GNUstep"] copy];
[ti setScalesWhenResized: YES];
[ti setSize: NSMakeSize(bar, bar)];

View file

@ -122,9 +122,9 @@ static NSImage *unexpandable = nil;
{
[self setVersion: current_version];
nc = [NSNotificationCenter defaultCenter];
collapsed = [NSImage imageNamed: @"common_outlineCollapsed.tiff"];
expanded = [NSImage imageNamed: @"common_outlineExpanded.tiff"];
unexpandable = [NSImage imageNamed: @"common_outlineUnexpandable.tiff"];
collapsed = [NSImage imageNamed: @"common_outlineCollapsed"];
expanded = [NSImage imageNamed: @"common_outlineExpanded"];
unexpandable = [NSImage imageNamed: @"common_outlineUnexpandable"];
}
}

View file

@ -70,7 +70,7 @@ static NSNotificationCenter *nc = nil;
_isVertical = NO;
ASSIGN(_dividerColor, [NSColor controlShadowColor]);
ASSIGN(_backgroundColor, [NSColor controlBackgroundColor]);
ASSIGN(_dimpleImage, [NSImage imageNamed: @"common_Dimple.tiff"]);
ASSIGN(_dimpleImage, [NSImage imageNamed: @"common_Dimple"]);
_never_displayed_before = YES;
_autoresizes_subviews = NO;
@ -932,7 +932,7 @@ static inline NSPoint centerSizeInRect(NSSize innerSize, NSRect outerRect)
_draggedBarWidth = 8; // default bigger than dividerThickness
ASSIGN(_dividerColor, [NSColor controlShadowColor]);
ASSIGN(_backgroundColor, [NSColor controlBackgroundColor]);
ASSIGN(_dimpleImage, [NSImage imageNamed: @"common_Dimple.tiff"]);
ASSIGN(_dimpleImage, [NSImage imageNamed: @"common_Dimple"]);
_never_displayed_before = YES;
}
else
@ -943,7 +943,7 @@ static inline NSPoint centerSizeInRect(NSSize innerSize, NSRect outerRect)
// Decode objects that we do retain.
[aDecoder decodeValueOfObjCType: @encode(id) at: &_dimpleImage];
if (_dimpleImage == nil)
ASSIGN(_dimpleImage, [NSImage imageNamed: @"common_Dimple.tiff"]);
ASSIGN(_dimpleImage, [NSImage imageNamed: @"common_Dimple"]);
[aDecoder decodeValueOfObjCType: @encode(id) at: &_backgroundColor];
[aDecoder decodeValueOfObjCType: @encode(id) at: &_dividerColor];

View file

@ -438,7 +438,7 @@
{
iP.y += 1;
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed: @"common_TabDownSelectedLeft.tiff"]
[[NSImage imageNamed: @"common_TabDownSelectedLeft"]
compositeToPoint: iP operation: NSCompositeSourceOver];
iP.y -= 1;
iFlex = 1;
@ -447,7 +447,7 @@
{
iP.y += 1;
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed: @"common_TabDownUnSelectedLeft.tiff"]
[[NSImage imageNamed: @"common_TabDownUnSelectedLeft"]
compositeToPoint: iP operation: NSCompositeSourceOver];
iP.y -= 1;
}
@ -485,7 +485,7 @@
iFlex = 1;
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed:
@"common_TabDownUnSelectedToSelectedJunction.tiff"]
@"common_TabDownUnSelectedToSelectedJunction"]
compositeToPoint: iP operation: NSCompositeSourceOver];
iP.y -= 1;
}
@ -496,7 +496,7 @@
iP.y += 1;
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed:
@"common_TabDownSelectedToUnSelectedJunction.tiff"]
@"common_TabDownSelectedToUnSelectedJunction"]
compositeToPoint: iP operation: NSCompositeSourceOver];
iP.y -= 1;
iFlex = -1;
@ -506,7 +506,7 @@
// iP.y += 1;
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed:
@"common_TabDownUnSelectedJunction.tiff"]
@"common_TabDownUnSelectedJunction"]
compositeToPoint: iP operation: NSCompositeSourceOver];
//iP.y -= 1;
iFlex = -1;
@ -543,14 +543,14 @@
if ([anItem tabState] == NSSelectedTab)
{
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed: @"common_TabDownSelectedRight.tiff"]
[[NSImage imageNamed: @"common_TabDownSelectedRight"]
compositeToPoint: iP operation: NSCompositeSourceOver];
}
else if ([anItem tabState] == NSBackgroundTab)
{
// iP.y += 1;
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed: @"common_TabDownUnSelectedRight.tiff"]
[[NSImage imageNamed: @"common_TabDownUnSelectedRight"]
compositeToPoint: iP operation: NSCompositeSourceOver];
// iP.y -= 1;
}
@ -585,13 +585,13 @@
{
iP.y -= 1;
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed: @"common_TabSelectedLeft.tiff"]
[[NSImage imageNamed: @"common_TabSelectedLeft"]
compositeToPoint: iP operation: NSCompositeSourceOver];
}
else if (itemState == NSBackgroundTab)
{
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed: @"common_TabUnSelectedLeft.tiff"]
[[NSImage imageNamed: @"common_TabUnSelectedLeft"]
compositeToPoint: iP operation: NSCompositeSourceOver];
}
else
@ -625,7 +625,7 @@
iP.y -= 1;
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed:
@"common_TabUnSelectToSelectedJunction.tiff"]
@"common_TabUnSelectToSelectedJunction"]
compositeToPoint: iP operation: NSCompositeSourceOver];
}
else if (itemState == NSBackgroundTab)
@ -635,7 +635,7 @@
iP.y -= 1;
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed:
@"common_TabSelectedToUnSelectedJunction.tiff"]
@"common_TabSelectedToUnSelectedJunction"]
compositeToPoint: iP operation: NSCompositeSourceOver];
iP.y += 1;
}
@ -643,7 +643,7 @@
{
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed:
@"common_TabUnSelectedJunction.tiff"]
@"common_TabUnSelectedJunction"]
compositeToPoint: iP operation: NSCompositeSourceOver];
}
}
@ -676,13 +676,13 @@
if ([anItem tabState] == NSSelectedTab)
{
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed: @"common_TabSelectedRight.tiff"]
[[NSImage imageNamed: @"common_TabSelectedRight"]
compositeToPoint: iP operation: NSCompositeSourceOver];
}
else if ([anItem tabState] == NSBackgroundTab)
{
NSRectFill (NSMakeRect (iP.x, iP.y, 14, 17));
[[NSImage imageNamed: @"common_TabUnSelectedRight.tiff"]
[[NSImage imageNamed: @"common_TabUnSelectedRight"]
compositeToPoint: iP operation: NSCompositeSourceOver];
}
else

View file

@ -425,11 +425,11 @@ static id GSLaunched(NSNotification *notification, BOOL active)
* <p>To determine the icon for a folder, if the folder has a '.app',
* '.debug' or '.profile' extension - the Info-gnustep.plist file
* is examined for an 'NSIcon' value and NSWorkspace tries to use that.
* If there is no value specified - it tries foo.app/foo.tiff' or
* 'foo.app/.dir.tiff'
* If there is no value specified - it tries 'foo.app/foo.png'
* or 'foo.app/foo.tiff' or 'foo.app/.dir.png' or 'foo.app/.dir.tiff'
* </p>
* <p>If the folder was not an application wrapper, it just tries
* the .dir.tiff file.
* the .dir.png and .dir.tiff file.
* </p>
* <p>If no icon was available, it uses a default folder icon or a
* special icon for the root directory.
@ -471,7 +471,7 @@ static id GSLaunched(NSNotification *notification, BOOL active)
*
* {
* NSExecutable = "xv";
* NSIcon = "xv.tiff";
* NSIcon = "xv.png";
* NSTypes = (
* {
* NSIcon = "tiff.tiff";
@ -1063,15 +1063,20 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
}
/*
* If we have no iconPath, try 'dir/.dir.tiff' as a
* If we have no iconPath, try 'dir/.dir.png' as a
* possible locations for the directory icon.
*/
if (iconPath == nil)
{
iconPath = [fullPath stringByAppendingPathComponent: @".dir.tiff"];
iconPath = [fullPath stringByAppendingPathComponent: @".dir.png"];
if ([mgr isReadableFileAtPath: iconPath] == NO)
{
iconPath = nil;
iconPath
= [fullPath stringByAppendingPathComponent: @".dir.tiff"];
if ([mgr isReadableFileAtPath: iconPath] == NO)
{
iconPath = nil;
}
}
}
@ -1090,7 +1095,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
if (rootImage == nil)
{
rootImage = RETAIN([NSImage _standardImageWithName:
@"Root_PC.tiff"]);
@"Root_PC"]);
}
image = rootImage;
@ -1100,7 +1105,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
if (homeImage == nil)
{
homeImage = RETAIN([NSImage _standardImageWithName:
@"HomeDirectory.tiff"]);
@"HomeDirectory"]);
}
image = homeImage;
}
@ -1109,7 +1114,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
if (folderImage == nil)
{
folderImage = RETAIN([NSImage _standardImageWithName:
@"Folder.tiff"]);
@"Folder"]);
}
image = folderImage;
}
@ -1151,7 +1156,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
if (unknownTool == nil)
{
unknownTool = RETAIN([NSImage _standardImageWithName:
@"UnknownTool.tiff"]);
@"UnknownTool"]);
}
image = unknownTool;
}
@ -1822,7 +1827,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
/*
* If there is no icon specified in the Info.plist for app
* try 'wrapper/app.tiff'
* try 'wrapper/app.png'
*/
if (iconPath == nil)
{
@ -1831,11 +1836,14 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
str = [fullPath lastPathComponent];
str = [str stringByDeletingPathExtension];
iconPath = [fullPath stringByAppendingPathComponent: str];
iconPath = [iconPath stringByAppendingPathExtension: @"tiff"];
iconPath = [iconPath stringByAppendingPathExtension: @"png"];
if ([mgr isReadableFileAtPath: iconPath] == NO)
{
iconPath = nil;
iconPath = [iconPath stringByAppendingPathExtension: @"tiff"];
if ([mgr isReadableFileAtPath: iconPath] == NO)
{
iconPath = nil;
}
}
}
@ -2024,7 +2032,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
if (image == nil)
{
image = RETAIN([NSImage _standardImageWithName: @"Unknown.tiff"]);
image = RETAIN([NSImage _standardImageWithName: @"Unknown"]);
}
return image;
@ -2157,7 +2165,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
if (unknownApplication == nil)
{
unknownApplication = RETAIN([NSImage _standardImageWithName:
@"UnknownApplication.tiff"]);
@"UnknownApplication"]);
}
icon = unknownApplication;
}