mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Building with Lazarus 0.9.31.
This commit is contained in:
parent
1a8059dbf9
commit
a04f585fa3
3 changed files with 21 additions and 30 deletions
|
|
@ -540,12 +540,10 @@ var
|
|||
implementation
|
||||
|
||||
uses
|
||||
uLng, uGlobsPaths, uPixMapManager, fMain, LCLProc,
|
||||
uLng, uGlobsPaths, uPixMapManager, fMain, LCLProc, LCLVersion,
|
||||
uColorExt, uDCUtils, uOSUtils, fColumnsSetConf, uShowMsg, uShowForm,
|
||||
fTweakPlugin, uhotkeymanger, uTypes, StrUtils, uFindEx, uKeyboard,
|
||||
fMaskInputDlg, uSearchTemplate, uMultiArc,
|
||||
// Needed for using Lazarus 0.9.30 with old TNotebook component.
|
||||
typinfo, variants;
|
||||
fMaskInputDlg, uSearchTemplate, uMultiArc;
|
||||
|
||||
const
|
||||
stgCmdCommandIndex=0;
|
||||
|
|
@ -570,9 +568,6 @@ begin
|
|||
end;
|
||||
|
||||
procedure TfrmOptions.FormCreate(Sender: TObject);
|
||||
var
|
||||
V: Variant;
|
||||
M: TMethod;
|
||||
begin
|
||||
FUpdatingTools := False;
|
||||
|
||||
|
|
@ -654,25 +649,11 @@ begin
|
|||
nbNotebook.PageIndex := 0;
|
||||
|
||||
// Below needed until after we switch to Lazarus 0.9.31.
|
||||
// 0.9.31
|
||||
nbNotebook.TabStop := True;
|
||||
// Turn off showing tabs if using the old TNotebook component.
|
||||
try
|
||||
V := False;
|
||||
if Assigned(GetPropInfo(nbNotebook, 'ShowTabs')) then
|
||||
SetPropValue(nbNotebook, 'ShowTabs', V);
|
||||
except
|
||||
on EPropertyError do;
|
||||
end;
|
||||
// Assign OnPageChanged (this property doesn't exists in new TNotebook).
|
||||
try
|
||||
M := TMethod(@nbNotebookPageChanged);
|
||||
if Assigned(GetPropInfo(nbNotebook, 'OnPageChanged')) then
|
||||
SetMethodProp(nbNotebook, 'OnPageChanged', M);
|
||||
except
|
||||
on EPropertyError do;
|
||||
end;
|
||||
// 0.9.31
|
||||
{$if (lcl_release) < 31}
|
||||
nbNotebook.ShowTabs := False;
|
||||
nbNotebook.OnPageChanged := @nbNotebookPageChanged;
|
||||
{$endif}
|
||||
|
||||
gbViewerBookMode.Enabled := not (cbToolsUseExternalProgram.Checked);
|
||||
end;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ object frmTweakPlugin: TfrmTweakPlugin
|
|||
Caption = 'Tweak plugin'
|
||||
ClientHeight = 482
|
||||
ClientWidth = 544
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
ShowInTaskBar = stNever
|
||||
LCLVersion = '0.9.31'
|
||||
|
|
@ -15,10 +16,10 @@ object frmTweakPlugin: TfrmTweakPlugin
|
|||
Height = 439
|
||||
Top = 0
|
||||
Width = 544
|
||||
Align = alClient
|
||||
PageIndex = 0
|
||||
ShowTabs = False
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
object pgTweakPacker: TPage
|
||||
ClientWidth = 540
|
||||
ClientHeight = 435
|
||||
|
|
@ -451,4 +452,4 @@ object frmTweakPlugin: TfrmTweakPlugin
|
|||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ type
|
|||
procedure btnDefaultClick(Sender: TObject);
|
||||
procedure btnRemoveClick(Sender: TObject);
|
||||
procedure cbExtChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
FWCXPlugins: TWCXModuleList;
|
||||
FPluginFileName: String;
|
||||
|
|
@ -94,7 +95,7 @@ function ShowTweakPluginDlg(PluginType: TPluginType; PluginIndex: Integer): Bool
|
|||
|
||||
implementation
|
||||
uses
|
||||
fOptions, WcxPlugin, uDCUtils, uLng;
|
||||
fOptions, WcxPlugin, uDCUtils, uLng, LCLVersion;
|
||||
|
||||
function ShowTweakPluginDlg(PluginType: TPluginType; PluginIndex: Integer): Boolean;
|
||||
var
|
||||
|
|
@ -263,6 +264,14 @@ begin
|
|||
cbPK_CAPS_ENCRYPT.Checked := (iFlags and PK_CAPS_ENCRYPT) <> 0;
|
||||
end;
|
||||
|
||||
procedure TfrmTweakPlugin.FormCreate(Sender: TObject);
|
||||
begin
|
||||
{$if (lcl_release) < 31}
|
||||
nbTweakAll.ShowTabs := False;
|
||||
nbTweakAll.TabStop := True;
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
procedure TfrmTweakPlugin.btnDefaultClick(Sender: TObject);
|
||||
begin
|
||||
cbExt.Items.Objects[cbExt.ItemIndex]:= TObject(GetDefaultFlags(edtPlugin.Text));
|
||||
|
|
@ -336,4 +345,4 @@ initialization
|
|||
{$I ftweakplugin.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue