Ignore:
Timestamp:
Aug 14, 2024, 10:51:18 PM (3 months ago)
Author:
chronos
Message:
  • Added: Key shortcuts form to see all available actions and their key shortcuts.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormMain.pas

    r153 r154  
    77  Graphics, Dialogs, Menus, ActnList, ComCtrls, ExtCtrls, Target, Registry,
    88  LazFileUtils, FormOptions, FormMessages, FormTargets, FormCompileMultiple,
    9   FormOutput, FormMemory, FormSourceCode, FormTargetCode, FormLog, FormEx;
     9  FormOutput, FormMemory, FormSourceCode, FormTargetCode, FormLog, FormEx,
     10  FormKeyShortcuts;
    1011
    1112type
     
    1415
    1516  TFormMain = class(TFormEx)
     17    AKeyShortcuts: TAction;
    1618    AFullScreen: TAction;
    1719    AProgramCompileMultiple: TAction;
     
    6264    MenuItem27: TMenuItem;
    6365    MenuItem28: TMenuItem;
     66    MenuItem29: TMenuItem;
    6467    MenuItem30: TMenuItem;
    6568    MenuItem31: TMenuItem;
     
    122125    procedure AFullScreenExecute(Sender: TObject);
    123126    procedure AHelpExecute(Sender: TObject);
     127    procedure AKeyShortcutsExecute(Sender: TObject);
    124128    procedure AOptionsExecute(Sender: TObject);
    125129    procedure AProgramCompileExecute(Sender: TObject);
     
    159163    FormSourceCode: TFormSourceCode;
    160164    FormTargetCode: TFormTargetCode;
     165    FormKeyShortcuts: TFormKeyShortcuts;
    161166    procedure AProjectOpenRecentExecute(Sender: TObject);
    162167    procedure MenuItemTargetClick(Sender: TObject);
     
    406411  FreeAndNil(FormOutput);
    407412  FreeAndNil(FormTargetCode);
     413  if Assigned(FormKeyShortcuts) then FreeAndNil(FormKeyShortcuts);
    408414end;
    409415
     
    497503begin
    498504  FormHelp := TFormHelp.Create(nil);
    499   FormHelp.ShowModal;
    500   FormHelp.Free;
     505  try
     506    FormHelp.ShowModal;
     507  finally
     508    FormHelp.Free;
     509  end;
     510end;
     511
     512procedure TFormMain.AKeyShortcutsExecute(Sender: TObject);
     513begin
     514  if not Assigned(FormKeyShortcuts) then FormKeyShortcuts := TFormKeyShortcuts.Create(nil);
     515  FormKeyShortcuts.SourceComponents.Clear;
     516  FormKeyShortcuts.SourceComponents.Add(Self);
     517  FormKeyShortcuts.Show;
    501518end;
    502519
Note: See TracChangeset for help on using the changeset viewer.