mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
* Palettes/0Menus/GormMenuEditor.m: Revert some changes from
previous modification. Corrects issue with submenus showing up when they shouldn't. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@27847 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d495893e23
commit
b6da98f29d
2 changed files with 203 additions and 217 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-02-11 09:22-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Palettes/0Menus/GormMenuEditor.m: Revert some changes from
|
||||
previous modification. Corrects issue with submenus showing up
|
||||
when they shouldn't.
|
||||
|
||||
2009-02-11 01:31-EST Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormDocument.m: Remove call to deprecated method.
|
||||
|
|
|
@ -125,24 +125,11 @@
|
|||
{
|
||||
NSPoint loc = [theEvent locationInWindow];
|
||||
NSView *hit = [super hitTest: loc];
|
||||
NSView *view = nil;
|
||||
|
||||
[edited display];
|
||||
|
||||
[[self window] becomeMainWindow];
|
||||
[[self window] makeFirstResponder: self];
|
||||
|
||||
if([hit isKindOfClass: [NSMenuView class]] &&
|
||||
![edited _ownedByPopUp])
|
||||
{
|
||||
view = [[hit subviews] objectAtIndex: 0];
|
||||
}
|
||||
|
||||
if([view isKindOfClass: [NSMenuView class]] ||
|
||||
[hit isKindOfClass: [NSMenuView class]])
|
||||
{
|
||||
if (view == rep ||
|
||||
hit == rep)
|
||||
if (hit == rep)
|
||||
{
|
||||
int pos = [rep indexOfItemAtPoint: loc];
|
||||
|
||||
|
@ -350,7 +337,6 @@
|
|||
[self makeSelectionVisible: YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
|
@ -359,12 +345,9 @@
|
|||
*/
|
||||
[[document parentEditorForEditor: self] selectObjects:
|
||||
[NSArray arrayWithObject: edited]];
|
||||
if(hit != self)
|
||||
{
|
||||
[hit mouseDown: theEvent];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL) acceptsTypeFromArray: (NSArray*)types
|
||||
{
|
||||
|
@ -675,7 +658,6 @@ void _attachAll(NSMenu *menu, id document)
|
|||
* Make sure that all our menu items are attached in the document.
|
||||
*/
|
||||
_attachAll(edited, document);
|
||||
[edited display];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -833,7 +815,8 @@ void _attachAll(NSMenu *menu, id document)
|
|||
NSDebugLog(@"not owned by popup");
|
||||
[edited insertItem: item atIndex: pos++];
|
||||
}
|
||||
|
||||
[edited sizeToFit];
|
||||
[edited display];
|
||||
[self selectObjects: items];
|
||||
[self makeSelectionVisible: YES];
|
||||
}
|
||||
|
@ -857,9 +840,6 @@ void _attachAll(NSMenu *menu, id document)
|
|||
dragType = nil;
|
||||
return NO;
|
||||
}
|
||||
|
||||
[edited sizeToFit];
|
||||
[edited display];
|
||||
dragType = nil;
|
||||
return YES;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue