Changeset 52 for trunk/IDE/Forms
- Timestamp:
- Jun 25, 2012, 2:07:44 PM (13 years ago)
- Location:
- trunk/IDE/Forms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/Forms/UFormMain.lfm
r50 r52 15 15 OnShow = FormShow 16 16 Position = poDesktopCenter 17 LCLVersion = ' 0.9.31'17 LCLVersion = '1.1' 18 18 object Splitter3: TSplitter 19 19 Cursor = crVSplit -
trunk/IDE/Forms/UFormMain.pas
r51 r52 155 155 procedure MenuItemTargetClick(Sender: TObject); 156 156 procedure OpenRecentClick(Sender: TObject); 157 procedure LastOpenedFilesChange(Sender: TObject); 157 158 procedure DockInit; 158 159 procedure LoadFromRegistry(Root: HKEY; Key: string); … … 494 495 end; 495 496 LastOpenedFiles.SaveToRegistry(RegistryRootKey, Key + '\LastOpenedFiles'); 496 LastOpenedFiles.ReloadMenu;497 497 Compiler.SaveToRegistry(RegistryRootKey, Key + '\Compiler'); 498 498 end; … … 503 503 Project.LoadFromFile(FileName); 504 504 LastOpenedFiles.AddItem(FileName); 505 LastOpenedFiles.ReloadMenu;506 505 UpdateInterface; 507 506 end; … … 554 553 ProjectTemplates := TProjectTemplateList.Create; 555 554 TargetProject := TProject.Create; 556 LastOpenedFiles := TLastOpenedList.Create ;557 LastOpenedFiles. MenuItem := MenuItemOpenRecent;555 LastOpenedFiles := TLastOpenedList.Create(nil); 556 LastOpenedFiles.OnChange := LastOpenedFilesChange; 558 557 LastOpenedFiles.ClickAction := OpenRecentClick; 559 558 end; … … 587 586 end; 588 587 588 procedure TFormMain.LastOpenedFilesChange(Sender: TObject); 589 begin 590 LastOpenedFiles.LoadToMenuItem(MenuItemOpenRecent); 591 end; 592 589 593 procedure TFormMain.FormShow(Sender: TObject); 590 594 var … … 595 599 ProjectTemplatesInit; 596 600 597 if ReopenLastOpenedFile and (LastOpenedFiles. Count > 0) then begin598 ProjectOpen(LastOpenedFiles [0]);601 if ReopenLastOpenedFile and (LastOpenedFiles.Items.Count > 0) then begin 602 ProjectOpen(LastOpenedFiles.Items[0]); 599 603 end; 600 604 … … 661 665 UpdateInterface; 662 666 LastOpenedFiles.AddItem(SaveDialog1.FileName); 663 LastOpenedFiles.ReloadMenu;664 667 end; 665 668 end;
Note:
See TracChangeset
for help on using the changeset viewer.