mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-08 19:18:19 +02:00
TaskDialog: TLCLTaskDialog: remove custom translate function.
It was inherited from the now deprecated LCLTaskDialog unit and is called upon resource strings. This is not the "normal" way of translating resource strings: users should use the translation unit for that.
This commit is contained in:
parent
8fab0d8cde
commit
898c45597a
@ -157,11 +157,6 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
type
|
|
||||||
TTaskDialogTranslate = function(const aString: string): string;
|
|
||||||
var
|
|
||||||
TaskDialog_Translate: TTaskDialogTranslate;
|
|
||||||
|
|
||||||
|
|
||||||
function ExecuteLCLTaskDialog(const ADlg: TCustomTaskDialog; AParentWnd: HWND; out ARadioRes: Integer): Integer;
|
function ExecuteLCLTaskDialog(const ADlg: TCustomTaskDialog; AParentWnd: HWND; out ARadioRes: Integer): Integer;
|
||||||
|
|
||||||
@ -263,17 +258,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
//Note: do we really need this??
|
|
||||||
//We already use resourcestrings that can be translated using
|
|
||||||
//translations unit
|
|
||||||
function TD_Trans(const aString: string): string;
|
|
||||||
begin
|
|
||||||
if Assigned(TaskDialog_Translate) then
|
|
||||||
Result := TaskDialog_Translate(aString)
|
|
||||||
else
|
|
||||||
Result := aString;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function IconMessage(Icon: TLCLTaskDialogIcon): string;
|
function IconMessage(Icon: TLCLTaskDialogIcon): string;
|
||||||
begin
|
begin
|
||||||
case Icon of
|
case Icon of
|
||||||
@ -283,7 +267,6 @@ begin
|
|||||||
tiInformation, tiShield: Result := rsMtInformation;
|
tiInformation, tiShield: Result := rsMtInformation;
|
||||||
else Result := '';
|
else Result := '';
|
||||||
end;
|
end;
|
||||||
Result := TD_Trans(Result);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -659,7 +642,7 @@ var
|
|||||||
ActiveControl := Result;
|
ActiveControl := Result;
|
||||||
end;
|
end;
|
||||||
begin
|
begin
|
||||||
debugln(['TLCLTaskDialog.AddButtons: ALeft=',ALeft,', aWidth=',aWidth,', AParent=',DbgSName(AParent),', AParent.ClientWidth=',AParent.ClientWidth]);
|
//debugln(['TLCLTaskDialog.AddButtons: ALeft=',ALeft,', aWidth=',aWidth,', AParent=',DbgSName(AParent),', AParent.ClientWidth=',AParent.ClientWidth]);
|
||||||
if MidPanel.ControlCount > 0 then
|
if MidPanel.ControlCount > 0 then
|
||||||
CurrTabOrder := MidPanel.TabOrder
|
CurrTabOrder := MidPanel.TabOrder
|
||||||
else
|
else
|
||||||
@ -672,13 +655,13 @@ begin
|
|||||||
for Btn := high(TTaskDialogCommonButton) downto low(TTaskDialogCommonButton) do
|
for Btn := high(TTaskDialogCommonButton) downto low(TTaskDialogCommonButton) do
|
||||||
begin
|
begin
|
||||||
if (Btn in CommonButtons) then
|
if (Btn in CommonButtons) then
|
||||||
AddButton(TD_Trans(LoadResString(TD_BTNS(Btn))), TD_BTNMOD[Btn],-1);
|
AddButton(LoadResString(TD_BTNS(Btn)), TD_BTNMOD[Btn],-1);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLCLTaskDialog.AddCheckBox(const ALeft: Integer; var ATop, XB: Integer; AWidth: Integer; APArent: TWinControl);
|
procedure TLCLTaskDialog.AddCheckBox(const ALeft: Integer; var ATop, XB: Integer; AWidth: Integer; APArent: TWinControl);
|
||||||
begin
|
begin
|
||||||
debugln(['TLCLTaskDialog.AddCheckBox: ALeft=',ALeft]);
|
//debugln(['TLCLTaskDialog.AddCheckBox: ALeft=',ALeft]);
|
||||||
VerifyCheckBox := TCheckBox.Create(Self);
|
VerifyCheckBox := TCheckBox.Create(Self);
|
||||||
with VerifyCheckBox do
|
with VerifyCheckBox do
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user