diff --git a/ChangeLog b/ChangeLog index 3cd9ed16e..2a4bc7b7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-08-03 17:21-EDT Gregory John Casamento + + * 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 * Source/NSTextView.m (-validateUserInterfaceItem:, diff --git a/Source/GSTheme.m b/Source/GSTheme.m index 249d16ebc..c03acf32c 100644 --- a/Source/GSTheme.m +++ b/Source/GSTheme.m @@ -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) diff --git a/Source/NSImage.m b/Source/NSImage.m index ea9b5ba19..8e0aed838 100644 --- a/Source/NSImage.m +++ b/Source/NSImage.m @@ -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