mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@17583 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3894b807de
commit
5976bf5b2c
2 changed files with 34 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-09-01 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormViewEditor.m: Added code to allow saving of image as part of
|
||||
the view. This provides a fix for Report #4390 and #4852.
|
||||
|
||||
2003-08-30 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormDocument.m: Added blank implementation of awakeWithContext:
|
||||
|
|
|
@ -117,8 +117,18 @@
|
|||
}
|
||||
@end
|
||||
|
||||
// to allow us to load the image by name, but save it within the archive.
|
||||
// this is a bit of a cheat.
|
||||
@interface NSImage (GormAddition)
|
||||
- (void) setArchiveByName: (BOOL) archiveByName;
|
||||
@end
|
||||
|
||||
|
||||
@implementation NSImage (GormAddition)
|
||||
- (void) setArchiveByName: (BOOL) archiveByName
|
||||
{
|
||||
_flags.archiveByName = archiveByName;
|
||||
}
|
||||
@end
|
||||
|
||||
static BOOL currently_displaying = NO;
|
||||
|
||||
|
@ -1409,17 +1419,30 @@ static BOOL currently_displaying = NO;
|
|||
}
|
||||
else if ([types containsObject: GormImagePboardType] == YES)
|
||||
{
|
||||
NSString *name;
|
||||
name = [dragPb stringForType: GormImagePboardType];
|
||||
[(id)_editedObject setImage: [NSImage imageNamed: name]];
|
||||
NSString *name = [dragPb stringForType: GormImagePboardType];
|
||||
NSImage *image = [NSImage imageNamed: name];
|
||||
[image setArchiveByName: NO];
|
||||
[(id)_editedObject setImage: image];
|
||||
return YES;
|
||||
}
|
||||
else if ([types containsObject: GormSoundPboardType] == YES)
|
||||
{
|
||||
NSString *name;
|
||||
name = [dragPb stringForType: GormSoundPboardType];
|
||||
NSLog(@"sound drag'n'dropping is not currently working, please fix it");
|
||||
// [(id)_editedObject setSound: [NSSound soundNamed: name]];
|
||||
// NSLog(@"sound drag'n'dropping is not currently working, please fix it");
|
||||
if([(id)_editedObject respondsToSelector: @selector(setSound:)])
|
||||
{
|
||||
[(id)_editedObject setSound: [NSSound soundNamed: name]];
|
||||
}
|
||||
|
||||
/*
|
||||
else
|
||||
{
|
||||
int result = NSRunAlertPanel(NULL,
|
||||
_(@"The edited object does not accept sounds."),
|
||||
_(@"Cancel"));
|
||||
}
|
||||
*/
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
|
|
Loading…
Reference in a new issue