| 40 |
|
Label3: TLabel; |
| 41 |
|
combo_connection: TComboBox; |
| 42 |
|
Bevel1: TBevel; |
| 43 |
+ |
popup_linkshere: TMenuItem; |
| 44 |
+ |
popup_separator2: TMenuItem; |
| 45 |
|
procedure RecreateExtList; |
| 46 |
|
procedure UpdateConList; |
| 47 |
|
procedure LoadFileNames; |
| 63 |
|
procedure btn_sortClick(Sender: TObject); |
| 64 |
|
procedure FormActivate(Sender: TObject); |
| 65 |
|
procedure combo_connectionChange(Sender: TObject); |
| 66 |
+ |
procedure popup_linkshereClick(Sender: TObject); |
| 67 |
|
private |
| 68 |
|
FSortBy: TSortType; |
| 69 |
|
FOnNewFileSelected: TNewFileSelectedEvent; |
| 96 |
|
|
| 97 |
|
implementation |
| 98 |
|
{$R *.dfm} |
| 99 |
< |
uses Main, ConnectionManager, Exporters, Functions; |
| 99 |
> |
uses Main, ConnectionManager, Exporters, Functions, WhatLinksHere; |
| 100 |
|
|
| 101 |
|
|
| 102 |
|
procedure TForm_ToolTemplate.UpdateConList; |
| 119 |
|
datatype := 'OUP-DB: ' |
| 120 |
|
else |
| 121 |
|
datatype := 'Unknown: '; |
| 122 |
< |
boxstring := datatype + fn + ' (Level: ' + IntToStr(level) + ')'; |
| 122 |
> |
boxstring := datatype + fn + ' (Level: ' + IntToStr(level) + ') [' + IntToStr(ConManager.ConnectionByIndex[i].ConnectionID) + ']'; |
| 123 |
|
combo_connection.Items.Add(boxstring); |
| 124 |
|
if ConManager.ConnectionByIndex[i].ConnectionID = FConnectionID then |
| 125 |
|
combo_connection.ItemIndex := combo_connection.Items.Count - 1; |
| 152 |
|
begin |
| 153 |
|
combo_extension.Items.Add('_All files_ (' + |
| 154 |
|
IntToStr(ConManager.Connection[FConnectionID].GetFileCount) + ')'); |
| 155 |
+ |
exts := nil; |
| 156 |
|
exts := ConManager.Connection[FConnectionID].GetExtensionsList(EF_ExtCount); |
| 157 |
|
for i := 0 to exts.Count - 1 do |
| 158 |
|
if Length(FAllowedExts) > 0 then |
| 177 |
|
no_zero_bytes: Boolean; |
| 178 |
|
pattern: String; |
| 179 |
|
files: TStrings; |
| 176 |
– |
i: Integer; |
| 180 |
|
begin |
| 181 |
|
if FConnectionID > -1 then |
| 182 |
|
begin |
| 191 |
|
else |
| 192 |
|
Extension := ''; |
| 193 |
|
|
| 194 |
+ |
files := nil; |
| 195 |
|
files := ConManager.Connection[FConnectionID].GetFilesList(extension, pattern, no_zero_bytes, FSortBy); |
| 196 |
|
|
| 197 |
|
filelist.Visible := False; |
| 261 |
|
end; |
| 262 |
|
end; |
| 263 |
|
|
| 264 |
+ |
procedure TForm_ToolTemplate.popup_linkshereClick(Sender: TObject); |
| 265 |
+ |
begin |
| 266 |
+ |
Form_WhatLinksHere.ConID := FConnectionID; |
| 267 |
+ |
Form_WhatLinksHere.FileID := FSelectedFile.ID; |
| 268 |
+ |
// Form_WhatLinksHere.SenderForm := Self; |
| 269 |
+ |
Form_WhatLinksHere.Show; |
| 270 |
+ |
end; |
| 271 |
+ |
|
| 272 |
|
procedure TForm_ToolTemplate.popup_opentool(Sender: TObject); |
| 273 |
|
var |
| 274 |
|
sender_name, context: String; |
| 283 |
|
procedure TForm_ToolTemplate.combo_connectionChange(Sender: TObject); |
| 284 |
|
var |
| 285 |
|
name: String; |
| 274 |
– |
nstart, nend: Integer; |
| 275 |
– |
i: Integer; |
| 286 |
|
begin |
| 287 |
|
if combo_connection.ItemIndex >= 0 then |
| 288 |
< |
FConnectionID := combo_connection.ItemIndex |
| 288 |
> |
begin |
| 289 |
> |
name := combo_connection.Items.Strings[combo_connection.ItemIndex]; |
| 290 |
> |
FConnectionID := StrToInt(MidStr(name, Pos('[', name) + 1, Pos(']', name) - Pos('[', name) - 1)); |
| 291 |
> |
end |
| 292 |
|
else |
| 293 |
|
FConnectionID := -1; |
| 294 |
|
RecreateExtList; |
| 395 |
|
begin |
| 396 |
|
pt.X := x; |
| 397 |
|
pt.Y := y; |
| 398 |
< |
// filelist.ItemIndex := filelist.ItemAtPos(pt, true); |
| 399 |
< |
// Self.listClick(Self); |
| 398 |
> |
if Shift = [ssRight] then |
| 399 |
> |
begin |
| 400 |
> |
filelist.ItemIndex := filelist.ItemAtPos(pt, true); |
| 401 |
> |
Self.listClick(Self); |
| 402 |
> |
end; |
| 403 |
|
end; |
| 404 |
|
|
| 405 |
|
|