Corrected minor bug with FirstResponder.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20481 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-12-23 19:52:33 +00:00
parent 007c457cf4
commit ff53d2bb5c
4 changed files with 55 additions and 13 deletions

View file

@ -1,3 +1,12 @@
2004-12-23 14:52 Gregory John Casamento <greg_casamento@yahoo.com>
* GormFilesOwner.h: Added inspector declaration.
* GormFilesOwner.m: Changed code in setObject to create an
autoreleased mutableCopy of the array and removed FirstResponder from
the list to prevent the user from selecting this.
* GormPrivate.h: Added the include for GormFilesOwner.h and also
removed the inspector declaration from this file.
2004-12-23 13:30 Gregory John Casamento <greg_casamento@yahoo.com>
* GormViewEditor.m: In -performDragOperation: copy the image/sound

View file

@ -1,6 +1,36 @@
/* GormFilesOwner.h
*
* Copyright (C) 1999 Free Software Foundation, Inc.
*
* Author: Richard Frith-Macdonald <richard@brainstrom.co.uk>
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
* Date: 1999, 2004
*
* This file is part of GNUstep.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef INCLUDED_GormFilesOwner_h
#define INCLUDED_GormFilesOwner_h
#include <Foundation/NSObject.h>
#include <InterfaceBuilder/IBInspector.h>
@class NSMutableArray, NSBrowser, NSString;
/*
* Each document has a GormFilesOwner object that is used as a placeholder
* for the owner of the document.
@ -13,4 +43,13 @@
- (void) setClassName: (NSString*)aName;
@end
@interface GormFilesOwnerInspector : IBInspector
{
NSBrowser *browser;
NSMutableArray *classes;
BOOL hasConnections;
}
- (void) takeClassFrom: (id)sender;
@end
#endif

View file

@ -3,7 +3,8 @@
* Copyright (C) 1999 Free Software Foundation, Inc.
*
* Author: Richard Frith-Macdonald <richard@brainstrom.co.uk>
* Date: 1999
* Author: Gregory John Casamento <greg_casamento@yahoo.com>
* Date: 1999, 2004
*
* This file is part of GNUstep.
*
@ -172,13 +173,16 @@
// filter the classes to view only when a custom view is selected.
if([anObject isKindOfClass: [GormCustomView class]])
{
ASSIGN(classes, [[NSApp classManager] allSubclassesOf: @"NSView"]);
ASSIGN(classes, AUTORELEASE([[[NSApp classManager] allSubclassesOf: @"NSView"] mutableCopy]));
}
else
{
ASSIGN(classes, [[NSApp classManager] allClassNames]);
ASSIGN(classes, AUTORELEASE([[[NSApp classManager] allClassNames] mutableCopy]));
}
// remove the first responder, since we don't want the user to choose this.
[classes removeObject: @"FirstResponder"];
if (anObject != nil)
{
NSArray *array;

View file

@ -265,16 +265,6 @@ extern NSString *GormResizeCellNotification;
- (void) refreshCells;
@end
@interface GormFilesOwnerInspector : IBInspector
{
NSBrowser *browser;
NSArray *classes;
BOOL hasConnections;
}
- (void) takeClassFrom: (id)sender;
@end
/*
* NSDateFormatter and NSNumberFormatter extensions
* for Gorm Formatters used in the Data Palette