mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 18:59:06 +02:00
* Settings to skip mysql version check
This commit is contained in:
parent
8770993482
commit
41e0703552
19
components/sqldbrest/fraidesqldbrestsettings.lfm
Normal file
19
components/sqldbrest/fraidesqldbrestsettings.lfm
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
object SQLDBRestConfigFrame: TSQLDBRestConfigFrame
|
||||||
|
Left = 0
|
||||||
|
Height = 240
|
||||||
|
Top = 0
|
||||||
|
Width = 320
|
||||||
|
ClientHeight = 240
|
||||||
|
ClientWidth = 320
|
||||||
|
TabOrder = 0
|
||||||
|
DesignLeft = 876
|
||||||
|
DesignTop = 308
|
||||||
|
object cbSkipMysqlVersionCheck: TCheckBox
|
||||||
|
Left = 16
|
||||||
|
Height = 23
|
||||||
|
Top = 16
|
||||||
|
Width = 181
|
||||||
|
Caption = 'Skip MySQL version check'
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
64
components/sqldbrest/fraidesqldbrestsettings.pas
Normal file
64
components/sqldbrest/fraidesqldbrestsettings.pas
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
unit fraidesqldbrestsettings;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
interface
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes, SysUtils, Forms, Controls, StdCtrls, ColorBox, Dialogs, SpinEx,
|
||||||
|
IDEOptionsIntf, IDEOptEditorIntf;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TSQLDBRestConfigFrame }
|
||||||
|
|
||||||
|
TSQLDBRestConfigFrame = class(TAbstractIDEOptionsEditor)
|
||||||
|
cbSkipMysqlVersionCheck: TCheckBox;
|
||||||
|
private
|
||||||
|
|
||||||
|
public
|
||||||
|
function GetTitle: String; override;
|
||||||
|
procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override;
|
||||||
|
procedure ReadSettings({%H-}AOptions: TAbstractIDEOptions); override;
|
||||||
|
procedure WriteSettings({%H-}AOptions: TAbstractIDEOptions); override;
|
||||||
|
class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
implementation
|
||||||
|
|
||||||
|
uses schemaeditorconf;
|
||||||
|
|
||||||
|
{$R *.lfm}
|
||||||
|
|
||||||
|
|
||||||
|
{ TSQLDBRestConfigFrame }
|
||||||
|
|
||||||
|
function TSQLDBRestConfigFrame.GetTitle: String;
|
||||||
|
begin
|
||||||
|
Result:='SQLDBRest Editor'
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSQLDBRestConfigFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSQLDBRestConfigFrame.ReadSettings(AOptions: TAbstractIDEOptions);
|
||||||
|
begin
|
||||||
|
cbSkipMysqlVersionCheck.Checked:=SchemaSettings.DisableMySQLVersionCheck;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSQLDBRestConfigFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||||
|
begin
|
||||||
|
SchemaSettings.DisableMySQLVersionCheck:=cbSkipMysqlVersionCheck.Checked;
|
||||||
|
SchemaSettings.SaveToFile(SchemaSettings.CurrentFile);
|
||||||
|
end;
|
||||||
|
|
||||||
|
class function TSQLDBRestConfigFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
|
||||||
|
begin
|
||||||
|
Result:=IDEEditorGroups.GetByIndex(GroupEnvironment)^.GroupClass;
|
||||||
|
end;
|
||||||
|
|
||||||
|
end.
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<Package Version="4">
|
<Package Version="5">
|
||||||
<Name Value="lazsqldbrest"/>
|
<Name Value="lazsqldbrest"/>
|
||||||
<Type Value="RunAndDesignTime"/>
|
<Type Value="RunAndDesignTime"/>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
@ -9,7 +9,7 @@
|
|||||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Files Count="6">
|
<Files Count="7">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="reglazsqldbrest.pp"/>
|
<Filename Value="reglazsqldbrest.pp"/>
|
||||||
<HasRegisterProc Value="True"/>
|
<HasRegisterProc Value="True"/>
|
||||||
@ -38,7 +38,12 @@
|
|||||||
<Filename Value="dlgeditsqldbrestschema.pp"/>
|
<Filename Value="dlgeditsqldbrestschema.pp"/>
|
||||||
<UnitName Value="dlgeditsqldbrestschema"/>
|
<UnitName Value="dlgeditsqldbrestschema"/>
|
||||||
</Item6>
|
</Item6>
|
||||||
|
<Item7>
|
||||||
|
<Filename Value="fraidesqldbrestsettings.pas"/>
|
||||||
|
<UnitName Value="fraidesqldbrestsettings"/>
|
||||||
|
</Item7>
|
||||||
</Files>
|
</Files>
|
||||||
|
<CompatibilityMode Value="True"/>
|
||||||
<RequiredPkgs Count="6">
|
<RequiredPkgs Count="6">
|
||||||
<Item1>
|
<Item1>
|
||||||
<PackageName Value="sqldbrestschemadesigner"/>
|
<PackageName Value="sqldbrestschemadesigner"/>
|
||||||
|
@ -9,7 +9,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
reglazsqldbrest, frmsqldbrestdispatchini, frmsqldbrestselectconn, reslazsqldbrest, frmsqldbrestselecttables,
|
reglazsqldbrest, frmsqldbrestdispatchini, frmsqldbrestselectconn, reslazsqldbrest, frmsqldbrestselecttables,
|
||||||
dlgeditsqldbrestschema, LazarusPackageIntf;
|
dlgeditsqldbrestschema, fraidesqldbrestsettings, LazarusPackageIntf;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -117,6 +117,7 @@ implementation
|
|||||||
uses
|
uses
|
||||||
// Lazarus
|
// Lazarus
|
||||||
LResources, codecache, Controls, Forms, Dialogs, SrcEditorIntf, lazideintf, FormEditingIntf, codetoolmanager,
|
LResources, codecache, Controls, Forms, Dialogs, SrcEditorIntf, lazideintf, FormEditingIntf, codetoolmanager,
|
||||||
|
IDEOptionsIntf, IDEOptEditorIntf,
|
||||||
// FPC
|
// FPC
|
||||||
sqldbrestini,
|
sqldbrestini,
|
||||||
// This package
|
// This package
|
||||||
@ -125,10 +126,12 @@ uses
|
|||||||
frmsqldbrestselecttables,
|
frmsqldbrestselecttables,
|
||||||
dlgeditsqldbrestschema,
|
dlgeditsqldbrestschema,
|
||||||
schemaeditorconf,
|
schemaeditorconf,
|
||||||
reslazsqldbrest;
|
reslazsqldbrest,
|
||||||
|
fraidesqldbrestsettings;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
FileDescriptorRestModule: TFileRestModule;
|
FileDescriptorRestModule: TFileRestModule;
|
||||||
|
SQLDBRestOptionsFrameID : Integer = 2100;
|
||||||
|
|
||||||
Procedure Register;
|
Procedure Register;
|
||||||
|
|
||||||
@ -155,7 +158,9 @@ begin
|
|||||||
FileDescriptorRestModule:=TFileRestModule.Create;
|
FileDescriptorRestModule:=TFileRestModule.Create;
|
||||||
RegisterProjectFileDescriptor(FileDescriptorRestModule);
|
RegisterProjectFileDescriptor(FileDescriptorRestModule);
|
||||||
FormEditingHook.RegisterDesignerBaseClass(TSQLDBRestModule);
|
FormEditingHook.RegisterDesignerBaseClass(TSQLDBRestModule);
|
||||||
|
// add IDE options frame
|
||||||
|
SQLDBRestOptionsFrameID:=RegisterIDEOptionsEditor(GroupEnvironment,TSQLDBRestConfigFrame,
|
||||||
|
SQLDBRestOptionsFrameID)^.Index;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TSQLDBRestSchemaComponentEditor }
|
{ TSQLDBRestSchemaComponentEditor }
|
||||||
|
Loading…
Reference in New Issue
Block a user