mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-23 06:20:47 +00:00
Correction to repair method and repaired Gorm.gorm file which had some extra menu items in it.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19218 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
16caf8e697
commit
3bcebe6fbd
3 changed files with 27 additions and 21 deletions
|
@ -1986,8 +1986,16 @@ static NSImage *classesImage = nil;
|
|||
if(sm == nil)
|
||||
{
|
||||
NSArray *menus = findAll(obj);
|
||||
[self detachObjects: menus];
|
||||
NSLog(@"Found and removed a dangling menu %@, %@.",obj,[self nameForObject: obj]);
|
||||
[self detachObjects: menus];
|
||||
[self detachObject: obj];
|
||||
|
||||
// Since the menu is a top level object, it is not retained by
|
||||
// anything else. When it was unarchived it was autoreleased, and
|
||||
// the detach also does a release. Unfortunately, this causes a
|
||||
// crash, so this extra retain is only here to stave off the
|
||||
// release, so the autorelease can release the menu when it should.
|
||||
RETAIN(obj);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1996,18 +2004,17 @@ static NSImage *classesImage = nil;
|
|||
id m = [obj menu];
|
||||
if(m == nil)
|
||||
{
|
||||
NSArray *menus = findAll(obj);
|
||||
[self detachObjects: menus];
|
||||
NSLog(@"Found and removed a dangling menu item %@, %@.",obj,[self nameForObject: obj]);
|
||||
}
|
||||
}
|
||||
id sm = [obj submenu];
|
||||
|
||||
if([obj isKindOfClass: [NSView class]])
|
||||
{
|
||||
id sv = [obj superview];
|
||||
if(sv == nil)
|
||||
{
|
||||
NSLog(@"Found a dangling view %@, %@.",obj,[self nameForObject: obj]);
|
||||
NSLog(@"Found and removed a dangling menu item %@, %@.",obj,[self nameForObject: obj]);
|
||||
[self detachObject: obj];
|
||||
|
||||
// if there are any submenus, detach those as well.
|
||||
if(sm != nil)
|
||||
{
|
||||
NSArray *menus = findAll(sm);
|
||||
[self detachObjects: menus];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2179,9 +2186,14 @@ static NSImage *classesImage = nil;
|
|||
[nt removeObjectForKey: @"NSFirst"];
|
||||
[connections addObjectsFromArray: [c connections]];
|
||||
[nameTable addEntriesFromDictionary: nt];
|
||||
|
||||
[self rebuildObjToNameMapping];
|
||||
|
||||
// repair the .gorm file, if needed.
|
||||
if(repairFile == YES)
|
||||
{
|
||||
[self _repairFile];
|
||||
}
|
||||
|
||||
/*
|
||||
* set our new file name
|
||||
*/
|
||||
|
@ -2253,12 +2265,6 @@ static NSImage *classesImage = nil;
|
|||
// }
|
||||
//
|
||||
|
||||
// repair the .gorm file, if needed.
|
||||
if(repairFile == YES)
|
||||
{
|
||||
[self _repairFile];
|
||||
}
|
||||
|
||||
// this is the last thing we should do...
|
||||
[nc postNotificationName: IBDidOpenDocumentNotification
|
||||
object: self];
|
||||
|
|
|
@ -211,7 +211,7 @@
|
|||
|
||||
- (void) copySelection
|
||||
{
|
||||
NSDebugLog(@"copySelection");
|
||||
NSLog(@"copySelection");
|
||||
}
|
||||
|
||||
- (void) deactivate
|
||||
|
@ -347,7 +347,7 @@
|
|||
|
||||
- (void) pasteInSelection
|
||||
{
|
||||
NSDebugLog(@"pasteInSelection");
|
||||
NSLog(@"pasteInSelection");
|
||||
}
|
||||
|
||||
- (BOOL) performDragOperation: (id<NSDraggingInfo>)sender
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue