- Timestamp:
- Feb 21, 2007, 4:09:30 AM (18 years ago)
- Location:
- oup/rewrite
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/rewrite/DataAccess/Access_OUP_ADB.pas
r105 r106 17 17 18 18 procedure UpdateListCache; 19 20 function GetLinksToFile(FileID: Integer): TLinks; 21 function GetLinksFromFile(FileID: Integer): TLinks; 19 22 20 23 function GetFileInfo(FileID: Integer): TFileInfo; override; … … 167 170 FQuery.Close; 168 171 end; 172 173 174 175 function TAccess_OUP_ADB.GetLinksToFile(FileID: Integer): TLinks; 176 var 177 i: Integer; 178 begin 179 SetLength(Result.ByName, 0); 180 FQuery.SQL.Text := 'SELECT src_link_offset, src_id FROM linkmap WHERE target_id = ' + IntToStr(FileID) + ' ORDER BY src_id ASC;'; 181 FQuery.Open; 182 SetLength(Result.ByID, FQuery.RecordCount); 183 if FQuery.RecordCount > 0 then 184 begin 185 i := 0; 186 repeat 187 Result.ByID[i].SrcOffset := FQuery.FieldByName('src_link_offset').AsInteger; 188 Result.ByID[i].Destination := FQuery.FieldByName('src_id').AsInteger; 189 Inc(i); 190 FQuery.Next; 191 until FQuery.EOF; 192 end; 193 FQuery.Close; 194 end; 195 196 function TAccess_OUP_ADB.GetLinksFromFile(FileID: Integer): TLinks; 197 var 198 i: Integer; 199 begin 200 SetLength(Result.ByName, 0); 201 FQuery.SQL.Text := 'SELECT src_link_offset, target_id FROM linkmap WHERE src_id = ' + IntToStr(FileID) + ' ORDER BY target_id ASC;'; 202 FQuery.Open; 203 SetLength(Result.ByID, FQuery.RecordCount); 204 if FQuery.RecordCount > 0 then 205 begin 206 i := 0; 207 repeat 208 Result.ByID[i].SrcOffset := FQuery.FieldByName('src_link_offset').AsInteger; 209 Result.ByID[i].Destination := FQuery.FieldByName('target_id').AsInteger; 210 Inc(i); 211 FQuery.Next; 212 until FQuery.EOF; 213 end; 214 FQuery.Close; 215 end; 216 169 217 170 218 -
oup/rewrite/Global/TypeDefs.pas
r101 r106 73 73 74 74 TToolList = array of record 75 context: String; 76 name: String; 77 exts: String; 75 context: String; 76 name: String; 77 exts: String; 78 end; 79 80 TLinkByName = record 81 SrcOffset: Integer; 82 Destination: String; 83 end; 84 TLinkByID = record 85 SrcOffset: Integer; 86 Destination: Integer; 87 end; 88 TLinks = record 89 ByName: array of TLinkByName; 90 ByID: array of TLinkByID; 78 91 end; 79 92 -
oup/rewrite/OniUnPacker.bdsproj
r105 r106 178 178 </Language> 179 179 180 180 181 <Excluded_Packages> 181 182 <Excluded_Packages Name="d:\programme\borland\bds\3.0\Bin\dbwebxprt.bpl">Borland Web Wizard Package</Excluded_Packages> -
oup/rewrite/OniUnPacker.dpr
r105 r106 25 25 RawEdit in 'Tools\RawEdit.pas' {Form_RawEdit}, 26 26 Extractor in 'Tools\Extractor.pas' {Form_Extractor}, 27 TxmpReplace in 'Tools\TxmpReplace.pas' {Form_TxmpReplace}; 27 TxmpReplace in 'Tools\TxmpReplace.pas' {Form_TxmpReplace}, 28 WhatLinksHere in 'Helper\WhatLinksHere.pas' {Form1}; 28 29 29 30 {$R *.res} … … 36 37 Application.CreateForm(TForm_Settings, Form_Settings); 37 38 Application.CreateForm(TForm_ValueEdit, Form_ValueEdit); 39 Application.CreateForm(TForm1, Form1); 38 40 Application.Run; 39 41 end. -
oup/rewrite/Tools/Template.dfm
r105 r106 308 308 Left = 72 309 309 Top = 216 310 object popup_separator2: TMenuItem 311 Caption = '-' 312 end 313 object popup_linkshere: TMenuItem 314 Caption = 'What links here?' 315 Enabled = False 316 OnClick = popup_linkshereClick 317 end 310 318 object popup_separator: TMenuItem 311 319 Caption = '-' -
oup/rewrite/Tools/Template.pas
r105 r106 41 41 combo_connection: TComboBox; 42 42 Bevel1: TBevel; 43 popup_linkshere: TMenuItem; 44 popup_separator2: TMenuItem; 43 45 procedure RecreateExtList; 44 46 procedure UpdateConList; … … 62 64 procedure FormActivate(Sender: TObject); 63 65 procedure combo_connectionChange(Sender: TObject); 66 procedure popup_linkshereClick(Sender: TObject); 64 67 private 65 68 FSortBy: TSortType; … … 94 97 implementation 95 98 {$R *.dfm} 96 uses Main, ConnectionManager, Exporters, Functions ;99 uses Main, ConnectionManager, Exporters, Functions, WhatLinksHere; 97 100 98 101 … … 258 261 end; 259 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 260 271 procedure TForm_ToolTemplate.popup_opentool(Sender: TObject); 261 272 var … … 335 346 filepopup.Items.Items[i].Enabled := False; 336 347 end; 348 filepopup.Items.Find('What links here?').Enabled := 349 ConManager.Connection[FConnectionID].Backend = DB_ADB; 337 350 end; 338 351 … … 386 399 pt.X := x; 387 400 pt.Y := y; 388 // filelist.ItemIndex := filelist.ItemAtPos(pt, true); 389 // Self.listClick(Self); 401 if Shift = [ssRight] then 402 begin 403 filelist.ItemIndex := filelist.ItemAtPos(pt, true); 404 Self.listClick(Self); 405 end; 390 406 end; 391 407
Note:
See TracChangeset
for help on using the changeset viewer.