mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-22 12:55:44 +00:00
Updated the DBModeler application so the SQLGenerator window uses the
Renaissance library. Replaced the gorm file with a gsmarkup file, and modified the app code to use it. * DBModeler/SQLGenerator.m (init): Updated to load the gsmarkup file, rather than the nib. (awakeFromGSMarkup): Replaces the previous awakeFromNib. * DBModeler/Resources/SQLGenerator.gsmarkup Initial import. * DBModeler/Resources/SQLGenerator.gorm Removed from repository. * DBModeler/GNUmakefile Replaced the SQLGenerator.gorm resource with SQLGenerator.gsmarkup. Removed a dangling reference to ConsistencyResults.gorm. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@26522 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e7a5cf8d3b
commit
8ef90d0a08
7 changed files with 110 additions and 39 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-05-13 Blake Nicholson <blaken@umich.edu>
|
||||
|
||||
* DBModeler/SQLGenerator.m: Updated to use new gsmarkup file.
|
||||
* DBModeler/Resources/SQLGenerator.gsmarkup: Initial import.
|
||||
* DBModeler/Resources/SQLGenerator.gorm: Removed.
|
||||
* DBModeler/GNUmakefile: Replaced the SQLGenerator.gorm resource with
|
||||
SQLGenerator.gsmarkup. Removed reference to ConsistencyResults.gorm.
|
||||
|
||||
2008-05-13 Matt Rice <ratmice@gmail.com>
|
||||
|
||||
* DBModeler/Resources/Menu-{Cocoa,GNUstep}.gsmarkup: Remove a TODO
|
||||
|
|
|
@ -43,7 +43,7 @@ ADDITIONAL_NATIVE_LIBS += EOAccess EOControl EOInterface EOModeler Renaissance
|
|||
|
||||
$(APP_NAME)_RESOURCE_FILES = \
|
||||
Resources/ModelDrag.tiff \
|
||||
Resources/SQLGenerator.gorm \
|
||||
Resources/SQLGenerator.gsmarkup \
|
||||
Resources/Info-gnustep.plist \
|
||||
Resources/Key_Diagram.tiff \
|
||||
Resources/Key_Header.tiff \
|
||||
|
@ -55,7 +55,6 @@ $(APP_NAME)_RESOURCE_FILES = \
|
|||
Resources/ClassProperty_Header.tiff \
|
||||
Resources/ClassProperty_On.tiff \
|
||||
Resources/Preferences.gorm \
|
||||
Resources/ConsistencyResults.gorm \
|
||||
Resources/DBModeler.tiff \
|
||||
Resources/DBModeler.icns \
|
||||
Resources/AllowsNull_On.tiff \
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
"## Comment" = "Do NOT change this file, Gorm maintains it";
|
||||
FirstResponder = {
|
||||
Actions = (
|
||||
"executeSQL:",
|
||||
"switchChanged:",
|
||||
"openSesame:",
|
||||
"saveAs:",
|
||||
"showTables:"
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
SQLGenerator = {
|
||||
Actions = (
|
||||
"openSesame:",
|
||||
"executeSQL:",
|
||||
"switchChanged:",
|
||||
"saveAs:",
|
||||
"showTables:"
|
||||
);
|
||||
Outlets = (
|
||||
dropDatabaseSwitch,
|
||||
createDatabaseSwitch,
|
||||
dropTablesSwitch,
|
||||
createTablesSwitch,
|
||||
dropPKSwitch,
|
||||
createPKSwitch,
|
||||
createPKConstraintsSwitch,
|
||||
createFKConstraintsSwitch,
|
||||
_sqlOutput,
|
||||
_window
|
||||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
}
|
Binary file not shown.
Binary file not shown.
97
DBModeler/Resources/SQLGenerator.gsmarkup
Normal file
97
DBModeler/Resources/SQLGenerator.gsmarkup
Normal file
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE gsmarkup>
|
||||
<gsmarkup>
|
||||
<objects>
|
||||
|
||||
<window title="SQL Generation" id="sqlgenWindow" resizable="no">
|
||||
<vbox leftPadding="10" padding="10">
|
||||
<box title="SQL Generation Options" topPadding="10"
|
||||
leftPadding="15" rightPadding="15" width="425">
|
||||
<hbox halign="wexpand">
|
||||
<vbox halign="left" valign="wexpand">
|
||||
<button id="dropDatabase" title="Drop Database"
|
||||
type="switch" halign="left" valign="top"
|
||||
action="switchChanged:" target="#NSOwner"
|
||||
padding="1.5" />
|
||||
<button id="dropTables" title="Drop Tables"
|
||||
type="switch" halign="left" valign="top"
|
||||
action="switchChanged:" target="#NSOwner"
|
||||
padding="1.5" />
|
||||
<vspace />
|
||||
<button id="dropPKSupport"
|
||||
title="Drop Primary Key Support" type="switch"
|
||||
halign="left" valign="bottom"
|
||||
action="switchChanged:" target="#NSOwner"
|
||||
padding="1.5" />
|
||||
</vbox>
|
||||
<hspace />
|
||||
<vbox halign="right" valign="top">
|
||||
<button id="createDB" title="Create Database"
|
||||
type="switch" halign="left" valign="top"
|
||||
action="switchChanged:" target="#NSOwner"
|
||||
padding="1.5" />
|
||||
<button id="createTables" title="Create Tables"
|
||||
type="switch" halign="left" valign="top"
|
||||
action="switchChanged:" target="#NSOwner"
|
||||
padding="1.5" />
|
||||
<button id="createPKConstraints"
|
||||
title="Primary Key Constraints" type="switch"
|
||||
halign="left" valign="top"
|
||||
action="switchChanged:" target="#NSOwner"
|
||||
padding="1.5" />
|
||||
<button id="createFKConstraints"
|
||||
title="Foreign Key Constraints" type="switch"
|
||||
halign="left" valign="top"
|
||||
action="switchChanged:" target="#NSOwner"
|
||||
padding="1.5" />
|
||||
<button id="createPKSupport"
|
||||
title="Create Primary Key Support"
|
||||
type="switch" halign="left" valign="top"
|
||||
action="switchChanged:" target="#NSOwner"
|
||||
padding="1.5" />
|
||||
</vbox>
|
||||
</hbox>
|
||||
</box>
|
||||
<scrollView width="425" height="300"
|
||||
borderType="bezel" leftPadding="15" rightPadding="15"
|
||||
hasHorizontalScroller="no">
|
||||
<textView id="sqlOutput"/>
|
||||
</scrollView>
|
||||
<hbox halign="left" padding="8">
|
||||
<button id="executeSQL" title="Execute SQL"
|
||||
type="momentaryPushIn" halign="left" valign="center"
|
||||
action="executeSQL:" target="#NSOwner" width="115"
|
||||
leftPadding="5" />
|
||||
<button id="saveAs" title="Save As..."
|
||||
type="momentaryPushIn" halign="left" valign="center"
|
||||
action="saveAs:" target="#NSOwner" width="100" />
|
||||
<button id="tables" title="Tables..."
|
||||
type="momentaryPushIn" halign="left" valign="center"
|
||||
action="showTables:" target="#NSOwner" width="100" />
|
||||
</hbox>
|
||||
</vbox>
|
||||
</window>
|
||||
|
||||
</objects>
|
||||
|
||||
<connectors>
|
||||
<outlet source="#NSOwner" target="#sqlgenWindow" key="window"/>
|
||||
<outlet source="#NSOwner" target="#dropDatabase"
|
||||
key="dropDatabaseSwitch" />
|
||||
<outlet source="#NSOwner" target="#createDB"
|
||||
key="createDatabaseSwitch"/>
|
||||
<outlet source="#NSOwner" target="#dropTables"
|
||||
key="dropTablesSwitch"/>
|
||||
<outlet source="#NSOwner" target="#createTables"
|
||||
key="createTablesSwitch"/>
|
||||
<outlet source="#NSOwner" target="#dropPKSupport"
|
||||
key="dropPKSwitch"/>
|
||||
<outlet source="#NSOwner" target="#createPKSupport"
|
||||
key="createPKSwitch"/>
|
||||
<outlet source="#NSOwner" target="#createPKConstraints"
|
||||
key="createPKConstraintsSwitch" />
|
||||
<outlet source="#NSOwner" target="#createFKConstraints"
|
||||
key="createFKConstraintsSwitch" />
|
||||
<outlet source="#NSOwner" target="#sqlOutput" key="sqlOutput"/>
|
||||
</connectors>
|
||||
</gsmarkup>
|
|
@ -44,6 +44,8 @@
|
|||
#include <AppKit/NSWindow.h>
|
||||
#endif
|
||||
|
||||
#include <Renaissance/Renaissance.h>
|
||||
|
||||
#include <EOAccess/EOAdaptor.h>
|
||||
#include <EOAccess/EOAdaptorChannel.h>
|
||||
#include <EOAccess/EOAdaptorContext.h>
|
||||
|
@ -85,11 +87,11 @@ static NSString *_otherScript;
|
|||
adminSwitchButtons = [[NSMutableArray alloc] initWithCapacity:3];
|
||||
otherSwitchButtons = [[NSMutableArray alloc] initWithCapacity:7];
|
||||
opts = [[NSMutableDictionary alloc] initWithCapacity:8];
|
||||
loadedNib = [NSBundle loadNibNamed:@"SQLGenerator" owner:self];
|
||||
loadedNib = [NSBundle loadGSMarkupNamed: @"SQLGenerator" owner: self];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) awakeFromNib
|
||||
- (void) awakeFromGSMarkup
|
||||
{
|
||||
[[dropDatabaseSwitch cell] setRepresentedObject: EODropDatabaseKey];
|
||||
[[createDatabaseSwitch cell] setRepresentedObject: EOCreateDatabaseKey];
|
||||
|
|
Loading…
Reference in a new issue