ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/oup/current/Tools/Template.pas
(Generate patch)

Comparing:
oup/rewrite/Tools/Template.pas (file contents), Revision 101 by alloc, Tue Feb 20 20:43:29 2007 UTC vs.
oup/current/Tools/Template.pas (file contents), Revision 109 by alloc, Wed Feb 21 03:12:33 2007 UTC

# Line 40 | Line 40 | type
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;
# Line 61 | Line 63 | type
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;
# Line 93 | Line 96 | procedure AddToolListEntry(context, name
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;
# Line 116 | Line 119 | begin
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;
# Line 257 | Line 260 | begin
260    end;
261   end;
262  
263 + procedure TForm_ToolTemplate.popup_linkshereClick(Sender: TObject);
264 + begin
265 +  Form_WhatLinksHere.ConID := FConnectionID;
266 +  Form_WhatLinksHere.FileID := FSelectedFile.ID;
267 +  Form_WhatLinksHere.SenderForm := Self;
268 +  Form_WhatLinksHere.Show;
269 + end;
270 +
271   procedure TForm_ToolTemplate.popup_opentool(Sender: TObject);
272   var
273    sender_name, context: String;
# Line 275 | Line 286 | var
286    i: Integer;
287   begin
288    if combo_connection.ItemIndex >= 0 then
289 <    FConnectionID := combo_connection.ItemIndex
289 >  begin
290 >    name := combo_connection.Items.Strings[combo_connection.ItemIndex];
291 >    FConnectionID := StrToInt(MidStr(name, Pos('[', name) + 1, Pos(']', name) - Pos('[', name)  - 1));
292 >  end
293    else
294      FConnectionID := -1;
295    RecreateExtList;
# Line 331 | Line 345 | begin
345        if Pos(ext, ToolList[i].exts) = 0 then
346          filepopup.Items.Items[i].Enabled := False;
347    end;
348 +  filepopup.Items.Find('What links here?').Enabled :=
349 +      ConManager.Connection[FConnectionID].Backend = DB_ADB;
350   end;
351  
352   procedure TForm_ToolTemplate.check_zerobyteClick(Sender: TObject);
# Line 382 | Line 398 | var
398   begin
399    pt.X := x;
400    pt.Y := y;
401 < //  filelist.ItemIndex := filelist.ItemAtPos(pt, true);
402 < //  Self.listClick(Self);
401 >  if Shift = [ssRight] then
402 >  begin
403 >    filelist.ItemIndex := filelist.ItemAtPos(pt, true);
404 >    Self.listClick(Self);
405 >  end;
406   end;
407  
408  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)