removed editor shortcut managment from editor

it worked only when an editor existed and shortcuts were not assignable
This commit is contained in:
Basile Burg 2015-05-13 05:19:49 +02:00
parent b7e655df41
commit cddf132e8b
1 changed files with 1 additions and 32 deletions

View File

@ -22,7 +22,7 @@ type
{ TCEEditorWidget }
TCEEditorWidget = class(TCEWidget, ICEMultiDocObserver, ICEMultiDocHandler, ICEEditableShortCut)
TCEEditorWidget = class(TCEWidget, ICEMultiDocObserver, ICEMultiDocHandler)
PageControl: TExtendedNotebook;
macRecorder: TSynMacroRecorder;
editorStatus: TStatusBar;
@ -40,7 +40,6 @@ type
fTokList: TLexTokenList;
fErrList: TLexErrorList;
fModStart: boolean;
fShortcutCount: Integer;
{$IFDEF LINUX}
procedure pageCloseBtnClick(Sender: TObject);
{$ENDIF}
@ -66,10 +65,6 @@ type
function findDocument(aFilename: string): TCESynMemo;
procedure openDocument(aFilename: string);
function closeDocument(index: Integer): boolean;
//
function scedWantFirst: boolean;
function scedWantNext(out category, identifier: string; out aShortcut: TShortcut): boolean;
procedure scedSendItem(const category, identifier: string; aShortcut: TShortcut);
public
constructor create(aOwner: TComponent); override;
destructor destroy; override;
@ -246,32 +241,6 @@ begin
end;
{$ENDREGION}
{$REGION ICEEDitableShortcut ---------------------------------------------------}
function TCEEditorWidget.scedWantFirst: boolean;
begin
result := fDoc <> nil;
fShortcutCount := 0;
end;
function TCEEditorWidget.scedWantNext(out category, identifier: string; out aShortcut: TShortcut): boolean;
var
shrct: TSynEditKeyStroke;
begin
shrct := fDoc.Keystrokes.Items[fShortcutCount];
category := 'Editor';
identifier:= shrct.DisplayName;
aShortcut := Shortcut(shrct.Key, shrct.Shift);
//
fShortcutCount += 1;
result := fShortcutCount < fDoc.Keystrokes.Count;
end;
procedure TCEEditorWidget.scedSendItem(const category, identifier: string; aShortcut: TShortcut);
begin
end;
{$ENDREGION}
{$REGION PageControl/Editor things ---------------------------------------------}
{$IFDEF LINUX}
procedure TCEEditorWidget.pageCloseBtnClick(Sender: TObject);