mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 23:40:26 +02:00
LCL: messagedlg, questiondlg, showmessage: convert line endings within LCLBase, not in the widgetsets
git-svn-id: trunk@45577 -
This commit is contained in:
parent
7474d0f59c
commit
aad031fb47
@ -129,8 +129,8 @@ var
|
||||
begin
|
||||
Btns := GetPromptUserButtons(Buttons, CancelValue, DefaultIndex, ButtonCount,
|
||||
False, mbYes);
|
||||
Result := DialogResults[PromptUser(aMsg, DialogIds[DlgType], Btns, ButtonCount,
|
||||
DefaultIndex, CancelValue)];
|
||||
Result := DialogResults[PromptUser(ConvertLineEndings(aMsg),
|
||||
DialogIds[DlgType], Btns, ButtonCount, DefaultIndex, CancelValue)];
|
||||
ReallocMem(Btns, 0);
|
||||
end;
|
||||
|
||||
@ -144,8 +144,8 @@ var
|
||||
begin
|
||||
Btns := GetPromptUserButtons(Buttons, CancelValue, DefaultIndex, ButtonCount,
|
||||
False, mbYes);
|
||||
Result := DialogResults[PromptUser(aCaption, aMsg, DialogIds[DlgType], Btns,
|
||||
ButtonCount, DefaultIndex, CancelValue)];
|
||||
Result := DialogResults[PromptUser(aCaption, ConvertLineEndings(aMsg),
|
||||
DialogIds[DlgType], Btns, ButtonCount, DefaultIndex, CancelValue)];
|
||||
ReallocMem(Btns, 0);
|
||||
end;
|
||||
|
||||
@ -159,8 +159,8 @@ var
|
||||
begin
|
||||
Btns := GetPromptUserButtons(Buttons, CancelValue, DefaultIndex, ButtonCount,
|
||||
True, DefaultButton);
|
||||
Result := DialogResults[PromptUser(aCaption, aMsg, DialogIds[DlgType], Btns,
|
||||
ButtonCount, DefaultIndex, CancelValue)];
|
||||
Result := DialogResults[PromptUser(aCaption, ConvertLineEndings(aMsg),
|
||||
DialogIds[DlgType], Btns, ButtonCount, DefaultIndex, CancelValue)];
|
||||
ReallocMem(Btns, 0);
|
||||
end;
|
||||
|
||||
@ -181,8 +181,8 @@ var
|
||||
begin
|
||||
Btns := GetPromptUserButtons(Buttons, CancelValue, DefaultIndex, ButtonCount,
|
||||
False, mbYes);
|
||||
Result := DialogResults[PromptUserAtXY(aMsg, DialogIds[DlgType], Btns,
|
||||
ButtonCount, DefaultIndex, CancelValue, X, Y)];
|
||||
Result := DialogResults[PromptUserAtXY(ConvertLineEndings(aMsg),
|
||||
DialogIds[DlgType], Btns, ButtonCount, DefaultIndex, CancelValue, X, Y)];
|
||||
ReallocMem(Btns, 0);
|
||||
end;
|
||||
|
||||
@ -197,17 +197,17 @@ end;
|
||||
|
||||
procedure ShowMessage(const aMsg: string);
|
||||
begin
|
||||
NotifyUser(aMsg, idDialogBase);
|
||||
NotifyUser(ConvertLineEndings(aMsg), idDialogBase);
|
||||
end;
|
||||
|
||||
procedure ShowMessageFmt(const aMsg: string; Params: array of const);
|
||||
begin
|
||||
NotifyUser(Format(aMsg, Params), idDialogBase);
|
||||
NotifyUser(ConvertLineEndings(Format(aMsg, Params)), idDialogBase);
|
||||
end;
|
||||
|
||||
procedure ShowMessagePos(const aMsg: string; X, Y: Integer);
|
||||
begin
|
||||
NotifyUserAtXY(aMsg, idDialogBase, X, Y);
|
||||
NotifyUserAtXY(ConvertLineEndings(aMsg), idDialogBase, X, Y);
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
@ -278,7 +278,8 @@ end;
|
||||
function InputQuery(const ACaption, APrompt : String; MaskInput : Boolean;
|
||||
var Value : String) : Boolean;
|
||||
begin
|
||||
Result := LCLIntf.RequestInput(ACaption, APrompt, MaskInput, Value);
|
||||
Result := LCLIntf.RequestInput(ACaption, ConvertLineEndings(APrompt),
|
||||
MaskInput, Value);
|
||||
end;
|
||||
|
||||
function InputQuery(const ACaption, APrompt : String; var Value : String) : Boolean;
|
||||
|
@ -924,7 +924,8 @@ begin
|
||||
if DialogButtons.DefaultButton = nil then
|
||||
DialogButtons.DefaultButton := DialogButtons.FindButton([mrYes, mrOk, mrYesToAll, mrAll, mrRetry, mrCancel, mrNo, mrNoToAll, mrAbort, mrIgnore]);
|
||||
DialogButtons.CancelButton := DialogButtons.FindButton([mrCancel, mrAbort, mrNo, mrIgnore, mrNoToAll, mrYes, mrOk, mrRetry, mrAll, mrYesToAll]);
|
||||
Result := WidgetSet.AskUser(aCaption, aMsg, DialogIds[DlgType], DialogButtons, HelpCtx);
|
||||
Result := WidgetSet.AskUser(aCaption, ConvertLineEndings(aMsg),
|
||||
DialogIds[DlgType], DialogButtons, HelpCtx);
|
||||
finally
|
||||
DialogButtons.Free;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user