mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Bug [0001466] Mac: must use hotkeys Meta+C/ V/ X #3
This commit is contained in:
parent
f88c031108
commit
a42995b3dc
3 changed files with 41 additions and 6 deletions
|
|
@ -39,6 +39,7 @@ type
|
|||
btnClose: TBitBtn;
|
||||
seCheckSumVerify: TSynEdit;
|
||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure seCheckSumVerifySpecialLineColors(Sender: TObject; Line: integer;
|
||||
var Special: boolean; var FG, BG: TColor);
|
||||
private
|
||||
|
|
@ -56,7 +57,7 @@ implementation
|
|||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
uLng;
|
||||
uLng, uClassesEx;
|
||||
|
||||
procedure ShowVerifyCheckSum(const VerifyResult: TVerifyChecksumResult);
|
||||
var
|
||||
|
|
@ -100,6 +101,11 @@ begin
|
|||
CloseAction:= caFree;
|
||||
end;
|
||||
|
||||
procedure TfrmCheckSumVerify.FormCreate(Sender: TObject);
|
||||
begin
|
||||
seCheckSumVerify.FixDefaultKeystrokes;
|
||||
end;
|
||||
|
||||
procedure TfrmCheckSumVerify.seCheckSumVerifySpecialLineColors(Sender: TObject; Line: integer;
|
||||
var Special: boolean; var FG, BG: TColor);
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ uses
|
|||
uFileSourceProperty, uFileSourceExecuteOperation, uArchiveFileSource, uThumbFileView,
|
||||
uShellExecute, fSymLink, fHardLink, uExceptions, uUniqueInstance, Clipbrd,
|
||||
uFileSourceOperationOptionsUI, uDebug, uHotkeyManager, uFileSourceUtil, uTempFileSystemFileSource,
|
||||
XMLRead, DCOSUtils, DCStrUtils, fOptions, fOptionsFrame, fOptionsToolbar,
|
||||
XMLRead, DCOSUtils, DCStrUtils, fOptions, fOptionsFrame, fOptionsToolbar, uClassesEx,
|
||||
uHotDir, uFileSorting, DCBasicTypes, foptionsDirectoryHotlist, uConnectionManager
|
||||
{$IFDEF COLUMNSFILEVIEW_VTV}
|
||||
, uColumnsFileViewVtv
|
||||
|
|
@ -988,6 +988,8 @@ begin
|
|||
|
||||
PanelSelected:=fpLeft;
|
||||
|
||||
seLogWindow.FixDefaultKeystrokes;
|
||||
|
||||
HMMainForm := HotMan.Register(Self, HotkeysCategory);
|
||||
HotMan.Register(edtCommand, 'Command Line');
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ unit uClassesEx;
|
|||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, IniPropStorage;
|
||||
Classes, SysUtils, IniPropStorage, SynEdit;
|
||||
|
||||
type
|
||||
|
||||
|
|
@ -52,10 +52,17 @@ type
|
|||
procedure DoWriteString(const Section, Ident, Value: string); override;
|
||||
end;
|
||||
|
||||
{ TSynEditHelper }
|
||||
|
||||
TSynEditHelper = class helper for TSynEdit
|
||||
public
|
||||
procedure FixDefaultKeystrokes;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
LCLVersion, Forms, DCStrUtils, DCClassesUtf8;
|
||||
LCLType, Forms, Controls, SynEditKeyCmds, DCStrUtils, DCClassesUtf8;
|
||||
|
||||
{ TBlobStream }
|
||||
|
||||
|
|
@ -82,10 +89,9 @@ begin
|
|||
begin
|
||||
with TCustomForm(Self.Owner) do
|
||||
begin
|
||||
{$IF (lcl_fullversion >= 1020000)}
|
||||
// Refresh monitor list
|
||||
Screen.UpdateMonitors;
|
||||
{$ENDIF}
|
||||
|
||||
AMonitor:= Screen.MonitorFromPoint(Classes.Point(Left, Top));
|
||||
if Assigned(AMonitor) then MakeFullyVisible(AMonitor, True);
|
||||
|
||||
|
|
@ -114,4 +120,25 @@ begin
|
|||
Result := Ident;
|
||||
end;
|
||||
|
||||
{ TSynEditHelper }
|
||||
|
||||
procedure TSynEditHelper.FixDefaultKeystrokes;
|
||||
|
||||
procedure AddKey(const ACmd: TSynEditorCommand; const AKey: Word;
|
||||
const AShift: TShiftState; const AShiftMask: TShiftState = []);
|
||||
begin
|
||||
with Keystrokes.Add do
|
||||
begin
|
||||
Key := AKey;
|
||||
Shift := AShift;
|
||||
ShiftMask := AShiftMask;
|
||||
Command := ACmd;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
AddKey(ecCopy, VK_C, [ssModifier]);
|
||||
AddKey(ecSelectAll, VK_A, [ssModifier]);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue