Various fixes to compilation warnings and an NSPanel fix which allows the NSWindow inspector to be used on a panel.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@15477 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2003-01-04 00:17:43 +00:00
parent 4f740ef4b3
commit 314ea111d8
11 changed files with 69 additions and 15 deletions

View file

@ -1,3 +1,17 @@
2003-01-03 Gregory John Casamento <greg_casamento@yahoo.com>
* Gorm.m: Eliminated some compilation warnings.
* GormDocument.m: Eliminated some compilation warnings.
* GormMenuEditor.m: same as above.
* GormPopupButtonEditor.m: same as above.
* GormTableViewEditor.m: same as above.
* GormViewEditor.h: Added category to declare windowAndRect:forObject:
to prevent compilation warnings in the editor classes.
* GormCustomView.m: Created dummy implementation of encodeWithCoder: to
prevent warnings.
* Palettes/1Windows/main.m: Added a category to NSPanel
to use the window inspector to edit an NSPanel instance.
2003-01-01 Gregory John Casamento <greg_casamento@yahoo.com>
* Defaults.plist: Added some new defaults and deleted some

4
Gorm.m
View file

@ -1137,12 +1137,12 @@ static NSButtonType _buttonTypeForObject( id button )
- (void) loadSound: (id) sender
{
[[self activeDocument] openSound: sender];
[(id)[self activeDocument] openSound: sender];
}
- (void) loadImage: (id) sender
{
[[self activeDocument] openImage: sender];
[(id)[self activeDocument] openImage: sender];
}
- (id) miniaturize: (id)sender

View file

@ -166,5 +166,10 @@
RELEASE(self);
return obj;
}
- (void) encodeWithCoder: (NSCoder)coder
{
// nothing to do. This is a class for testing custom views only. GJC
}
@end

View file

@ -108,8 +108,9 @@
- (id) createClassFiles: (id)sender;
- (void) changeCurrentClass: (id)sender;
// sound support
// sound & image support
- (id) openSound: (id)sender;
- (id) openImage: (id)sender;
// Internals support
- (void) rebuildObjToNameMapping;

View file

@ -3262,7 +3262,7 @@ shouldEditTableColumn: (NSTableColumn *)tableColumn
return nil;
}
// sound support...
// image/sound support...
- (id) openImage: (id)sender
{
NSArray *fileTypes = [NSImage imageFileTypes];

View file

@ -145,7 +145,6 @@ extern NSString *GormLinkPboardType;
- (id) inspector: (id) sender;
- (id) newApplication: (id) sender;
- (id) loadPalette: (id) sender;
- (void) loadSound: (id) sender;
- (id) open: (id)sender;
- (id) palettes: (id) sender;
- (id) paste: (id)sender;
@ -157,10 +156,19 @@ extern NSString *GormLinkPboardType;
- (id) setName: (id)sender;
- (id) testInterface: (id)sender;
// sound & images.
- (void) loadSound: (id) sender;
- (void) loadImage: (id) sender;
// grouping
- (id) groupSelectionInSplitView: (id)sender;
- (id) groupSelectionInBox: (id)sender;
- (id) groupSelectionInScrollView: (id)sender;
- (id) ungroup: (id)sender;
// added for classes support
- (id) createSubclass: (id)sender;
- (id) instantiateClass: (id)sender;
- (id) editClass: (id)sender;
- (NSMenu*) classMenu;
@end
@ -184,6 +192,11 @@ extern NSString *GormLinkPboardType;
}
@end
// private methods...
@interface GormGenericEditor (PrivateMethods)
- (void) groupSelectionInScrollView;
@end
@interface GormObjectEditor : GormGenericEditor <IBEditors, IBSelectionOwners>
{
// NSMutableArray *objects;

View file

@ -60,3 +60,11 @@
withEvent: (NSEvent *) theEvent
andPlacementInfo: (GormPlacementInfo*)gpi;
@end
@interface GormViewEditor (WindowAndRect)
/*
* Pull the window object and it's rect.
*/
- (NSWindow *)windowAndRect: (NSRect *)prect
forObject: (id) object;
@end

View file

@ -91,6 +91,10 @@
- (NSWindow*) window;
@end
@interface GormMenuEditor (Private)
- (NSEvent *) editTextField: view withEvent: (NSEvent *)theEvent;
@end
@implementation GormMenuEditor
- (BOOL) acceptsFirstMouse: (NSEvent*)theEvent
@ -910,7 +914,8 @@ NSLog(@"Link at index: %d (%@)", pos, NSStringFromPoint(loc));
}
else
{
GormObjectEditor *ed;
id ed = nil;
//GormObjectEditor *ed;
ed = [GormObjectEditor editorForDocument: document];
[ed selectObjects: [NSArray arrayWithObject: edited]];

View file

@ -166,6 +166,18 @@ NSwindow inspector
}
@end
@implementation NSPanel (IBInspectorClassNames)
- (NSString*) inspectorClassName
{
return @"GormWindowAttributesInspector";
}
- (NSString*) sizeInspectorClassName
{
return @"GormWindowSizeInspector";
}
@end
@interface GormWindowAttributesInspector : IBInspector

View file

@ -49,6 +49,10 @@ Class _gormnspopupbuttonCellClass = 0;
}
@end
@interface NSPopUpButtonCell (DirtyHack)
- (id) _gormInitTextCell: (NSString *) string;
@end
@implementation NSPopUpButtonCell (DirtyHack)
- (id) _gormInitTextCell: (NSString *) string
{

View file

@ -509,11 +509,3 @@ static NSText *_textObject;
}
@end