mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-30 20:22:37 +02:00
LCL: rename Menus.Shortcut function back to its Delphi compatible name.
git-svn-id: trunk@29859 -
This commit is contained in:
parent
9fae2501ab
commit
4e6e7a17b8
@ -1672,7 +1672,7 @@ begin
|
||||
FEndOfTokenChr := '()[].';
|
||||
fEditors := TList.Create;
|
||||
fEditstuffs := TList.Create;
|
||||
fShortCut := Key2ShortCut(Ord(' '), [ssCtrl]);
|
||||
fShortCut := Menus.ShortCut(Ord(' '), [ssCtrl]);
|
||||
end;
|
||||
|
||||
procedure TSynCompletion.SetShortCut(Value: TShortCut);
|
||||
@ -1858,7 +1858,7 @@ begin
|
||||
fEditstuffs := TList.Create;
|
||||
FEndOfTokenChr := '()[].';
|
||||
fAutoCompleteList := TStringList.Create;
|
||||
fShortCut := Key2ShortCut(Ord(' '), [ssShift]);
|
||||
fShortCut := Menus.ShortCut(Ord(' '), [ssShift]);
|
||||
end;
|
||||
|
||||
procedure TSynAutoComplete.SetShortCut(Value: TShortCut);
|
||||
|
@ -725,7 +725,7 @@ end;
|
||||
|
||||
function TSynEditKeyStroke.GetShortCut: TShortCut;
|
||||
begin
|
||||
Result := Key2ShortCut(Key, Shift);
|
||||
Result := Menus.ShortCut(Key, Shift);
|
||||
end;
|
||||
|
||||
function TSynEditKeyStroke.GetCommand: TSynEditorCommand;
|
||||
@ -819,7 +819,7 @@ end;
|
||||
|
||||
function TSynEditKeyStroke.GetShortCut2: TShortCut;
|
||||
begin
|
||||
Result := Key2ShortCut(Key2, Shift2);
|
||||
Result := Menus.ShortCut(Key2, Shift2);
|
||||
end;
|
||||
|
||||
{begin} //ac 2000-07-05
|
||||
|
@ -363,8 +363,8 @@ begin
|
||||
fShortCuts[mcRecord] := QMenus.ShortCut( Ord('R'), [ssCtrl, ssShift] );
|
||||
fShortCuts[mcPlayback] := QMenus.ShortCut( Ord('P'), [ssCtrl, ssShift] );
|
||||
{$ELSE}
|
||||
fShortCuts[mcRecord] := Key2ShortCut( Ord('R'), [ssCtrl, ssShift] );
|
||||
fShortCuts[mcPlayback] := Key2ShortCut( Ord('P'), [ssCtrl, ssShift] );
|
||||
fShortCuts[mcRecord] := Menus.ShortCut( Ord('R'), [ssCtrl, ssShift] );
|
||||
fShortCuts[mcPlayback] := Menus.ShortCut( Ord('P'), [ssCtrl, ssShift] );
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
@ -2034,7 +2034,7 @@ begin
|
||||
OnKeyPress:=@OnSynCompletionKeyPress;
|
||||
OnUTF8KeyPress:=@OnSynCompletionUTF8KeyPress;
|
||||
OnPositionChanged:=@OnSynCompletionPositionChanged;
|
||||
ShortCut:=Key2ShortCut(VK_UNKNOWN,[]);
|
||||
ShortCut:=Menus.ShortCut(VK_UNKNOWN,[]);
|
||||
TheForm.ShowSizeDrag := True;
|
||||
TheForm.Width := Max(50, EnvironmentOptions.CompletionWindowWidth);
|
||||
TheForm.NbLinesInWindow := Max(3, EnvironmentOptions.CompletionWindowHeight);
|
||||
|
@ -4651,7 +4651,7 @@ begin
|
||||
|
||||
Dlg.AutoSize:=true;
|
||||
if Dlg.ShowModal=mrOk then begin
|
||||
NewValue:=Key2ShortCut(Box.Key,Box.ShiftState);
|
||||
NewValue:=Menus.ShortCut(Box.Key,Box.ShiftState);
|
||||
if OldValue<>NewValue then
|
||||
SetOrdValue(NewValue);
|
||||
end;
|
||||
|
@ -282,7 +282,7 @@ begin
|
||||
if AccelIndex > -1 then
|
||||
begin
|
||||
OldShortCut := FShortCut;
|
||||
FShortCut := Key2ShortCut(Char2VK(ParseStr[AccelIndex]), [ssCtrl]);
|
||||
FShortCut := Menus.ShortCut(Char2VK(ParseStr[AccelIndex]), [ssCtrl]);
|
||||
TWSButtonClass(WidgetSetClass).SetShortCut(Self, OldShortCut);
|
||||
end;
|
||||
end;
|
||||
|
@ -217,7 +217,7 @@ begin
|
||||
if AccelIndex > -1 then
|
||||
begin
|
||||
OldShortCut := FShortCut;
|
||||
FShortCut := Key2ShortCut(Char2VK(ParseStr[AccelIndex]), [ssCtrl]);
|
||||
FShortCut := Menus.ShortCut(Char2VK(ParseStr[AccelIndex]), [ssCtrl]);
|
||||
TWSCustomCheckBoxClass(WidgetSetClass).SetShortCut(Self, OldShortCut);
|
||||
end;
|
||||
end;
|
||||
|
@ -262,7 +262,7 @@ var
|
||||
ShiftState: TShiftState;
|
||||
begin
|
||||
ShiftState := KeyDataToShiftState(Message.KeyData);
|
||||
Shortcut := Key2ShortCut(Message.CharCode, ShiftState);
|
||||
Shortcut := Menus.ShortCut(Message.CharCode, ShiftState);
|
||||
Item := FindItem(Shortcut, fkShortcut);
|
||||
Result := not (csDesigning in ComponentState) and (Item <> nil);
|
||||
//DebugLn(['TMenu.IsShortcut ',dbgsName(Self),' Result=',Result,' Message.CharCode=',Message.CharCode,' ShiftState=',dbgs(ShiftState)]);
|
||||
|
@ -1421,10 +1421,10 @@ end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TMenuItem.ShortcutChanged
|
||||
Params: OldValue: Old Key2ShortCut, Value: New Key2ShortCut
|
||||
Params: OldValue: Old shortcut, Value: New shortcut
|
||||
Returns: Nothing
|
||||
|
||||
Installs a new Key2ShortCut, removes an old one.
|
||||
Installs a new shortCut, removes an old one.
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TMenuItem.ShortcutChanged(const OldValue: TShortcut);
|
||||
begin
|
||||
|
@ -416,7 +416,7 @@ type
|
||||
property OnClose: TNotifyEvent read FOnClose write FOnClose;
|
||||
end;
|
||||
|
||||
function Key2ShortCut(const Key: Word; const Shift : TShiftState) : TShortCut;
|
||||
function ShortCut(const Key: Word; const Shift : TShiftState) : TShortCut;
|
||||
procedure ShortCutToKey(const ShortCut : TShortCut; var Key: Word;
|
||||
var Shift : TShiftState);
|
||||
|
||||
@ -558,7 +558,7 @@ end;
|
||||
{$I popupmenu.inc}
|
||||
{$I menuactionlink.inc}
|
||||
|
||||
function Key2ShortCut(const Key: Word; const Shift : TShiftState) : TShortCut;
|
||||
function ShortCut(const Key: Word; const Shift : TShiftState) : TShortCut;
|
||||
begin
|
||||
Result := LCLType.KeyToShortCut(Key,Shift);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user