|
@@ -273,6 +273,7 @@ type
|
|
procedure CancelCloseAndFreeMem;
|
|
procedure CancelCloseAndFreeMem;
|
|
procedure LoadHistory;
|
|
procedure LoadHistory;
|
|
procedure SaveHistory;
|
|
procedure SaveHistory;
|
|
|
|
+ procedure LoadPlugins;
|
|
private
|
|
private
|
|
FSelectedFiles: TStringList;
|
|
FSelectedFiles: TStringList;
|
|
FFindThread: TFindThread;
|
|
FFindThread: TFindThread;
|
|
@@ -508,6 +509,7 @@ begin
|
|
begin
|
|
begin
|
|
// Prepare window for search files
|
|
// Prepare window for search files
|
|
LoadHistory;
|
|
LoadHistory;
|
|
|
|
+ LoadPlugins;
|
|
ClearFilter;
|
|
ClearFilter;
|
|
// SetWindowCaption(wcs_NewSearch);
|
|
// SetWindowCaption(wcs_NewSearch);
|
|
cmbFindPathStart.Text := FileView.CurrentPath;
|
|
cmbFindPathStart.Text := FileView.CurrentPath;
|
|
@@ -555,6 +557,7 @@ begin
|
|
begin
|
|
begin
|
|
// Prepare window for define search template
|
|
// Prepare window for define search template
|
|
LoadHistory;
|
|
LoadHistory;
|
|
|
|
+ LoadPlugins;
|
|
Caption := rsFindDefineTemplate;
|
|
Caption := rsFindDefineTemplate;
|
|
DisableControlsForTemplate;
|
|
DisableControlsForTemplate;
|
|
btnSaveTemplate.Visible := True;
|
|
btnSaveTemplate.Visible := True;
|
|
@@ -593,6 +596,7 @@ begin
|
|
begin
|
|
begin
|
|
// Prepare window for define search template
|
|
// Prepare window for define search template
|
|
LoadHistory;
|
|
LoadHistory;
|
|
|
|
+ LoadPlugins;
|
|
Caption := rsFindDefineTemplate;
|
|
Caption := rsFindDefineTemplate;
|
|
DisableControlsForTemplate;
|
|
DisableControlsForTemplate;
|
|
btnUseTemplate.Visible := True;
|
|
btnUseTemplate.Visible := True;
|
|
@@ -640,7 +644,6 @@ begin
|
|
if not gShowMenuBarInFindFiles then FreeAndNil(mmMainMenu);
|
|
if not gShowMenuBarInFindFiles then FreeAndNil(mmMainMenu);
|
|
Height := pnlFindFile.Height + 22;
|
|
Height := pnlFindFile.Height + 22;
|
|
DsxPlugins := TDSXModuleList.Create;
|
|
DsxPlugins := TDSXModuleList.Create;
|
|
- DsxPlugins.Assign(gDSXPlugins);
|
|
|
|
FoundedStringCopy := TStringListTemp.Create;
|
|
FoundedStringCopy := TStringListTemp.Create;
|
|
FoundedStringCopy.OwnsObjects := True;
|
|
FoundedStringCopy.OwnsObjects := True;
|
|
FFreeOnClose := False;
|
|
FFreeOnClose := False;
|
|
@@ -885,7 +888,8 @@ begin
|
|
chkDuplicates.Checked:= False;
|
|
chkDuplicates.Checked:= False;
|
|
|
|
|
|
// plugins
|
|
// plugins
|
|
- cmbPlugin.Text := '';
|
|
|
|
|
|
+ cbUsePlugin.Checked:= False;
|
|
|
|
+ frmContentPlugins.chkUsePlugins.Checked:= False;
|
|
|
|
|
|
FUpdating := False;
|
|
FUpdating := False;
|
|
end;
|
|
end;
|
|
@@ -1192,7 +1196,11 @@ begin
|
|
DuplicateHash:= chkDuplicateHash.Checked;
|
|
DuplicateHash:= chkDuplicateHash.Checked;
|
|
DuplicateContent:= chkDuplicateContent.Checked;
|
|
DuplicateContent:= chkDuplicateContent.Checked;
|
|
{ Plugins }
|
|
{ Plugins }
|
|
- SearchPlugin := cmbPlugin.Text;
|
|
|
|
|
|
+ if not cbUsePlugin.Checked then
|
|
|
|
+ SearchPlugin := EmptyStr
|
|
|
|
+ else begin
|
|
|
|
+ SearchPlugin := cmbPlugin.Text;
|
|
|
|
+ end;
|
|
frmContentPlugins.Save(FindOptions);
|
|
frmContentPlugins.Save(FindOptions);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
@@ -2139,10 +2147,27 @@ begin
|
|
end;
|
|
end;
|
|
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 }
|
|
{ TfrmFindDlg.FormShow }
|
|
procedure TfrmFindDlg.frmFindDlgShow(Sender: TObject);
|
|
procedure TfrmFindDlg.frmFindDlgShow(Sender: TObject);
|
|
-var
|
|
|
|
- I: integer;
|
|
|
|
begin
|
|
begin
|
|
pgcSearch.PageIndex := 0;
|
|
pgcSearch.PageIndex := 0;
|
|
|
|
|
|
@@ -2152,11 +2177,6 @@ begin
|
|
cbPartialNameSearch.Checked := gPartialNameSearch;
|
|
cbPartialNameSearch.Checked := gPartialNameSearch;
|
|
lsFoundedFiles.Canvas.Font := lsFoundedFiles.Font;
|
|
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 pgcSearch.ActivePage = tsStandard then
|
|
if cmbFindFileMask.CanFocus then
|
|
if cmbFindFileMask.CanFocus then
|
|
cmbFindFileMask.SetFocus;
|
|
cmbFindFileMask.SetFocus;
|
|
@@ -2281,7 +2301,13 @@ begin
|
|
chkDuplicateHash.Checked := DuplicateHash;
|
|
chkDuplicateHash.Checked := DuplicateHash;
|
|
chkDuplicateContent.Checked := DuplicateContent;
|
|
chkDuplicateContent.Checked := DuplicateContent;
|
|
// plugins
|
|
// 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);
|
|
frmContentPlugins.Load(Template);
|
|
end;
|
|
end;
|
|
|
|
|