mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
Correction for exception when dragging images/sounds.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20513 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6d04958743
commit
b9e8478246
3 changed files with 36 additions and 22 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-01-02 15:11 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormImageEditor.m
|
||||
* GormSoundEditor.m: Fix to correct exception when dragging
|
||||
from a cell which doesn't contain a resource.
|
||||
|
||||
2005-01-01 10:33 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormLib/IBObjectAdditions.m: Implementation for nibLabel.
|
||||
|
|
|
@ -373,18 +373,22 @@ static int handled_mask= NSDragOperationCopy|NSDragOperationGeneric|NSDragOperat
|
|||
int pos;
|
||||
pos = row * [self numberOfColumns] + column;
|
||||
|
||||
pb = [NSPasteboard pasteboardWithName: NSDragPboard];
|
||||
[pb declareTypes: [NSArray arrayWithObject: GormImagePboardType]
|
||||
owner: self];
|
||||
[pb setString: [[objects objectAtIndex: pos] imageName]
|
||||
forType: GormImagePboardType];
|
||||
[self dragImage: [[objects objectAtIndex: pos] image]
|
||||
at: lastLocation
|
||||
offset: NSZeroSize
|
||||
// don't allow the user to drag empty resources.
|
||||
if(pos < [objects count])
|
||||
{
|
||||
pb = [NSPasteboard pasteboardWithName: NSDragPboard];
|
||||
[pb declareTypes: [NSArray arrayWithObject: GormImagePboardType]
|
||||
owner: self];
|
||||
[pb setString: [[objects objectAtIndex: pos] imageName]
|
||||
forType: GormImagePboardType];
|
||||
[self dragImage: [[objects objectAtIndex: pos] image]
|
||||
at: lastLocation
|
||||
offset: NSZeroSize
|
||||
event: theEvent
|
||||
pasteboard: pb
|
||||
source: self
|
||||
slideBack: YES];
|
||||
pasteboard: pb
|
||||
source: self
|
||||
slideBack: YES];
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -364,18 +364,22 @@ static NSMapTable *docMap = 0;
|
|||
int pos;
|
||||
pos = row * [self numberOfColumns] + column;
|
||||
|
||||
pb = [NSPasteboard pasteboardWithName: NSDragPboard];
|
||||
[pb declareTypes: [NSArray arrayWithObject: GormSoundPboardType]
|
||||
owner: self];
|
||||
[pb setString: [[objects objectAtIndex: pos] soundName]
|
||||
forType: GormSoundPboardType];
|
||||
[self dragImage: [[objects objectAtIndex: pos] soundImageForViewer]
|
||||
at: lastLocation
|
||||
offset: NSZeroSize
|
||||
// don't allow the user to drag empty resources.
|
||||
if(pos < [objects count])
|
||||
{
|
||||
pb = [NSPasteboard pasteboardWithName: NSDragPboard];
|
||||
[pb declareTypes: [NSArray arrayWithObject: GormSoundPboardType]
|
||||
owner: self];
|
||||
[pb setString: [[objects objectAtIndex: pos] soundName]
|
||||
forType: GormSoundPboardType];
|
||||
[self dragImage: [[objects objectAtIndex: pos] soundImageForViewer]
|
||||
at: lastLocation
|
||||
offset: NSZeroSize
|
||||
event: theEvent
|
||||
pasteboard: pb
|
||||
source: self
|
||||
slideBack: YES];
|
||||
pasteboard: pb
|
||||
source: self
|
||||
slideBack: YES];
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue