mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 16:19:36 +02:00
IDE: if the search directory for find in files does not exist, give a warning and don't start the search (issue #12338)
git-svn-id: trunk@19660 -
This commit is contained in:
parent
30adabcb7b
commit
ec34f43aae
@ -50,6 +50,7 @@ type
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure HelpButtonClick(Sender: TObject);
|
||||
procedure OKButtonClick(Sender : TObject);
|
||||
procedure ReplaceCheckBoxChange(Sender: TObject);
|
||||
procedure WhereRadioGroupClick(Sender: TObject);
|
||||
private
|
||||
@ -144,6 +145,7 @@ begin
|
||||
IncludeSubDirsCheckBox.Caption := lisFindFileIncludeSubDirectories;
|
||||
|
||||
ButtonPanel1.OkButton.Caption := lisLazBuildOk;
|
||||
ButtonPanel1.OKButton.OnClick:= @OKButtonClick;
|
||||
ButtonPanel1.CancelButton.Caption := dlgCancel;
|
||||
ButtonPanel1.HelpButton.OnClick:=@HelpButtonClick;
|
||||
|
||||
@ -160,6 +162,18 @@ begin
|
||||
ShowContextHelpForIDE(Self);
|
||||
end;
|
||||
|
||||
procedure TLazFindInFilesDialog.OKButtonClick(Sender : TObject);
|
||||
begin
|
||||
if (WhereRadioGroup.ItemIndex=2) and
|
||||
(not DirectoryExistsUTF8(DirectoryComboBox.Text)) then
|
||||
begin
|
||||
MessageDlg(lisEnvOptDlgDirectoryNotFound,
|
||||
Format(dlgSeachDirectoryNotFound,[DirectoryComboBox.Text]),
|
||||
mtWarning, [mbOk],0);
|
||||
ModalResult:=mrNone;
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TLazFindInFilesDialog.ReplaceCheckBoxChange(Sender: TObject);
|
||||
begin
|
||||
UpdateReplaceCheck;
|
||||
|
@ -874,10 +874,11 @@ resourcestring
|
||||
// Search dialog
|
||||
dlgSearchCaption = 'Searching...';
|
||||
dlgSearchAbort = 'Search terminated by user.';
|
||||
dlgSeachDirectoryNotFound = 'Search directory "%s" not found.';
|
||||
lissMatches = 'Matches';
|
||||
lissSearching = 'Searching';
|
||||
lissSearchText = 'Search text';
|
||||
|
||||
|
||||
dlgDesktop = 'Desktop';
|
||||
dlgWindow = 'Window';
|
||||
dlgFrmEditor = 'Form Editor';
|
||||
|
Loading…
Reference in New Issue
Block a user