mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Find files - reset plugins search
This commit is contained in:
parent
54d19de6ec
commit
7aae009771
2 changed files with 38 additions and 11 deletions
|
|
@ -1023,6 +1023,7 @@ object frmFindDlg: TfrmFindDlg
|
|||
BorderSpacing.Top = 10
|
||||
Enabled = False
|
||||
ItemHeight = 15
|
||||
Style = csDropDownList
|
||||
TabOrder = 1
|
||||
end
|
||||
inline frmContentPlugins: TfrmSearchPlugin
|
||||
|
|
|
|||
|
|
@ -273,6 +273,7 @@ type
|
|||
procedure CancelCloseAndFreeMem;
|
||||
procedure LoadHistory;
|
||||
procedure SaveHistory;
|
||||
procedure LoadPlugins;
|
||||
private
|
||||
FSelectedFiles: TStringList;
|
||||
FFindThread: TFindThread;
|
||||
|
|
@ -508,6 +509,7 @@ begin
|
|||
begin
|
||||
// Prepare window for search files
|
||||
LoadHistory;
|
||||
LoadPlugins;
|
||||
ClearFilter;
|
||||
// SetWindowCaption(wcs_NewSearch);
|
||||
cmbFindPathStart.Text := FileView.CurrentPath;
|
||||
|
|
@ -555,6 +557,7 @@ begin
|
|||
begin
|
||||
// Prepare window for define search template
|
||||
LoadHistory;
|
||||
LoadPlugins;
|
||||
Caption := rsFindDefineTemplate;
|
||||
DisableControlsForTemplate;
|
||||
btnSaveTemplate.Visible := True;
|
||||
|
|
@ -593,6 +596,7 @@ begin
|
|||
begin
|
||||
// Prepare window for define search template
|
||||
LoadHistory;
|
||||
LoadPlugins;
|
||||
Caption := rsFindDefineTemplate;
|
||||
DisableControlsForTemplate;
|
||||
btnUseTemplate.Visible := True;
|
||||
|
|
@ -640,7 +644,6 @@ begin
|
|||
if not gShowMenuBarInFindFiles then FreeAndNil(mmMainMenu);
|
||||
Height := pnlFindFile.Height + 22;
|
||||
DsxPlugins := TDSXModuleList.Create;
|
||||
DsxPlugins.Assign(gDSXPlugins);
|
||||
FoundedStringCopy := TStringListTemp.Create;
|
||||
FoundedStringCopy.OwnsObjects := True;
|
||||
FFreeOnClose := False;
|
||||
|
|
@ -885,7 +888,8 @@ begin
|
|||
chkDuplicates.Checked:= False;
|
||||
|
||||
// plugins
|
||||
cmbPlugin.Text := '';
|
||||
cbUsePlugin.Checked:= False;
|
||||
frmContentPlugins.chkUsePlugins.Checked:= False;
|
||||
|
||||
FUpdating := False;
|
||||
end;
|
||||
|
|
@ -1192,7 +1196,11 @@ begin
|
|||
DuplicateHash:= chkDuplicateHash.Checked;
|
||||
DuplicateContent:= chkDuplicateContent.Checked;
|
||||
{ Plugins }
|
||||
SearchPlugin := cmbPlugin.Text;
|
||||
if not cbUsePlugin.Checked then
|
||||
SearchPlugin := EmptyStr
|
||||
else begin
|
||||
SearchPlugin := cmbPlugin.Text;
|
||||
end;
|
||||
frmContentPlugins.Save(FindOptions);
|
||||
end;
|
||||
end;
|
||||
|
|
@ -2139,10 +2147,27 @@ begin
|
|||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmFindDlg.LoadPlugins;
|
||||
var
|
||||
I: Integer;
|
||||
AModule: TDsxModule;
|
||||
begin
|
||||
cmbPlugin.Clear;
|
||||
DSXPlugins.Assign(gDSXPlugins);
|
||||
for I := 0 to DSXPlugins.Count - 1 do
|
||||
begin
|
||||
AModule:= DSXPlugins.GetDSXModule(I);
|
||||
if Length(AModule.Descr) = 0 then
|
||||
cmbPlugin.Items.Add(AModule.Name)
|
||||
else
|
||||
cmbPlugin.Items.Add(AModule.Name + ' (' + AModule.Descr + ' )');
|
||||
end;
|
||||
cbUsePlugin.Enabled := (cmbPlugin.Items.Count > 0);
|
||||
if (cbUsePlugin.Enabled) then cmbPlugin.ItemIndex := 0;
|
||||
end;
|
||||
|
||||
{ TfrmFindDlg.FormShow }
|
||||
procedure TfrmFindDlg.frmFindDlgShow(Sender: TObject);
|
||||
var
|
||||
I: integer;
|
||||
begin
|
||||
pgcSearch.PageIndex := 0;
|
||||
|
||||
|
|
@ -2152,11 +2177,6 @@ begin
|
|||
cbPartialNameSearch.Checked := gPartialNameSearch;
|
||||
lsFoundedFiles.Canvas.Font := lsFoundedFiles.Font;
|
||||
|
||||
cmbPlugin.Clear;
|
||||
for I := 0 to DSXPlugins.Count - 1 do
|
||||
cmbPlugin.AddItem(DSXPlugins.GetDSXModule(i).Name + ' (' + DSXPlugins.GetDSXModule(I).Descr + ' )', nil);
|
||||
if (cmbPlugin.Items.Count > 0) then cmbPlugin.ItemIndex := 0;
|
||||
|
||||
if pgcSearch.ActivePage = tsStandard then
|
||||
if cmbFindFileMask.CanFocus then
|
||||
cmbFindFileMask.SetFocus;
|
||||
|
|
@ -2281,7 +2301,13 @@ begin
|
|||
chkDuplicateHash.Checked := DuplicateHash;
|
||||
chkDuplicateContent.Checked := DuplicateContent;
|
||||
// plugins
|
||||
cmbPlugin.Text := SearchPlugin;
|
||||
if cbUsePlugin.Enabled then
|
||||
begin
|
||||
cmbPlugin.Tag := cmbPlugin.Items.IndexOf(SearchPlugin);
|
||||
cbUsePlugin.Checked:= (cmbPlugin.Tag >= 0);
|
||||
if cbUsePlugin.Checked then
|
||||
cmbPlugin.ItemIndex := cmbPlugin.Tag;
|
||||
end;
|
||||
frmContentPlugins.Load(Template);
|
||||
end;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue