fix, less esoteric declaration of the shortcuts

This commit is contained in:
Basile Burg 2015-02-23 03:51:44 +01:00
parent a460b168a4
commit 4e51c7bbe6
2 changed files with 3 additions and 9 deletions

View File

@ -256,7 +256,7 @@ begin
end; end;
{$ENDREGION} {$ENDREGION}
{$REGION ICEEDitableSHortcut ---------------------------------------------------} {$REGION ICEEDitableShortcut ---------------------------------------------------}
function TCEEditorWidget.scedWantFirst: boolean; function TCEEditorWidget.scedWantFirst: boolean;
begin begin
result := fDoc <> nil; result := fDoc <> nil;
@ -267,16 +267,13 @@ function TCEEditorWidget.scedWantNext(out category, identifier: string; out aSho
var var
shrct: TSynEditKeyStroke; shrct: TSynEditKeyStroke;
begin begin
result := false;
if fShortcutCount > fDoc.Keystrokes.Count-1 then exit;
//
shrct := fDoc.Keystrokes.Items[fShortcutCount]; shrct := fDoc.Keystrokes.Items[fShortcutCount];
category := 'Editor'; category := 'Editor';
identifier:= shrct.DisplayName; identifier:= shrct.DisplayName;
aShortcut := Shortcut(shrct.Key, shrct.Shift); aShortcut := Shortcut(shrct.Key, shrct.Shift);
// //
fShortcutCount += 1; fShortcutCount += 1;
result := true; result := fShortcutCount < fDoc.Keystrokes.Count;
end; end;
procedure TCEEditorWidget.scedSendItem(const category, identifier: string; aShortcut: TShortcut); procedure TCEEditorWidget.scedSendItem(const category, identifier: string; aShortcut: TShortcut);

View File

@ -916,16 +916,13 @@ function TCEMainForm.scedWantNext(out category, identifier: string; out aShortcu
var var
act: TCustomAction; act: TCustomAction;
begin begin
result := false;
if fScCollectCount > actions.ActionCount -1 then exit;
//
act := TCustomAction(Actions.Actions[fScCollectCount]); act := TCustomAction(Actions.Actions[fScCollectCount]);
category := act.Category; category := act.Category;
identifier := act.Caption; identifier := act.Caption;
aShortcut := act.ShortCut; aShortcut := act.ShortCut;
// //
fScCollectCount += 1; fScCollectCount += 1;
result := true; result := fScCollectCount < actions.ActionCount;
end; end;
procedure TCEMainForm.scedSendItem(const category, identifier: string; aShortcut: TShortcut); procedure TCEMainForm.scedSendItem(const category, identifier: string; aShortcut: TShortcut);