Implement cool slideback if a menu is already in the document.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18884 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-03-24 19:56:40 +00:00
parent 78412a87fa
commit 50f9c1a097

View file

@ -163,6 +163,7 @@ static NSImage *dragImage = nil;
id obj; id obj;
NSPasteboard *pb; NSPasteboard *pb;
NSImageRep *rep; NSImageRep *rep;
NSMenu *menu;
if (view == self || view == nil) if (view == self || view == nil)
{ {
@ -195,6 +196,8 @@ static NSImage *dragImage = nil;
ASSIGN(dragPb, pb); ASSIGN(dragPb, pb);
[active copyObject: obj type: type toPasteboard: pb]; [active copyObject: obj type: type toPasteboard: pb];
NSDebugLog(@"type: %@, obj: %@,", type, obj); NSDebugLog(@"type: %@, obj: %@,", type, obj);
menu = [active objectForName: @"NSMenu"];
[self dragImage: dragImage [self dragImage: dragImage
at: rect.origin at: rect.origin
@ -203,7 +206,7 @@ static NSImage *dragImage = nil;
pasteboard: pb pasteboard: pb
source: self source: self
slideBack: ([type isEqual: IBWindowPboardType] || slideBack: ([type isEqual: IBWindowPboardType] ||
[type isEqual: IBMenuPboardType]) ? NO : YES]; ([type isEqual: IBMenuPboardType] && menu == nil)) ? NO : YES];
} }
@end @end