mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 12:01:16 +00:00
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:
parent
78412a87fa
commit
50f9c1a097
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -196,6 +197,8 @@ static NSImage *dragImage = nil;
|
||||||
[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
|
||||||
offset: NSMakeSize(0,0)
|
offset: NSMakeSize(0,0)
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue