mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 11:18:10 +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"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<Package Version="5">
|
||||
<Name Value="lazsqldbrest"/>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<CompilerOptions>
|
||||
@ -9,7 +9,7 @@
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
</CompilerOptions>
|
||||
<Files Count="6">
|
||||
<Files Count="7">
|
||||
<Item1>
|
||||
<Filename Value="reglazsqldbrest.pp"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
@ -38,7 +38,12 @@
|
||||
<Filename Value="dlgeditsqldbrestschema.pp"/>
|
||||
<UnitName Value="dlgeditsqldbrestschema"/>
|
||||
</Item6>
|
||||
<Item7>
|
||||
<Filename Value="fraidesqldbrestsettings.pas"/>
|
||||
<UnitName Value="fraidesqldbrestsettings"/>
|
||||
</Item7>
|
||||
</Files>
|
||||
<CompatibilityMode Value="True"/>
|
||||
<RequiredPkgs Count="6">
|
||||
<Item1>
|
||||
<PackageName Value="sqldbrestschemadesigner"/>
|
||||
|
@ -9,7 +9,7 @@ interface
|
||||
|
||||
uses
|
||||
reglazsqldbrest, frmsqldbrestdispatchini, frmsqldbrestselectconn, reslazsqldbrest, frmsqldbrestselecttables,
|
||||
dlgeditsqldbrestschema, LazarusPackageIntf;
|
||||
dlgeditsqldbrestschema, fraidesqldbrestsettings, LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -117,6 +117,7 @@ implementation
|
||||
uses
|
||||
// Lazarus
|
||||
LResources, codecache, Controls, Forms, Dialogs, SrcEditorIntf, lazideintf, FormEditingIntf, codetoolmanager,
|
||||
IDEOptionsIntf, IDEOptEditorIntf,
|
||||
// FPC
|
||||
sqldbrestini,
|
||||
// This package
|
||||
@ -125,10 +126,12 @@ uses
|
||||
frmsqldbrestselecttables,
|
||||
dlgeditsqldbrestschema,
|
||||
schemaeditorconf,
|
||||
reslazsqldbrest;
|
||||
reslazsqldbrest,
|
||||
fraidesqldbrestsettings;
|
||||
|
||||
Var
|
||||
FileDescriptorRestModule: TFileRestModule;
|
||||
SQLDBRestOptionsFrameID : Integer = 2100;
|
||||
|
||||
Procedure Register;
|
||||
|
||||
@ -155,7 +158,9 @@ begin
|
||||
FileDescriptorRestModule:=TFileRestModule.Create;
|
||||
RegisterProjectFileDescriptor(FileDescriptorRestModule);
|
||||
FormEditingHook.RegisterDesignerBaseClass(TSQLDBRestModule);
|
||||
|
||||
// add IDE options frame
|
||||
SQLDBRestOptionsFrameID:=RegisterIDEOptionsEditor(GroupEnvironment,TSQLDBRestConfigFrame,
|
||||
SQLDBRestOptionsFrameID)^.Index;
|
||||
end;
|
||||
|
||||
{ TSQLDBRestSchemaComponentEditor }
|
||||
|
Loading…
Reference in New Issue
Block a user