Changeset 8
- Timestamp:
- May 2, 2014, 12:02:30 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UFormMain.pas
r7 r8 146 146 Config2.OptionListNames(Missing1); 147 147 Config.OptionListNames(Missing2); 148 Missing1.Sort; 149 Missing2.Sort; 148 150 FormCompare.Memo1.Lines.Assign(Missing1); 149 151 FormCompare.Memo2.Lines.Assign(Missing2); -
trunk/UKConfig.pas
r7 r8 39 39 RangeMin: string; 40 40 RangeMax: string; 41 MenuConfig: Boolean; 41 42 constructor Create; virtual; 42 43 destructor Destroy; override; … … 99 100 Selects := TStringList.Create; 100 101 Items := TObjectList.Create; 102 MenuConfig := False; 101 103 end; 102 104 … … 196 198 NewMove: TObjectMove; 197 199 Index: Integer; 198 begin 199 if ID = 'KVM_INTEL' then 200 P: TMenuNode; 201 begin 202 if ID = 'EXT4_FS' then 200 203 Name := Name + '$'; 201 204 NewParent := Parent; 202 if Condition <> '' then begin 205 P := Parent; 206 { if Condition <> '' then begin 203 207 Index := Lookup.IndexOf(Condition); 204 208 if Index <> -1 then Node := TMenuNode(Lookup.Objects[Index]) 205 209 else Node := nil; 206 if Assigned(Node) and (NewParent <> Node) then begin210 if Assigned(Node) and (NewParent <> Node) and Node.MenuConfig then begin 207 211 NewParent := Node; 208 212 end; 209 end; 213 end;} 210 214 if Depends.Count > 0 then begin 211 215 Index := Lookup.IndexOf(Depends[0]); … … 467 471 NewItem.Condition := GetTopCondition; 468 472 CurrentMenu.Items.Add(NewItem); 473 if Command = 'menuconfig' then NewItem.MenuConfig := True; 469 474 end else 470 475 if (Command = 'comment') then begin … … 493 498 NewMenu.Parent := CurrentMenu; 494 499 NewMenu.Condition := GetTopCondition; 495 ConditionStack.Add ('');500 ConditionStack.AddObject('', nil); 496 501 NewItem := NewMenu; 497 502 CurrentMenu.Items.Add(NewMenu); … … 517 522 NewMenu.Parent := CurrentMenu; 518 523 NewMenu.Condition := GetTopCondition; 519 ConditionStack.Add ('');524 ConditionStack.AddObject('', nil); 520 525 NewItem := NewMenu; 521 526 CurrentMenu.Items.Add(NewMenu); … … 530 535 end else 531 536 if Command = 'if' then begin 532 ConditionStack.Add(GetNextToken(Line)); 537 ConditionStack.AddObject(GetNextToken(Line), NewItem); 538 if Assigned(NewItem) and NewItem.MenuConfig then begin 539 CurrentMenu := NewItem; 540 end; 533 541 end else 534 542 if Command = 'visible' then begin 535 543 //VisibleCondition := GetNextToken(Line); 536 544 end else 537 if command = 'endif' then begin 545 if Command = 'endif' then begin 546 if Assigned(ConditionStack.Objects[ConditionStack.Count - 1]) then 547 if TMenuNode(ConditionStack.Objects[ConditionStack.Count - 1]).MenuConfig then 548 CurrentMenu := CurrentMenu.Parent; 538 549 ConditionStack.Delete(ConditionStack.Count - 1); 539 550 end else … … 600 611 Node := TopNode.FindNode(List[I]); 601 612 if Assigned(Node) then 602 List[I] := List[I] + ' ' + Node.GetAbsoluteName;613 List[I] := Node.GetAbsoluteName + ' (' + List[I] + ')'; 603 614 end; 604 615 end;
Note:
See TracChangeset
for help on using the changeset viewer.