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 }
TCEEditorWidget = class(TCEWidget, ICEMultiDocObserver, ICEMultiDocHandler, ICEEditableShortCut) TCEEditorWidget = class(TCEWidget, ICEMultiDocObserver, ICEMultiDocHandler)
PageControl: TExtendedNotebook; PageControl: TExtendedNotebook;
macRecorder: TSynMacroRecorder; macRecorder: TSynMacroRecorder;
editorStatus: TStatusBar; editorStatus: TStatusBar;
@ -40,7 +40,6 @@ type
fTokList: TLexTokenList; fTokList: TLexTokenList;
fErrList: TLexErrorList; fErrList: TLexErrorList;
fModStart: boolean; fModStart: boolean;
fShortcutCount: Integer;
{$IFDEF LINUX} {$IFDEF LINUX}
procedure pageCloseBtnClick(Sender: TObject); procedure pageCloseBtnClick(Sender: TObject);
{$ENDIF} {$ENDIF}
@ -66,10 +65,6 @@ type
function findDocument(aFilename: string): TCESynMemo; function findDocument(aFilename: string): TCESynMemo;
procedure openDocument(aFilename: string); procedure openDocument(aFilename: string);
function closeDocument(index: Integer): boolean; 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 public
constructor create(aOwner: TComponent); override; constructor create(aOwner: TComponent); override;
destructor destroy; override; destructor destroy; override;
@ -246,32 +241,6 @@ begin
end; end;
{$ENDREGION} {$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 ---------------------------------------------} {$REGION PageControl/Editor things ---------------------------------------------}
{$IFDEF LINUX} {$IFDEF LINUX}
procedure TCEEditorWidget.pageCloseBtnClick(Sender: TObject); procedure TCEEditorWidget.pageCloseBtnClick(Sender: TObject);