renamed persistent shortcut item class

This commit is contained in:
Basile Burg 2015-05-13 03:53:14 +02:00
parent bdb39e50f1
commit c9f5b7985f
1 changed files with 7 additions and 7 deletions

View File

@ -287,7 +287,7 @@ type
procedure UpdateDockCaption(Exclude: TControl = nil); override; procedure UpdateDockCaption(Exclude: TControl = nil); override;
end; end;
TCEPersistentMainShortcut = class(TCollectionItem) TCEPersistentShortcut = class(TCollectionItem)
private private
fShortcut: TShortCut; fShortcut: TShortCut;
fActionName: string; fActionName: string;
@ -336,7 +336,7 @@ uses
constructor TCEPersistentMainShortcuts.create(aOwner: TComponent); constructor TCEPersistentMainShortcuts.create(aOwner: TComponent);
begin begin
inherited; inherited;
fCol := TCollection.Create(TCEPersistentMainShortcut); fCol := TCollection.Create(TCEPersistentShortcut);
end; end;
destructor TCEPersistentMainShortcuts.destroy; destructor TCEPersistentMainShortcuts.destroy;
@ -352,7 +352,7 @@ end;
procedure TCEPersistentMainShortcuts.assign(aValue: TPersistent); procedure TCEPersistentMainShortcuts.assign(aValue: TPersistent);
var var
itm: TCEPersistentMainShortcut; itm: TCEPersistentShortcut;
i: Integer; i: Integer;
begin begin
fCol.Clear; fCol.Clear;
@ -361,7 +361,7 @@ begin
begin begin
if CEMainForm.Actions.Actions[i].Owner <> CEMainForm then if CEMainForm.Actions.Actions[i].Owner <> CEMainForm then
continue; continue;
itm := TCEPersistentMainShortcut(fCol.Add); itm := TCEPersistentShortcut(fCol.Add);
itm.shortcut := TAction(CEMainForm.Actions.Actions[i]).Shortcut; itm.shortcut := TAction(CEMainForm.Actions.Actions[i]).Shortcut;
itm.actionName := CEMainForm.Actions.Actions[i].Name; itm.actionName := CEMainForm.Actions.Actions[i].Name;
end end
@ -370,13 +370,13 @@ end;
procedure TCEPersistentMainShortcuts.assignTo(aValue: TPersistent); procedure TCEPersistentMainShortcuts.assignTo(aValue: TPersistent);
var var
itm: TCEPersistentMainShortcut; itm: TCEPersistentShortcut;
i, j: Integer; i, j: Integer;
begin begin
if aValue = CEMainForm then if aValue = CEMainForm then
for i:= 0 to fCol.Count-1 do for i:= 0 to fCol.Count-1 do
begin begin
itm := TCEPersistentMainShortcut(fCol.Items[i]); itm := TCEPersistentShortcut(fCol.Items[i]);
for j := 0 to CEMainForm.Actions.ActionCount-1 do for j := 0 to CEMainForm.Actions.ActionCount-1 do
if CEMainForm.Actions.Actions[i].Name = itm.actionName then if CEMainForm.Actions.Actions[i].Name = itm.actionName then
begin begin
@ -1886,5 +1886,5 @@ end;
{$ENDREGION} {$ENDREGION}
initialization initialization
registerClasses([TCEPersistentMainShortcut, TCEPersistentMainShortcuts]); registerClasses([TCEPersistentShortcut, TCEPersistentMainShortcuts]);
end. end.