diff --git a/src/ce_editoroptions.pas b/src/ce_editoroptions.pas index bbcfb736..8c712523 100644 --- a/src/ce_editoroptions.pas +++ b/src/ce_editoroptions.pas @@ -130,6 +130,7 @@ type function scedWantFirst: boolean; function scedWantNext(out category, identifier: string; out aShortcut: TShortcut): boolean; procedure scedSendItem(const category, identifier: string; aShortcut: TShortcut); + procedure scedSendDone; // procedure applyChangesFromSelf; procedure applyChangeToEditor(anEditor: TCESynMemo); @@ -508,12 +509,13 @@ begin end; // note: shortcut modifications are not reversible, // they are sent from another option editor. - fShortcutCount -= 1; - // TODO: modifies interface so that the target knows when the last - // item has been sent. - if fShortcutCount = 0 then - applyChangesFromSelf; end; + +procedure TCEEditorOptions.scedSendDone; +begin + applyChangesFromSelf; +end; + {$ENDREGION} {$REGION ICEEditableOptions ----------------------------------------------------} diff --git a/src/ce_interfaces.pas b/src/ce_interfaces.pas index 2cab7868..37855b36 100644 --- a/src/ce_interfaces.pas +++ b/src/ce_interfaces.pas @@ -190,12 +190,14 @@ type *) ICEEditableShortCut = interface(ISubjectType) ['ICEEditableShortCut'] - // a TCEEditableShortCutSubject will start to collect shortcuts if result + // a TCEEditableShortCutSubject will start to collect shortcuts if result. function scedWantFirst: boolean; - // a TCEEditableShortCutSubject collects the information on the shortcuts while result + // a TCEEditableShortCutSubject collects the information on the shortcuts while result. function scedWantNext(out category, identifier: string; out aShortcut: TShortcut): boolean; - // a TCEEditableShortCutSubject sends the possibly modified shortcut + // a TCEEditableShortCutSubject sends the possibly modified shortcut. procedure scedSendItem(const category, identifier: string; aShortcut: TShortcut); + // a TCEEditableShortCutSubject has finished to send the shortcuts. + procedure scedSendDone; end; (** * An implementer manages its observers shortcuts. diff --git a/src/ce_main.pas b/src/ce_main.pas index a5dfba2f..c593b02d 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -260,6 +260,7 @@ type function scedWantFirst: boolean; function scedWantNext(out category, identifier: string; out aShortcut: TShortcut): boolean; procedure scedSendItem(const category, identifier: string; aShortcut: TShortcut); + procedure scedSendDone; //Init - Fina procedure getCMdParams; @@ -1409,6 +1410,10 @@ begin act.ShortCut := aShortcut; end; end; + +procedure TCEMainForm.scedSendDone; +begin +end; {$ENDREGION} {$REGION TCEActionProviderHandler ----------------------------------------------} diff --git a/src/ce_shortcutseditor.pas b/src/ce_shortcutseditor.pas index 60529f97..d330036f 100644 --- a/src/ce_shortcutseditor.pas +++ b/src/ce_shortcutseditor.pas @@ -419,6 +419,7 @@ begin continue; shc.declarator.scedSendItem(cat, shc.identifier, shc.data); end; + shc.declarator.scedSendDone; end; {$ENDREGION} diff --git a/src/ce_staticmacro.pas b/src/ce_staticmacro.pas index a219959d..31435417 100644 --- a/src/ce_staticmacro.pas +++ b/src/ce_staticmacro.pas @@ -73,6 +73,7 @@ type function scedWantFirst: boolean; function scedWantNext(out category, identifier: string; out aShortcut: TShortcut): boolean; procedure scedSendItem(const category, identifier: string; aShortcut: TShortcut); + procedure scedSendDone; published // list of string with the format $<..>alnum=<..> property macros: TStringList read fMacros write setMacros; @@ -337,6 +338,10 @@ begin fOptions.shortcut := aShortcut; end; end; + +procedure TCEStaticEditorMacro.scedSendDone; +begin +end; {$ENDREGION} {$REGION Macros things ---------------------------------------------------------} diff --git a/src/ce_tools.pas b/src/ce_tools.pas index 8106c7df..688af57f 100644 --- a/src/ce_tools.pas +++ b/src/ce_tools.pas @@ -86,6 +86,7 @@ type function scedWantFirst: boolean; function scedWantNext(out category, identifier: string; out aShortcut: TShortcut): boolean; procedure scedSendItem(const category, identifier: string; aShortcut: TShortcut); + procedure scedSendDone; published property tools: TCEToolItems read fTools write setTools; public @@ -360,6 +361,10 @@ begin break; end; end; + +procedure TCETools.scedSendDone; +begin +end; {$ENDREGION} {$REGION ICEMultidocObserver ---------------------------------------------------}