- Timestamp:
- May 21, 2014, 5:33:14 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UFormCompare.lfm
r5 r15 1 1 object FormCompare: TFormCompare 2 Left = 4492 Left = -29 3 3 Height = 996 4 Top = 3274 Top = 110 5 5 Width = 1520 6 6 Caption = 'Compare' … … 13 13 Top = 0 14 14 Width = 1520 15 ActivePage = TabSheet 215 ActivePage = TabSheet4 16 16 Align = alClient 17 TabIndex = 117 TabIndex = 3 18 18 TabOrder = 0 19 19 object TabSheet1: TTabSheet … … 47 47 end 48 48 end 49 object TabSheet3: TTabSheet 50 Caption = 'List 1' 51 ClientHeight = 956 52 ClientWidth = 1514 53 object Memo3: TMemo 54 Left = 0 55 Height = 956 56 Top = 0 57 Width = 1514 58 Align = alClient 59 ReadOnly = True 60 ScrollBars = ssAutoBoth 61 TabOrder = 0 62 end 63 end 64 object TabSheet4: TTabSheet 65 Caption = 'List 2' 66 ClientHeight = 956 67 ClientWidth = 1514 68 object Memo4: TMemo 69 Left = 0 70 Height = 956 71 Top = 0 72 Width = 1514 73 Align = alClient 74 ReadOnly = True 75 ScrollBars = ssAutoBoth 76 TabOrder = 0 77 end 78 end 49 79 end 50 80 end -
trunk/UFormCompare.pas
r5 r15 16 16 Memo1: TMemo; 17 17 Memo2: TMemo; 18 Memo3: TMemo; 19 Memo4: TMemo; 18 20 PageControl1: TPageControl; 19 21 TabSheet1: TTabSheet; 20 22 TabSheet2: TTabSheet; 23 TabSheet3: TTabSheet; 24 TabSheet4: TTabSheet; 21 25 private 22 26 { private declarations } -
trunk/UFormMain.lfm
r13 r15 158 158 object MenuItem10: TMenuItem 159 159 Action = AExit 160 end 161 end 162 object MenuItemArch: TMenuItem 163 Caption = 'Architecture' 164 object MenuItem12: TMenuItem 165 Caption = 'New Item14' 160 166 end 161 167 end -
trunk/UFormMain.pas
r14 r15 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus, 9 ActnList, ComCtrls, StdCtrls, UKConfig, ULastOpenedList, URegistry, MyRegistry; 9 ActnList, ComCtrls, StdCtrls, UKConfig, ULastOpenedList, URegistry, MyRegistry, 10 UFindFile; 10 11 11 12 const … … 33 34 MenuItem1: TMenuItem; 34 35 MenuItem10: TMenuItem; 36 MenuItemArch: TMenuItem; 37 MenuItem12: TMenuItem; 35 38 MenuItemCompareRecent: TMenuItem; 36 39 MenuItem2: TMenuItem; … … 72 75 procedure OpenDir(Dir: string); 73 76 procedure CompareDir(Dir: string); 77 procedure ReloadArch(Dir: string); 78 procedure MenuItemArchExecute(Sender: TObject); 74 79 public 75 80 AutoOpen: Boolean; … … 156 161 FormCompare.Memo1.Lines.Assign(Missing1); 157 162 FormCompare.Memo2.Lines.Assign(Missing2); 163 FormCompare.Memo3.Lines.Assign(List1); 164 FormCompare.Memo4.Lines.Assign(List2); 158 165 FormCompare.Show; 159 166 finally … … 163 170 List1.Free; 164 171 List2.Free; 172 end; 173 end; 174 175 procedure TFormMain.ReloadArch(Dir: string); 176 var 177 FindFile: TFindFile; 178 List: TStringList; 179 I: Integer; 180 NewMenuItem: TMenuItem; 181 DirName: string; 182 begin 183 try 184 FindFile := TFindFile.Create(nil); 185 FindFile.FileAttr := [ffaDirectory]; 186 FindFile.Path := Dir; 187 FindFile.FileMask := '*'; 188 List := FindFile.SearchForFiles; 189 MenuItemArch.Clear; 190 for I := 0 to List.Count - 1 do begin 191 DirName := ExtractFileName(List[I]); 192 if (DirName <> '..') and (DirName <> '.') and 193 FileExists(List[I] + DirectorySeparator + 'Kconfig') then begin 194 NewMenuItem := TMenuItem.Create(MenuItemArch); 195 NewMenuItem.Caption := DirName; 196 NewMenuItem.OnClick := MenuItemArchExecute; 197 if Config.Arch = DirName then NewMenuItem.Checked := True; 198 MenuItemArch.Add(NewMenuItem); 199 end; 200 end; 201 finally 202 FindFile.Free; 203 end 204 end; 205 206 procedure TFormMain.MenuItemArchExecute(Sender: TObject); 207 begin 208 if Sender is TMenuItem then begin 209 Config.Arch := TMenuItem(Sender).Caption; 210 Reload; 165 211 end; 166 212 end; … … 178 224 TreeView1.TopItem.Expanded := True; 179 225 StatusBar1.Panels[0].Text := 'Count: ' + IntToStr(Config.TopNode.GetCount); 226 ReloadArch(Config.BaseDir + DirectorySeparator + 'arch'); 180 227 end else begin 181 228 StatusBar1.Panels[0].Text := ''; -
trunk/UKConfig.pas
r14 r15 72 72 RangeMax: string; 73 73 MenuConfig: Boolean; 74 Optional: Boolean; 74 75 constructor Create; virtual; 75 76 destructor Destroy; override; … … 98 99 CurrentMenu: TMenuNode; 99 100 ConditionStack: TStringList; 100 Arch: string;101 FArch: string; 101 102 FOnLog: TOnLogEvent; 102 103 ParseFileName: string; … … 117 118 procedure ParseMakeFile; 118 119 function GetLog: string; 120 procedure SetArch(AValue: string); 119 121 public 120 122 TopNode: TMenuNode; … … 129 131 constructor Create; 130 132 destructor Destroy; override; 133 property Arch: string read FArch write SetArch; 131 134 end; 132 135 … … 609 612 begin 610 613 Result := ' ' + ParseFileName + ':' + IntToStr(LineNumber); 614 end; 615 616 procedure TConfigMenu.SetArch(AValue: string); 617 begin 618 if FArch = AValue then Exit; 619 FArch := AValue; 620 LoadFromDir(BaseDir); 611 621 end; 612 622 … … 895 905 //VisibleCondition := GetNextToken(Line); 896 906 end else 907 if Command = 'optional' then begin 908 NewItem.Optional := True; 909 end else 897 910 if Command = 'endif' then begin 898 911 ConditionStack.Delete(ConditionStack.Count - 1); … … 1018 1031 I: Integer; 1019 1032 begin 1020 Self.Arch := 'x86';1021 1033 BaseDir := Dir; 1022 1034 ParseMakeFile; … … 1038 1050 begin 1039 1051 ConditionStack := TStringList.Create; 1052 Self.FArch := 'x86'; 1040 1053 end; 1041 1054
Note:
See TracChangeset
for help on using the changeset viewer.