* Source/GSTheme.m: remove forward declaration for _setArchiveByName

from NSImage category.
	* Source/NSImage.m: Added code in _setImage:forName: to archive
	by name instead.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31075 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2010-08-03 21:11:00 +00:00
parent 86ff2f4099
commit cefa1b53e7
3 changed files with 16 additions and 21 deletions

View file

@ -1,3 +1,10 @@
2010-08-03 17:21-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/GSTheme.m: remove forward declaration for _setArchiveByName
from NSImage category.
* Source/NSImage.m: Added code in _setImage:forName: to archive
by name instead.
2010-08-02 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSTextView.m (-validateUserInterfaceItem:,

View file

@ -209,7 +209,6 @@ GSStringFromBorderType(NSBorderType borderType)
@interface NSImage (GSTheme)
+ (NSImage*) _setImage: (NSImage*)image name: (NSString*)name;
- (void) _setArchiveByName: (BOOL)flag;
@end
@interface GSTheme (Private)
@ -494,15 +493,6 @@ typedef struct {
* any previous/default image of the same name.
*/
[_images setObject: image forKey: imageName];
/* Force the image to be archived by name. This prevents
* problems such as when/if gorm is being used with a theme
* active, it will not save the image which was loaded
* here and will, instead save the name so that the proper
* image gets loaded in the future.
*/
[image _setArchiveByName: YES];
RELEASE(image);
old = [NSImage imageNamed: imageName];
if (old == nil)

View file

@ -2152,18 +2152,16 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
}
[proxy _setResource: image];
IF_NO_GC([[proxy retain] autorelease]);
/* Force the image to be archived by name. This prevents
* problems such as when/if gorm is being used with a theme
* active, it will not save the image which was loaded
* here and will, instead save the name so that the proper
* image gets loaded in the future.
*/
image->_flags.archiveByName = YES;
[imageLock unlock];
return (NSImage*)proxy;
}
/**
* This method allows the theme system to specify that an image
* should be archived using the reference to it's name only.
* This prevents saving theme specific image data into the
* images in an archive.
*/
- (void) _setArchiveByName: (BOOL)flag;
{
_flags.archiveByName = flag;
}
@end