From 4e6e7a17b823f37f25201eda4136ebd8b010ada7 Mon Sep 17 00:00:00 2001 From: juha Date: Tue, 15 Mar 2011 18:16:38 +0000 Subject: [PATCH] LCL: rename Menus.Shortcut function back to its Delphi compatible name. git-svn-id: trunk@29859 - --- components/synedit/syncompletion.pas | 4 ++-- components/synedit/syneditkeycmds.pp | 4 ++-- components/synedit/synmacrorecorder.pas | 4 ++-- ide/sourceeditor.pp | 2 +- ideintf/propedits.pp | 2 +- lcl/include/buttons.inc | 2 +- lcl/include/customcheckbox.inc | 2 +- lcl/include/menu.inc | 2 +- lcl/include/menuitem.inc | 4 ++-- lcl/menus.pp | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/components/synedit/syncompletion.pas b/components/synedit/syncompletion.pas index cdf094dc4f..d360d19a91 100644 --- a/components/synedit/syncompletion.pas +++ b/components/synedit/syncompletion.pas @@ -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); diff --git a/components/synedit/syneditkeycmds.pp b/components/synedit/syneditkeycmds.pp index 9f813e35a1..baa3cf7a17 100644 --- a/components/synedit/syneditkeycmds.pp +++ b/components/synedit/syneditkeycmds.pp @@ -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 diff --git a/components/synedit/synmacrorecorder.pas b/components/synedit/synmacrorecorder.pas index 627b6aada0..acfe6f2d66 100644 --- a/components/synedit/synmacrorecorder.pas +++ b/components/synedit/synmacrorecorder.pas @@ -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; diff --git a/ide/sourceeditor.pp b/ide/sourceeditor.pp index cee0bf96db..6463f6e922 100644 --- a/ide/sourceeditor.pp +++ b/ide/sourceeditor.pp @@ -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); diff --git a/ideintf/propedits.pp b/ideintf/propedits.pp index a12e34306d..05f3875ba6 100644 --- a/ideintf/propedits.pp +++ b/ideintf/propedits.pp @@ -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; diff --git a/lcl/include/buttons.inc b/lcl/include/buttons.inc index 6b3a64acfb..979d534a36 100644 --- a/lcl/include/buttons.inc +++ b/lcl/include/buttons.inc @@ -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; diff --git a/lcl/include/customcheckbox.inc b/lcl/include/customcheckbox.inc index dd27c260d8..1c491e16bf 100644 --- a/lcl/include/customcheckbox.inc +++ b/lcl/include/customcheckbox.inc @@ -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; diff --git a/lcl/include/menu.inc b/lcl/include/menu.inc index 42ffb8a204..521709c94b 100644 --- a/lcl/include/menu.inc +++ b/lcl/include/menu.inc @@ -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)]); diff --git a/lcl/include/menuitem.inc b/lcl/include/menuitem.inc index f8f09ce412..6e3cf480b8 100644 --- a/lcl/include/menuitem.inc +++ b/lcl/include/menuitem.inc @@ -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 diff --git a/lcl/menus.pp b/lcl/menus.pp index 2480ae4e9f..aceea5da55 100644 --- a/lcl/menus.pp +++ b/lcl/menus.pp @@ -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;