mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-23 13:10:48 +00:00
* DBModeler/AdaptorsPanel.m: Add responder chain, key equivalents,
autosize controls, and don't release the window when closed. * DBModeler/Resources/ConsistencyResults.gorm: Add responder chain. * DBModeler/Resources/Preferences.gorm: Add responder chain. * DBModeler/Resources/SQLGenerator.gorm: Add responder chain. * DBModeler/Preferences.m (-switchButtonChanged:): Handle -1 as no row selected. * DBModeler/EntityView.m: Call supers dealloc not release. * DBModeler/EntityView.h: Fix method declaration. * DBModeler/DiagramView.h: Ditto. * EOAdaptors/PostgreSQLAdaptor/LoginPanel/PostgreSQLLoginPanel.m: Fix typo. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@24334 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3b83de7433
commit
c456eed00f
13 changed files with 61 additions and 8 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,4 +1,19 @@
|
|||
2006-01-08 Matt Rice <ratmice@gmail.com>
|
||||
2007-01-10 Matt Rice <ratmice@gmail.com>
|
||||
|
||||
* DBModeler/AdaptorsPanel.m: Add responder chain, key equivalents,
|
||||
autosize controls, and don't release the window when closed.
|
||||
* DBModeler/Resources/ConsistencyResults.gorm: Add responder chain.
|
||||
* DBModeler/Resources/Preferences.gorm: Add responder chain.
|
||||
* DBModeler/Resources/SQLGenerator.gorm: Add responder chain.
|
||||
* DBModeler/Preferences.m (-switchButtonChanged:): Handle -1 as
|
||||
no row selected.
|
||||
* DBModeler/EntityView.m: Call supers dealloc not release.
|
||||
* DBModeler/EntityView.h: Fix method declaration.
|
||||
* DBModeler/DiagramView.h: Ditto.
|
||||
* EOAdaptors/PostgreSQLAdaptor/LoginPanel/PostgreSQLLoginPanel.m: Fix
|
||||
typo.
|
||||
|
||||
2007-01-08 Matt Rice <ratmice@gmail.com>
|
||||
|
||||
* Documentation/GDL2Intro.texi: Add a chapter on EOInterface.
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ static NSArray *_adaptorNames;
|
|||
{
|
||||
if ((self = [super init]))
|
||||
{
|
||||
NSRect fr1, fr2;
|
||||
_adaptorNames = RETAIN([EOAdaptor availableAdaptorNames]);
|
||||
/* redo all these numbers so buttons and labels are on the right? */
|
||||
_window = [[NSWindow alloc]
|
||||
|
@ -54,6 +55,7 @@ static NSArray *_adaptorNames;
|
|||
backing: NSBackingStoreBuffered
|
||||
defer: YES];
|
||||
[_window setTitle: @"Select adaptor"];
|
||||
[_window setReleasedWhenClosed:NO];
|
||||
|
||||
brws_adaptors = [[NSBrowser alloc] initWithFrame: NSMakeRect(5,30,190,240)];
|
||||
[brws_adaptors setDelegate: self];
|
||||
|
@ -76,11 +78,43 @@ static NSArray *_adaptorNames;
|
|||
[[_window contentView] addSubview: brws_adaptors];
|
||||
[[_window contentView] addSubview: btn_ok];
|
||||
[[_window contentView] addSubview: btn_cancel];
|
||||
|
||||
[_window setInitialFirstResponder:brws_adaptors];
|
||||
[brws_adaptors setNextResponder:btn_ok];
|
||||
[btn_ok setNextResponder:btn_cancel];
|
||||
// hmm.. this seems to cause an infinate loop in the responder chain somehow
|
||||
// when in the modal loop.
|
||||
// [btn_cancel setNextResponder:brws_adaptors];
|
||||
|
||||
[btn_ok setKeyEquivalent:@"\r"];
|
||||
[btn_ok setImage:[NSImage imageNamed:@"common_ret"]];
|
||||
[btn_ok setAlternateImage:[NSImage imageNamed:@"common_retH"]];
|
||||
[btn_ok setImagePosition:NSImageRight];
|
||||
[btn_ok sizeToFit];
|
||||
|
||||
fr1 = [btn_ok frame];
|
||||
fr2 = [btn_cancel frame];
|
||||
|
||||
fr1.size.width = fr2.size.width = fr1.size.width > fr2.size.width
|
||||
? fr1.size.width
|
||||
: fr2.size.width;
|
||||
fr1.size.height = fr2.size.height = fr1.size.height > fr2.size.height
|
||||
? fr1.size.height
|
||||
: fr2.size.height;
|
||||
fr2.origin.x = NSMaxX(fr1) + 8;
|
||||
|
||||
[btn_ok setFrame:fr1];
|
||||
[btn_cancel setFrame:fr2];
|
||||
|
||||
fr2 = [brws_adaptors frame];
|
||||
fr2.origin.y = NSMaxY(fr1) + 8;
|
||||
[brws_adaptors setFrame:fr2];
|
||||
|
||||
RELEASE(_label);
|
||||
RELEASE(brws_adaptors);
|
||||
RELEASE(btn_ok);
|
||||
RELEASE(btn_cancel);
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
@ -92,12 +126,13 @@ static NSArray *_adaptorNames;
|
|||
if ([NSApp runModalForWindow:_window] == NSRunAbortedResponse)
|
||||
{
|
||||
selection = nil;
|
||||
[_window orderOut:self];
|
||||
}
|
||||
else
|
||||
{
|
||||
selection = [[brws_adaptors selectedCell] stringValue];
|
||||
[_window orderOut:self];
|
||||
}
|
||||
[_window orderOut:self];
|
||||
return selection;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
- (void) setModel:(EOModel *)model;
|
||||
- (void) showEntity:(NSString *)name;
|
||||
- (void) setupRelationships;
|
||||
- (void) orderViewFront:(id)sender;
|
||||
- (void) orderViewFront:(NSView *)view;
|
||||
@end
|
||||
|
||||
#define __DIAGRAM_VIEW_H
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
- (void) setTitle:(NSString *)name;
|
||||
- (AttributeCell *)cellAtRow:(int)row;
|
||||
- (NSRect) attributeRectAtRow:(int)row;
|
||||
- (void) orderViewFront:(id)sender;
|
||||
- (void) orderViewFront:(NSView *)view;
|
||||
@end
|
||||
|
||||
#define _ENTITY_VIEW_H
|
||||
|
|
|
@ -109,7 +109,7 @@
|
|||
- (void) dealloc
|
||||
{
|
||||
RELEASE(_title);
|
||||
[super release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) initWithFrame:(NSRect)frameRect
|
||||
|
|
|
@ -116,8 +116,11 @@ static NSString *_switches[][2] =
|
|||
|
||||
- (void) switchButtonChanged:(id)sender
|
||||
{
|
||||
[ud setBool:([[sender selectedCell] state] == NSOffState)
|
||||
forKey:_switches[[sender selectedRow]][0]];
|
||||
int selRow;
|
||||
|
||||
if ((selRow = [sender selectedRow]) != -1)
|
||||
[ud setBool:([[sender selectedCell] state] == NSOffState)
|
||||
forKey:_switches[selRow][0]];
|
||||
}
|
||||
|
||||
- (void) checkOnSaveChanged:(id)sender
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -226,7 +226,7 @@ vfmaxf (int n, float aFloat, ...)
|
|||
[okButton setAction:@selector(ok:)];
|
||||
[okButton setImagePosition:NSImageRight];
|
||||
[okButton setImage:[NSImage imageNamed:@"common_ret"]];
|
||||
[okButton setAlternateImage:[NSImage imageNamed:@"common_rectH"]];
|
||||
[okButton setAlternateImage:[NSImage imageNamed:@"common_retH"]];
|
||||
[okButton setKeyEquivalent:@"\r"];
|
||||
[okButton sizeToFit];
|
||||
|
||||
|
|
Loading…
Reference in a new issue