mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: Bug [2794498]
This commit is contained in:
parent
bb9b519049
commit
22b2265db4
4 changed files with 861 additions and 880 deletions
|
|
@ -171,7 +171,7 @@ implementation
|
|||
|
||||
uses
|
||||
LCLProc, LCLType, LConvEncoding, DateUtils, fViewer, uLng, uGlobs, uShowForm, fMain,
|
||||
uTypes, uFileOp, uOSUtils, uSearchTemplate;
|
||||
uTypes, uFileOp, uOSUtils, uSearchTemplate, uDCUtils;
|
||||
|
||||
procedure SAddFileProc(PlugNr:integer; FoundFile:pchar); stdcall;
|
||||
var s:string;
|
||||
|
|
@ -602,15 +602,21 @@ procedure TfrmFindDlg.btnStartClick(Sender: TObject);
|
|||
var
|
||||
sr:TSearchAttrRecord;
|
||||
begin
|
||||
if cmbFindFileMask.Items.IndexOf(cmbFindFileMask.Text) < 0 then
|
||||
cmbFindFileMask.Items.Add(cmbFindFileMask.Text);
|
||||
|
||||
if not mbDirectoryExists(edtFindPathStart.Text) then
|
||||
begin
|
||||
ShowMessage(Format(rsFindDirNoEx,[edtFindPathStart.Text]));
|
||||
Exit;
|
||||
end;
|
||||
|
||||
|
||||
// add to find mask history
|
||||
InsertFirstItem(cmbFindFileMask.Text, cmbFindFileMask.Items);
|
||||
// add to search text history
|
||||
if cbFindInFile.Checked then
|
||||
InsertFirstItem(cmbFindText.Text, cmbFindText.Items);
|
||||
// add to replace text history
|
||||
if cbReplaceText.Checked then
|
||||
InsertFirstItem(cmbReplaceText.Text, cmbReplaceText.Items);
|
||||
|
||||
Panel1.Visible := True;
|
||||
Splitter1.Visible := True;
|
||||
Height := (Screen.Height * 4) div 5;
|
||||
|
|
|
|||
|
|
@ -130,47 +130,21 @@ type
|
|||
implementation
|
||||
|
||||
uses
|
||||
uLng;
|
||||
uLng, uDCUtils;
|
||||
|
||||
{ TfrmEditSearchReplace }
|
||||
|
||||
procedure TfrmEditSearchReplace.btnOKClick(Sender: TObject);
|
||||
var
|
||||
s: string;
|
||||
i: integer;
|
||||
begin
|
||||
s := cbSearchText.Text;
|
||||
if s <> '' then begin
|
||||
i := cbSearchText.Items.IndexOf(s);
|
||||
if i > -1 then begin
|
||||
cbSearchText.Items.Delete(i);
|
||||
cbSearchText.Items.Insert(0, s);
|
||||
cbSearchText.Text := s;
|
||||
end else
|
||||
cbSearchText.Items.Insert(0, s);
|
||||
end;
|
||||
InsertFirstItem(cbSearchText.Text, cbSearchText.Items);
|
||||
ModalResult := mrOK
|
||||
end;
|
||||
|
||||
procedure TfrmEditSearchReplace.FormCloseQuery(Sender: TObject;
|
||||
var CanClose: boolean);
|
||||
var
|
||||
s: string;
|
||||
i: integer;
|
||||
begin
|
||||
inherited;
|
||||
if ModalResult = mrOK then begin
|
||||
s := cbReplaceText.Text;
|
||||
if s <> '' then begin
|
||||
i := cbReplaceText.Items.IndexOf(s);
|
||||
if i > -1 then begin
|
||||
cbReplaceText.Items.Delete(i);
|
||||
cbReplaceText.Items.Insert(0, s);
|
||||
cbReplaceText.Text := s;
|
||||
end else
|
||||
cbReplaceText.Items.Insert(0, s);
|
||||
end;
|
||||
end;
|
||||
if ModalResult = mrOK then
|
||||
InsertFirstItem(cbReplaceText.Text, cbReplaceText.Items);
|
||||
end;
|
||||
|
||||
procedure TfrmEditSearchReplace.FormShow(Sender: TObject);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ type
|
|||
implementation
|
||||
|
||||
uses
|
||||
LCLProc;
|
||||
LCLProc, uDCUtils;
|
||||
|
||||
procedure TfrmFindView.FormShow(Sender: TObject);
|
||||
begin
|
||||
|
|
@ -55,23 +55,8 @@ begin
|
|||
end;
|
||||
|
||||
procedure TfrmFindView.btnFindClick(Sender: TObject);
|
||||
var
|
||||
s: string;
|
||||
i: integer;
|
||||
begin
|
||||
s := cbDataToFind.Text;
|
||||
if s <> '' then
|
||||
begin
|
||||
i := cbDataToFind.Items.IndexOf(s);
|
||||
if i > -1 then
|
||||
begin
|
||||
cbDataToFind.Items.Delete(i);
|
||||
cbDataToFind.Items.Insert(0, s);
|
||||
cbDataToFind.Text := s;
|
||||
end
|
||||
else
|
||||
cbDataToFind.Items.Insert(0, s);
|
||||
end;
|
||||
InsertFirstItem(cbDataToFind.Text, cbDataToFind.Items);
|
||||
ModalResult:= mrOk;
|
||||
end;
|
||||
|
||||
|
|
|
|||
1672
src/udcutils.pas
1672
src/udcutils.pas
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue