Changeset 177 for trunk/Core.pas


Ignore:
Timestamp:
Aug 23, 2024, 9:59:54 PM (3 months ago)
Author:
chronos
Message:
  • Added: Keyboard shortcuts form accessible from Help menu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Core.pas

    r176 r177  
    77  LastOpenedList, ApplicationInfo, PersistentForm, ScaleDPI, Common,
    88  Translator, DataFile, VCard, Menus, RegistryEx, Theme, FormMain,
    9   Registry, VCardFile;
     9  Registry, VCardFile, FormKeyShortcuts;
    1010
    1111type
     
    1515  TCore = class(TDataModule)
    1616    AAbout: TAction;
     17    AKeyShortcuts: TAction;
    1718    AFullScreen: TAction;
    1819    AFileImport: TAction;
     
    6667    procedure AGenerateExecute(Sender: TObject);
    6768    procedure AHomePageExecute(Sender: TObject);
     69    procedure AKeyShortcutsExecute(Sender: TObject);
    6870    procedure ANormalizeExecute(Sender: TObject);
    6971    procedure ARemoveExactDuplicatesExecute(Sender: TObject);
     
    8688    RecentFileRegistryContext: TRegistryContext;
    8789    FormMain: TFormMain;
     90    FormKeyShortcuts: TFormKeyShortcuts;
    8891    procedure FileModified(Sender: TObject);
    8992    function FindFirstNonOption: string;
     
    277280      {$ENDIF}
    278281      {$IFDEF UNIX}
    279       ExecuteProgram('/usr/bin/xdg-open', [SelectDirectoryDialog1.FileName]);
     282      ExecuteProgram('/usr/bin/xdg-open', [SelectDirectoryDialog1.FileName], []);
    280283      {$ENDIF}
    281284    end;
     
    329332begin
    330333  OpenWebPage(ApplicationInfo1.HomePage);
     334end;
     335
     336procedure TCore.AKeyShortcutsExecute(Sender: TObject);
     337begin
     338  if not Assigned(FormKeyShortcuts) then
     339    FormKeyShortcuts := TFormKeyShortcuts.Create(nil);
     340  FormKeyShortcuts.ImageList := ImageList1;
     341  FormKeyShortcuts.MainForm := FormMain;
     342  FormKeyShortcuts.SourceComponents.Clear;
     343  FormKeyShortcuts.SourceComponents.Add(Self);
     344  FormKeyShortcuts.Show;
    331345end;
    332346
     
    496510  if Assigned(ProfileImage) then
    497511    FreeAndNil(ProfileImage);
     512  if Assigned(FormKeyShortcuts) then
     513    FreeAndNil(FormKeyShortcuts);
    498514end;
    499515
Note: See TracChangeset for help on using the changeset viewer.