Correction for problem found by Riccardo Mattolla. Cleanup.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@22676 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2006-03-19 01:16:18 +00:00
parent 270338574f
commit 5a923726a1
4 changed files with 26 additions and 22 deletions

View file

@ -1,3 +1,11 @@
2006-03-18 20:12 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormDocument.m: Generalize rule for adding documentView
objects from a scrollview.
* GormCore/GormInspectorsManager.m: Correct logic which selects the
object to send to the inspector.
* GormCore/GormScrollViewEditor.m: Cleanup code a little bit.
2006-03-16 06:33 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormViewWithContentViewEditor.m: Correction related to

View file

@ -673,7 +673,7 @@ static NSImage *fileImage = nil;
toParent: tv];
}
}
else if ([[anObject documentView] isKindOfClass: [NSTextView class]] == YES)
else // if ([[anObject documentView] isKindOfClass: [NSTextView class]] == YES)
{
[self attachObject: [anObject documentView] toParent: anObject];
}

View file

@ -296,12 +296,12 @@
if ([obj isKindOfClass: [NSScrollView class]] &&
[(NSScrollView *)obj documentView])
{
// && [[(NSScrollView *)obj documentView] conformsToProtocol: @protocol(IBEditors)] == NO)
id docView = [(NSScrollView *)obj documentView];
obj = [(NSScrollView *)obj documentView];
// FIXME: Find a more generalized way to do this.
if ([obj isKindOfClass: [NSTableView class]])
// FIXME: Really need to find a more generalized way to do this.
if ([docView isKindOfClass: [NSTableView class]])
{
obj = docView;
if ([obj selectedColumn] != -1)
{
obj = [[obj tableColumns] objectAtIndex:

View file

@ -3,6 +3,7 @@
* Copyright (C) 2002 Free Software Foundation, Inc.
*
* Author: Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
* Date: 2002
*
* This file is part of GNUstep.
@ -23,11 +24,10 @@
*/
#include <AppKit/AppKit.h>
#include <InterfaceBuilder/IBObjectAdditions.h>
#include "GormPrivate.h"
#include "GormBoxEditor.h"
#include "GormViewKnobs.h"
#include <InterfaceBuilder/IBObjectAdditions.h>
@implementation NSScrollView (IBObjectAdditions)
- (NSString *) inspectorClassName
@ -153,16 +153,14 @@
if ((self = [super initWithObject: anObject
inDocument: aDocument]) == nil)
return nil;
{
return nil;
}
selection = [[NSMutableArray alloc] initWithCapacity: 5];
[self registerForDraggedTypes: [NSArray arrayWithObjects:
IBViewPboardType, GormLinkPboardType, IBFormatterPboardType, nil]];
return self;
}
@ -171,6 +169,7 @@
id documentView = [_EO documentView];
NSArray *subviews = [documentView subviews];
NSMutableArray *newSelection = [NSMutableArray array];
id thisView = nil;
if([documentView conformsToProtocol: @protocol(IBEditors)] == YES)
{
@ -200,16 +199,13 @@
frame = [parent convertRect: frame fromView: _EO];
[documentView setFrame: frame];
[newSelection addObject: documentView];
[_EO setDocumentView: nil]; // remove any reference to the box.
// RELEASE(_EO);
[_EO setDocumentView: nil];
}
{
id thisView = [self editedObject];
[self close];
[thisView removeFromSuperview];
[document detachObject: thisView];
}
thisView = [self editedObject];
[self close];
[thisView removeFromSuperview];
[document detachObject: thisView];
return newSelection;
}