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);
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.
*)
@ -196,7 +208,8 @@ type
(**
* Returns the common folder of the file names stored in aList
*)
function commonFolder(const someFiles: TStringList): string;
function commonFolder(const someFiles: TStringList): string;
implementation
@ -890,6 +903,7 @@ end;
initialization
dExtList := TStringList.Create;
dExtList.AddStrings(['.d', '.D', '.di', '.DI', '.Di', '.dI', '.dd', '.DD']);
registerClasses([TCEPersistentShortcut]);
finalization
dExtList.Free;
end.

View File

@ -287,15 +287,6 @@ type
procedure UpdateDockCaption(Exclude: TControl = nil); override;
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)
private
fCol: TCollection;
@ -1886,5 +1877,5 @@ end;
{$ENDREGION}
initialization
registerClasses([TCEPersistentShortcut, TCEPersistentMainShortcuts]);
registerClasses([TCEPersistentMainShortcuts]);
end.