mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Disable main menu shortcuts when Alt+Letter keys are used somewhere (fixes #1327)
This commit is contained in:
parent
0524bcd4e8
commit
7991af0a06
1 changed files with 32 additions and 0 deletions
|
|
@ -1142,6 +1142,15 @@ begin
|
|||
Application.AddOnKeyDownBeforeHandler( @GlobalMacOSKeyDownHandler );
|
||||
{$ENDIF}
|
||||
|
||||
{$IF DEFINED(LCLQT5) OR DEFINED(LCLQT6)}
|
||||
// Save original captions
|
||||
for I:= 0 to mnuMain.Items.Count - 1 do
|
||||
begin
|
||||
mnuMain.Items[I].Hint:= mnuMain.Items[I].Caption;
|
||||
end;
|
||||
mnuMain.Tag:= PtrInt(gKeyTyping[ktmAlt]);
|
||||
{$ENDIF}
|
||||
|
||||
ConvertToolbarBarConfig(gpCfgDir + 'default.bar');
|
||||
CreateDefaultToolbar;
|
||||
sStaticTitleBarString := GenerateTitle();
|
||||
|
|
@ -5824,6 +5833,29 @@ begin
|
|||
UpdateFreeSpace(fpRight, True);
|
||||
end;
|
||||
|
||||
{$IF DEFINED(LCLQT5) OR DEFINED(LCLQT6)}
|
||||
// https://github.com/doublecmd/doublecmd/issues/1327
|
||||
if mnuMain.Tag <> PtrInt(gKeyTyping[ktmAlt]) then
|
||||
begin
|
||||
if gKeyTyping[ktmAlt] = ktaNone then
|
||||
begin
|
||||
// Enable menu shortcuts
|
||||
for I:= 0 to mnuMain.Items.Count - 1 do
|
||||
begin
|
||||
mnuMain.Items[I].Caption:= mnuMain.Items[I].Hint;
|
||||
end;
|
||||
end
|
||||
else begin
|
||||
// Disable menu shortcuts
|
||||
for I:= 0 to mnuMain.Items.Count - 1 do
|
||||
begin
|
||||
mnuMain.Items[I].Caption:= StripHotkey(mnuMain.Items[I].Hint);
|
||||
end;
|
||||
end;
|
||||
mnuMain.Tag:= PtrInt(gKeyTyping[ktmAlt])
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
UpdateHotDirIcons; // Preferable to be loaded even if not required in popupmenu *because* in the tree it's a must, especially when checking for missing directories
|
||||
ShowTrayIcon(gAlwaysShowTrayIcon);
|
||||
UpdateMainTitleBar;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue