Correction for notification issue and connection problem.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21102 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-04-13 00:32:33 +00:00
parent f1ab2ddbb1
commit 13ebd044a8
3 changed files with 31 additions and 19 deletions

View file

@ -1,3 +1,9 @@
2005-04-12 20:27 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormGenericEditor.m: Unsubscribe from all notifications.
* GormCore/GormObjectEditor.m: Correct problem preventing
connections.
2005-04-11 23:24 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormInspectorsManager.m: Send a call to "revert"

View file

@ -176,6 +176,11 @@
// The resource manager is a weak connection and is not retained,
// no need to release it here.
RELEASE(objects);
// Remove self from any and all notifications.
[[NSNotificationCenter defaultCenter]
removeObserver: self];
[super dealloc];
}

View file

@ -206,33 +206,34 @@ static NSMapTable *docMap = 0;
- (unsigned) draggingEntered: (id<NSDraggingInfo>)sender
{
NSArray *pbTypes = nil;
NSString *type = nil;
NSArray *mgrTypes = nil;
// Get the resource manager first, if nil don't bother calling the rest...
dragPb = [sender draggingPasteboard];
pbTypes = [dragPb types];
resourceManager = [(GormDocument *)document resourceManagerForPasteboard: dragPb];
if(resourceManager != nil)
{
NSArray *types;
NSString *type;
NSArray *resourceTypes = [resourceManager resourcePasteboardTypes];
types = [dragPb types];
type = [resourceTypes firstObjectCommonWithArray: types];
if (type != nil)
{
dragType = type;
}
else if ([types containsObject: GormLinkPboardType] == YES)
{
dragType = GormLinkPboardType;
}
else
{
dragType = nil;
}
mgrTypes = [resourceManager resourcePasteboardTypes];
type = [mgrTypes firstObjectCommonWithArray: pbTypes];
}
if (type != nil)
{
dragType = type;
}
else if ([pbTypes containsObject: GormLinkPboardType] == YES)
{
dragType = GormLinkPboardType;
}
else
{
dragType = nil;
}
return [self draggingUpdated: sender];
}