Ignore:
Timestamp:
Jun 25, 2012, 2:07:44 PM (12 years ago)
Author:
chronos
Message:
  • Modified: Updated Common package to version 0.7.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE/Forms/UFormMain.pas

    r51 r52  
    155155    procedure MenuItemTargetClick(Sender: TObject);
    156156    procedure OpenRecentClick(Sender: TObject);
     157    procedure LastOpenedFilesChange(Sender: TObject);
    157158    procedure DockInit;
    158159    procedure LoadFromRegistry(Root: HKEY; Key: string);
     
    494495    end;
    495496  LastOpenedFiles.SaveToRegistry(RegistryRootKey, Key + '\LastOpenedFiles');
    496   LastOpenedFiles.ReloadMenu;
    497497  Compiler.SaveToRegistry(RegistryRootKey, Key + '\Compiler');
    498498end;
     
    503503  Project.LoadFromFile(FileName);
    504504  LastOpenedFiles.AddItem(FileName);
    505   LastOpenedFiles.ReloadMenu;
    506505  UpdateInterface;
    507506end;
     
    554553  ProjectTemplates := TProjectTemplateList.Create;
    555554  TargetProject := TProject.Create;
    556   LastOpenedFiles := TLastOpenedList.Create;
    557   LastOpenedFiles.MenuItem := MenuItemOpenRecent;
     555  LastOpenedFiles := TLastOpenedList.Create(nil);
     556  LastOpenedFiles.OnChange := LastOpenedFilesChange;
    558557  LastOpenedFiles.ClickAction := OpenRecentClick;
    559558end;
     
    587586end;
    588587
     588procedure TFormMain.LastOpenedFilesChange(Sender: TObject);
     589begin
     590  LastOpenedFiles.LoadToMenuItem(MenuItemOpenRecent);
     591end;
     592
    589593procedure TFormMain.FormShow(Sender: TObject);
    590594var
     
    595599  ProjectTemplatesInit;
    596600
    597   if ReopenLastOpenedFile and (LastOpenedFiles.Count > 0) then begin
    598     ProjectOpen(LastOpenedFiles[0]);
     601  if ReopenLastOpenedFile and (LastOpenedFiles.Items.Count > 0) then begin
     602    ProjectOpen(LastOpenedFiles.Items[0]);
    599603  end;
    600604
     
    661665    UpdateInterface;
    662666    LastOpenedFiles.AddItem(SaveDialog1.FileName);
    663     LastOpenedFiles.ReloadMenu;
    664667  end;
    665668end;
Note: See TracChangeset for help on using the changeset viewer.