mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 10:12:50 +02:00
MG: fixed keygrabbing key translation
git-svn-id: trunk@1849 -
This commit is contained in:
parent
ce83336615
commit
0280402696
@ -81,6 +81,8 @@ type
|
|||||||
OkButton: TButton;
|
OkButton: TButton;
|
||||||
CancelButton: TButton;
|
CancelButton: TButton;
|
||||||
procedure BuildAllButtonClick(Sender: TObject);
|
procedure BuildAllButtonClick(Sender: TObject);
|
||||||
|
procedure ConfigureBuildLazarusDlgKeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
procedure ConfigureBuildLazarusDlgResize(Sender: TObject);
|
procedure ConfigureBuildLazarusDlgResize(Sender: TObject);
|
||||||
procedure OkButtonClick(Sender: TObject);
|
procedure OkButtonClick(Sender: TObject);
|
||||||
procedure CancelButtonClick(Sender: TObject);
|
procedure CancelButtonClick(Sender: TObject);
|
||||||
@ -102,6 +104,9 @@ function BuildLazarus(Options: TBuildLazarusOptions;
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
|
||||||
|
uses
|
||||||
|
LCLType;
|
||||||
|
|
||||||
const
|
const
|
||||||
MakeModeNames: array[TMakeMode] of string = (
|
MakeModeNames: array[TMakeMode] of string = (
|
||||||
'None', 'Build', 'Clean & Build'
|
'None', 'Build', 'Clean & Build'
|
||||||
@ -240,6 +245,7 @@ begin
|
|||||||
Position:=poScreenCenter;
|
Position:=poScreenCenter;
|
||||||
Caption:='Configure "Build Lazarus"';
|
Caption:='Configure "Build Lazarus"';
|
||||||
OnResize:=@ConfigureBuildLazarusDlgResize;
|
OnResize:=@ConfigureBuildLazarusDlgResize;
|
||||||
|
OnKeyDown:=@ConfigureBuildLazarusDlgKeyDown;
|
||||||
|
|
||||||
CleanAllCheckBox:=TCheckBox.Create(Self);
|
CleanAllCheckBox:=TCheckBox.Create(Self);
|
||||||
with CleanAllCheckBox do begin
|
with CleanAllCheckBox do begin
|
||||||
@ -400,6 +406,13 @@ begin
|
|||||||
OptionsEdit.Text:='';
|
OptionsEdit.Text:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TConfigureBuildLazarusDlg.ConfigureBuildLazarusDlgKeyDown(
|
||||||
|
Sender: TObject; var Key: Word; Shift: TShiftState);
|
||||||
|
begin
|
||||||
|
if Key=VK_Escape then
|
||||||
|
ModalResult:=mrCancel;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TConfigureBuildLazarusDlg.ConfigureBuildLazarusDlgResize(
|
procedure TConfigureBuildLazarusDlg.ConfigureBuildLazarusDlgResize(
|
||||||
Sender: TObject);
|
Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
@ -283,11 +283,15 @@ begin
|
|||||||
Result:=StrToIntDef(copy(s,7,length(s)-8),VK_UNKNOWN)
|
Result:=StrToIntDef(copy(s,7,length(s)-8),VK_UNKNOWN)
|
||||||
else if s<>'none' then begin
|
else if s<>'none' then begin
|
||||||
for i:=1 to 300 do
|
for i:=1 to 300 do
|
||||||
if KeyAndShiftStateToStr(i,[])=s then
|
if KeyAndShiftStateToStr(i,[])=s then begin
|
||||||
Result:=i;
|
Result:=i;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
for i:=VK_IRREGULAR+33 to VK_IRREGULAR+255 do
|
for i:=VK_IRREGULAR+33 to VK_IRREGULAR+255 do
|
||||||
if KeyAndShiftStateToStr(i,[])=s then
|
if KeyAndShiftStateToStr(i,[])=s then begin
|
||||||
Result:=i;
|
Result:=i;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -1603,6 +1603,9 @@ begin
|
|||||||
|
|
||||||
ecBuildLazarus:
|
ecBuildLazarus:
|
||||||
DoBuildLazarus;
|
DoBuildLazarus;
|
||||||
|
|
||||||
|
ecConfigBuildLazarus:
|
||||||
|
mnuToolConfigBuildLazClicked(Self);
|
||||||
|
|
||||||
else
|
else
|
||||||
Handled:=false;
|
Handled:=false;
|
||||||
@ -6591,6 +6594,9 @@ end.
|
|||||||
|
|
||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.343 2002/08/17 11:38:01 lazarus
|
||||||
|
MG: fixed keygrabbing key translation
|
||||||
|
|
||||||
Revision 1.342 2002/08/16 20:13:07 lazarus
|
Revision 1.342 2002/08/16 20:13:07 lazarus
|
||||||
MG: custom external tools are now shown in the menu
|
MG: custom external tools are now shown in the menu
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user