mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 03:31:01 +00:00
Enabled copy/paste in the objects editor, corrected a problem with the browser, expanded the capabilities of the resource manager and gormified the connection inspector.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21620 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
de2a5082ea
commit
4ae3c45cd5
18 changed files with 110 additions and 100 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
|||
2005-08-06 22:25 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* English.lproj/GormClassInspector.gorm: Minor changes.
|
||||
* GNUmakefile: Added GormConnectionInspector.m
|
||||
* GormCore/GNUmakefile: Added the new resource manager.
|
||||
* GormCore/GormDocument.m: Changed to refer to the new resource
|
||||
manager.
|
||||
* GormCore/GormInspectorsManager.m: Removed hard coded gui.
|
||||
* GormCore/GormObjectEditor.m: Enabled copy/paste for objects in the
|
||||
object view.
|
||||
* GormCore/GormResourceManager.[hm]: Added to replace
|
||||
GormViewResourceManager.[hm]
|
||||
* Palettes/3Containers/GormBrowserAttributesInspector.[hm]:
|
||||
Added code to handle maxVisibleColumnsField. Corrected tag issue.
|
||||
* Palettes/3Containers/GormNSBrowserInspector.gorm:
|
||||
Added maximum visible columns field.
|
||||
|
||||
2005-08-06 18:04 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormLib/IBInspector.m: Change to correct problem with revert call
|
||||
|
|
Binary file not shown.
Binary file not shown.
19
English.lproj/GormConnectionInspector.gorm/data.classes
Normal file
19
English.lproj/GormConnectionInspector.gorm/data.classes
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"_internalCall:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
GormConnectionInspector = {
|
||||
Actions = (
|
||||
"_internalCall:"
|
||||
);
|
||||
Outlets = (
|
||||
newBrowser,
|
||||
oldBrowser
|
||||
);
|
||||
Super = IBInspector;
|
||||
};
|
||||
}
|
BIN
English.lproj/GormConnectionInspector.gorm/data.info
Normal file
BIN
English.lproj/GormConnectionInspector.gorm/data.info
Normal file
Binary file not shown.
BIN
English.lproj/GormConnectionInspector.gorm/objects.gorm
Normal file
BIN
English.lproj/GormConnectionInspector.gorm/objects.gorm
Normal file
Binary file not shown.
|
@ -125,6 +125,7 @@ Gorm_RESOURCE_FILES = \
|
|||
Gorm_LOCALIZED_RESOURCE_FILES = \
|
||||
GormClassInspector.gorm \
|
||||
GormClassPanel.gorm \
|
||||
GormConnectionInspector.gorm \
|
||||
GormCustomClassInspector.gorm \
|
||||
GormDocument.gorm \
|
||||
GormFontView.gorm \
|
||||
|
|
|
@ -68,6 +68,7 @@ GormCore_HEADER_FILES = \
|
|||
GormProtocol.h \
|
||||
GormResource.h \
|
||||
GormResourceEditor.h \
|
||||
GormResourceManager.h \
|
||||
GormScrollViewAttributesInspector.h \
|
||||
GormSetNameController.h \
|
||||
GormSound.h \
|
||||
|
@ -77,7 +78,6 @@ GormCore_HEADER_FILES = \
|
|||
GormSplitViewEditor.h \
|
||||
GormViewEditor.h \
|
||||
GormViewKnobs.h \
|
||||
GormViewResourceManager.h \
|
||||
GormViewSizeInspector.h \
|
||||
GormViewWindow.h \
|
||||
GormViewWithContentViewEditor.h \
|
||||
|
@ -118,6 +118,7 @@ GormCore_OBJC_FILES = \
|
|||
GormPalettesManager.m \
|
||||
GormResource.m \
|
||||
GormResourceEditor.m \
|
||||
GormResourceManager.m \
|
||||
GormScrollViewAttributesInspector.m \
|
||||
GormScrollViewEditor.m \
|
||||
GormSetNameController.m \
|
||||
|
@ -128,7 +129,6 @@ GormCore_OBJC_FILES = \
|
|||
GormSplitViewEditor.m \
|
||||
GormViewEditor.m \
|
||||
GormViewKnobs.m \
|
||||
GormViewResourceManager.m \
|
||||
GormViewSizeInspector.m \
|
||||
GormViewWindow.m \
|
||||
GormViewWithContentViewEditor.m \
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#include "NSView+GormExtensions.h"
|
||||
#include "GormSound.h"
|
||||
#include "GormImage.h"
|
||||
#include "GormViewResourceManager.h"
|
||||
#include "GormResourceManager.h"
|
||||
#include "GormClassEditor.h"
|
||||
#include "GormSoundEditor.h"
|
||||
#include "GormImageEditor.h"
|
||||
|
@ -194,9 +194,10 @@ static NSImage *fileImage = nil;
|
|||
}
|
||||
|
||||
// register the resource managers...
|
||||
[IBResourceManager registerResourceManagerClass: [IBResourceManager class]];
|
||||
[IBResourceManager registerResourceManagerClass: [GormViewResourceManager class]];
|
||||
|
||||
[IBResourceManager registerResourceManagerClass:
|
||||
[IBResourceManager class]];
|
||||
[IBResourceManager registerResourceManagerClass:
|
||||
[GormResourceManager class]];
|
||||
[self setVersion: GNUSTEP_NIB_VERSION];
|
||||
}
|
||||
}
|
||||
|
@ -996,6 +997,19 @@ static NSImage *fileImage = nil;
|
|||
[editorSet addObject: editor];
|
||||
[editor deactivate];
|
||||
}
|
||||
|
||||
// Windows are a special case. Check the content view and see if it's an active editor.
|
||||
/**
|
||||
if([obj isKindOfClass: [NSWindow class]])
|
||||
{
|
||||
id contentView = [obj contentView];
|
||||
if([contentView conformsToProtocol: @protocol(IBEditors)])
|
||||
{
|
||||
[contentView deactivate];
|
||||
[editorSet addObject: contentView];
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// encode the data
|
||||
|
@ -1027,21 +1041,6 @@ static NSImage *fileImage = nil;
|
|||
return self;
|
||||
}
|
||||
|
||||
// For debugging ONLY.
|
||||
/*
|
||||
- (id) retain
|
||||
{
|
||||
NSLog(@"Document being retained... %d: %@", [self retainCount], self);
|
||||
return [super retain];
|
||||
}
|
||||
|
||||
- (oneway void) release
|
||||
{
|
||||
NSLog(@"Document being released... %d: %@", [self retainCount], self);
|
||||
[super release];
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* The given pasteboard chaned ownership.
|
||||
*/
|
||||
|
|
|
@ -657,6 +657,35 @@
|
|||
|
||||
@implementation GormConnectionInspector
|
||||
|
||||
- (id) init
|
||||
{
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
if([NSBundle loadNibNamed: @"GormConnectionInspector" owner: self] == NO)
|
||||
{
|
||||
NSLog(@"Couldn't load GormConnectionInsector");
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Create the okay and revert buttons, programmatically, since we shouldn't
|
||||
// add them to the view. The wantsButtons handling code will do that.
|
||||
okButton = [[NSButton alloc] initWithFrame: NSMakeRect(0,0,70,20)];
|
||||
[okButton setAutoresizingMask: NSViewMaxYMargin | NSViewMinXMargin];
|
||||
[okButton setAction: @selector(ok:)];
|
||||
[okButton setTarget: self];
|
||||
[okButton setTitle: _(@"Connect")];
|
||||
[okButton setEnabled: NO];
|
||||
|
||||
revertButton = [[NSButton alloc] initWithFrame: NSMakeRect(0,0,60,20)];
|
||||
[revertButton setAutoresizingMask: NSViewMaxYMargin | NSViewMinXMargin];
|
||||
[revertButton setAction: @selector(revert:)];
|
||||
[revertButton setTarget: self];
|
||||
[revertButton setTitle: _(@"Revert")];
|
||||
[revertButton setEnabled: NO];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (int) browser: (NSBrowser*)sender numberOfRowsInColumn: (int)column
|
||||
{
|
||||
int rows = 0;
|
||||
|
@ -1014,69 +1043,6 @@ selectCellWithString: (NSString*)title
|
|||
[self setObject: object]; // resets the browser...
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
NSView *contents;
|
||||
NSSplitView *split;
|
||||
NSRect rect;
|
||||
|
||||
rect = NSMakeRect(0, 0, IVW, IVH);
|
||||
window = [[NSWindow alloc] initWithContentRect: rect
|
||||
styleMask: NSBorderlessWindowMask
|
||||
backing: NSBackingStoreRetained
|
||||
defer: NO];
|
||||
contents = [window contentView];
|
||||
split = [[NSSplitView alloc] initWithFrame: [contents bounds]];
|
||||
[split setAutoresizingMask: NSViewWidthSizable|NSViewHeightSizable];
|
||||
|
||||
newBrowser = [[NSBrowser alloc] initWithFrame: rect];
|
||||
[newBrowser setAutoresizingMask: NSViewWidthSizable|NSViewHeightSizable];
|
||||
[newBrowser setMaxVisibleColumns: 2];
|
||||
[newBrowser setAllowsMultipleSelection: NO];
|
||||
[newBrowser setHasHorizontalScroller: NO];
|
||||
[newBrowser setDelegate: self];
|
||||
[newBrowser setTarget: self];
|
||||
[newBrowser setAction: @selector(_internalCall:)];
|
||||
|
||||
[split addSubview: newBrowser];
|
||||
RELEASE(newBrowser);
|
||||
|
||||
rect.size.height /= 2;
|
||||
oldBrowser = [[NSBrowser alloc] initWithFrame: rect];
|
||||
[oldBrowser setAutoresizingMask: NSViewWidthSizable|NSViewHeightSizable];
|
||||
[oldBrowser setMaxVisibleColumns: 1];
|
||||
[oldBrowser setAllowsMultipleSelection: NO];
|
||||
[oldBrowser setHasHorizontalScroller: NO];
|
||||
[oldBrowser setDelegate: self];
|
||||
[oldBrowser setTarget: self];
|
||||
[oldBrowser setAction: @selector(_internalCall:)];
|
||||
|
||||
[split addSubview: oldBrowser];
|
||||
RELEASE(oldBrowser);
|
||||
|
||||
[contents addSubview: split];
|
||||
RELEASE(split);
|
||||
|
||||
okButton = [[NSButton alloc] initWithFrame: NSMakeRect(0,0,70,20)];
|
||||
[okButton setAutoresizingMask: NSViewMaxYMargin | NSViewMinXMargin];
|
||||
[okButton setAction: @selector(ok:)];
|
||||
[okButton setTarget: self];
|
||||
[okButton setTitle: _(@"Connect")];
|
||||
[okButton setEnabled: NO];
|
||||
|
||||
revertButton = [[NSButton alloc] initWithFrame: NSMakeRect(0,0,60,20)];
|
||||
[revertButton setAutoresizingMask: NSViewMaxYMargin | NSViewMinXMargin];
|
||||
[revertButton setAction: @selector(revert:)];
|
||||
[revertButton setTarget: self];
|
||||
[revertButton setTitle: _(@"Revert")];
|
||||
[revertButton setEnabled: NO];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) ok: (id)sender
|
||||
{
|
||||
if([currentConnector destination] == nil ||
|
||||
|
|
|
@ -147,7 +147,7 @@ static NSMapTable *docMap = 0;
|
|||
{
|
||||
type = IBWindowPboardType;
|
||||
}
|
||||
if([obj isKindOfClass: [NSView class]])
|
||||
else if([obj isKindOfClass: [NSView class]])
|
||||
{
|
||||
type = IBViewPboardType;
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ static NSMapTable *docMap = 0;
|
|||
type = IBObjectPboardType;
|
||||
}
|
||||
|
||||
[document copyObject: sel
|
||||
[document copyObjects: sel
|
||||
type: type
|
||||
toPasteboard: [NSPasteboard generalPasteboard]];
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include <InterfaceBuilder/IBResourceManager.h>
|
||||
|
||||
@interface GormViewResourceManager : IBResourceManager
|
||||
@interface GormResourceManager : IBResourceManager
|
||||
@end
|
||||
|
||||
#endif
|
|
@ -24,13 +24,13 @@
|
|||
|
||||
#include <Foundation/NSArray.h>
|
||||
#include <InterfaceBuilder/IBPalette.h>
|
||||
#include "GormViewResourceManager.h"
|
||||
#include "GormResourceManager.h"
|
||||
|
||||
@implementation GormViewResourceManager
|
||||
@implementation GormResourceManager
|
||||
|
||||
- (NSArray *) resourcePasteboardTypes
|
||||
{
|
||||
return [NSArray arrayWithObjects: IBViewPboardType, nil];
|
||||
return [NSArray arrayWithObjects: IBWindowPboardType, IBViewPboardType, nil];
|
||||
}
|
||||
|
||||
@end
|
|
@ -52,6 +52,7 @@
|
|||
|
||||
NSForm *tagForm;
|
||||
NSTextField *minColumnWidthField;
|
||||
NSTextField *maxVisibleColumnsField;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -88,14 +88,16 @@
|
|||
{
|
||||
[object setTitled: [displayTitlesSwitch state]];
|
||||
}
|
||||
/* minimum column width */
|
||||
else if ( sender == minColumnWidthField )
|
||||
else if ( sender == minColumnWidthField ) /* minimum column width */
|
||||
{
|
||||
#warning TODO use stepper
|
||||
[object setMinColumnWidth:[minColumnWidthField intValue]];
|
||||
// TODO: Use stepper..
|
||||
[object setMinColumnWidth: [minColumnWidthField intValue]];
|
||||
}
|
||||
/* tag */
|
||||
else if(sender == tagForm)
|
||||
else if ( sender == maxVisibleColumnsField )
|
||||
{
|
||||
[object setMaxVisibleColumns: [maxVisibleColumnsField intValue]];
|
||||
}
|
||||
else if(sender == tagForm) /* tag */
|
||||
{
|
||||
[object setTag:[[tagForm cellAtIndex:0] intValue]];
|
||||
}
|
||||
|
@ -116,10 +118,14 @@
|
|||
[displayTitlesSwitch setState:[object isTitled]];
|
||||
[horizontalScrollerSwitch setState:[object hasHorizontalScroller]];
|
||||
|
||||
#warning chek where is the bug ? !!!
|
||||
[[tagForm cellAtIndex:0] setIntValue:[object tag]];
|
||||
[[tagForm cellAtIndex:0] setIntValue: [object tag]];
|
||||
|
||||
[minColumnWidthField setStringValue:[NSString stringWithFormat:@"%i",[object minColumnWidth]]];
|
||||
[minColumnWidthField setStringValue:
|
||||
[NSString stringWithFormat:@"%i",
|
||||
[object minColumnWidth]]];
|
||||
[maxVisibleColumnsField setStringValue:
|
||||
[NSString stringWithFormat:@"%i",
|
||||
[object maxVisibleColumns]]];
|
||||
|
||||
[super revert:sender];
|
||||
}
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
emptySelectionSwitch,
|
||||
multipleSelectionSwitch,
|
||||
horizontalScrollerSwitch,
|
||||
separateColumnsSwitch
|
||||
separateColumnsSwitch,
|
||||
maxVisibleColumnsField
|
||||
);
|
||||
Super = IBInspector;
|
||||
};
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue