moved persistent shortcut item to ce_common

This commit is contained in:
Basile Burg 2015-05-13 03:56:42 +02:00
parent c9f5b7985f
commit 5cd90da065
2 changed files with 16 additions and 11 deletions

View File

@ -50,6 +50,18 @@ type
procedure Assign(aValue: TPersistent); procedure Assign(aValue: TPersistent);
end; end;
(**
* CollectionItem used to store a shortcut.
*)
TCEPersistentShortcut = class(TCollectionItem)
private
fShortcut: TShortCut;
fActionName: string;
published
property shortcut: TShortCut read fShortcut write fShortcut;
property actionName: string read fActionName write fActionName;
end;
(** (**
* Save a component with a readable aspect. * Save a component with a readable aspect.
*) *)
@ -196,7 +208,8 @@ type
(** (**
* Returns the common folder of the file names stored in aList * Returns the common folder of the file names stored in aList
*) *)
function commonFolder(const someFiles: TStringList): string; function commonFolder(const someFiles: TStringList): string;
implementation implementation
@ -890,6 +903,7 @@ end;
initialization initialization
dExtList := TStringList.Create; dExtList := TStringList.Create;
dExtList.AddStrings(['.d', '.D', '.di', '.DI', '.Di', '.dI', '.dd', '.DD']); dExtList.AddStrings(['.d', '.D', '.di', '.DI', '.Di', '.dI', '.dd', '.DD']);
registerClasses([TCEPersistentShortcut]);
finalization finalization
dExtList.Free; dExtList.Free;
end. end.

View File

@ -287,15 +287,6 @@ type
procedure UpdateDockCaption(Exclude: TControl = nil); override; procedure UpdateDockCaption(Exclude: TControl = nil); override;
end; end;
TCEPersistentShortcut = class(TCollectionItem)
private
fShortcut: TShortCut;
fActionName: string;
published
property shortcut: TShortCut read fShortcut write fShortcut;
property actionName: string read fActionName write fActionName;
end;
TCEPersistentMainShortcuts = class(TWritableLfmTextComponent) TCEPersistentMainShortcuts = class(TWritableLfmTextComponent)
private private
fCol: TCollection; fCol: TCollection;
@ -1886,5 +1877,5 @@ end;
{$ENDREGION} {$ENDREGION}
initialization initialization
registerClasses([TCEPersistentShortcut, TCEPersistentMainShortcuts]); registerClasses([TCEPersistentMainShortcuts]);
end. end.