mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: add ShortCut String to tips for Backward/Forward button on macOS
(cherry picked from commit dd3d54ca31)
This commit is contained in:
parent
7c249235e7
commit
06fb86f6c5
1 changed files with 20 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ interface
|
|||
uses
|
||||
Classes, SysUtils,
|
||||
LCLType, Forms, Menus,
|
||||
fMain, uDCUtils, uLng,
|
||||
fMain, uHotkeyManager, uGlobs, uLng, uDCUtils,
|
||||
uFileView, uBriefFileView, uColumnsFileView, uThumbFileView,
|
||||
uDarwinUtil, uDarwinApplication, uDarwinFile,
|
||||
uDarwinFinder, uDarwinFinderModel, uDarwinFileView, uDarwinPanel,
|
||||
|
|
@ -797,8 +797,27 @@ const
|
|||
);
|
||||
);
|
||||
|
||||
procedure addShortCutString( var item: TCocoaConfigToolBarItemWithAction; const command: String );
|
||||
var
|
||||
form: THMForm;
|
||||
hotkey: THotKey;
|
||||
begin
|
||||
form:= HotMan.Forms.Find('Main');
|
||||
if form = nil then
|
||||
Exit;
|
||||
|
||||
hotkey:= form.Hotkeys.FindByCommand( command );
|
||||
if hotkey = nil then
|
||||
Exit;
|
||||
|
||||
item.tips:= item.tips + ' ( ' + hotkey.Shortcuts[0] + ' )';
|
||||
end;
|
||||
|
||||
procedure doInitConfig;
|
||||
begin
|
||||
addShortCutString( goBackwardItemConfig, 'cm_ViewHistoryPrev' );
|
||||
addShortCutString( goForwardItemConfig, 'cm_ViewHistoryNext' );
|
||||
|
||||
showModeItemConfig.subitems:= [
|
||||
TCocoaToolBarUtils.toClass(showBriefItemConfig),
|
||||
TCocoaToolBarUtils.toClass(showFullItemConfig),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue