Skip to content

Commit fb6818b

Browse files
author
delphidabbler
committed
Remove unused ShowPrefsPage and SetShowPrefsPageAction from notifier
Also removed fShowPrefsPageAction and reference to unused UShowPrefsPageAction unit
1 parent f0ae1c4 commit fb6818b

File tree

2 files changed

+6
-42
lines changed

2 files changed

+6
-42
lines changed

Src/IntfNotifier.pas

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ interface
8080
/// <summary>Displays the program's About Box.</summary>
8181
procedure ShowAboutBox;
8282

83-
/// <summary>Displays the Preferences dialogue box containing the specified
84-
/// page.</summary>
85-
/// <param name="ClsName">string [in] Class name of the frame that
86-
/// implements the required preferences page.</param>
87-
procedure ShowPrefsPage(const ClsName: string);
8883
end;
8984

9085
type
@@ -149,10 +144,6 @@ interface
149144
/// <param name="Action">TBasicAction [in] Required action.</param>
150145
procedure SetAboutBoxAction(const Action: TBasicAction);
151146

152-
/// <summary>Sets action used to display a given page of the Preferences
153-
/// dialogue box.</summary>
154-
/// <param name="Action">TBasicAction [in] Required action.</param>
155-
procedure SetShowPrefsPageAction(const Action: TBasicAction);
156147
end;
157148

158149
type

Src/UNotifier.pas

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ TNotifier = class(TInterfacedObject, INotifier, ISetActions)
6464
fNewsAction: TBasicAction;
6565
/// <summary>Action that causes About box to be displayed.</summary>
6666
fAboutBoxAction: TBasicAction;
67-
/// <summary>Action that displays a specified page in the preferences
68-
/// dialogue box.</summary>
69-
fShowPrefsPageAction: TBasicAction;
7067

7168
public
7269

@@ -136,13 +133,6 @@ TNotifier = class(TInterfacedObject, INotifier, ISetActions)
136133
/// <remarks>Methods of INotifier.</remarks>
137134
procedure ShowAboutBox;
138135

139-
/// <summary>Displays the Preferences dialogue box containing the specified
140-
/// page.</summary>
141-
/// <param name="ClsName">string [in] Class name of the frame that
142-
/// implements the required preferences page.</param>
143-
/// <remarks>Method of INotifier.</remarks>
144-
procedure ShowPrefsPage(const ClsName: string);
145-
146136
/// <summary>Sets action used to request a database update.</summary>
147137
/// <param name="Action">TBasicAction [in] Required action.</param>
148138
/// <remarks>Methods of ISetActions.</remarks>
@@ -210,11 +200,6 @@ TNotifier = class(TInterfacedObject, INotifier, ISetActions)
210200
/// <remarks>Methods of ISetActions.</remarks>
211201
procedure SetAboutBoxAction(const Action: TBasicAction);
212202

213-
/// <summary>Sets action used to display a given page of the Preferences
214-
/// dialogue box.</summary>
215-
/// <param name="Action">TBasicAction [in] Required action.</param>
216-
/// <remarks>Method of ISetActions.</remarks>
217-
procedure SetShowPrefsPageAction(const Action: TBasicAction);
218203
end;
219204

220205

@@ -225,8 +210,12 @@ implementation
225210
// Delphi
226211
SysUtils, StdActns,
227212
// Project
228-
Compilers.UGlobals, UCategoryAction, UDetailTabAction, UEditSnippetAction,
229-
UShowPrefsPageAction, USnippetAction, UViewItemAction;
213+
Compilers.UGlobals,
214+
UCategoryAction,
215+
UDetailTabAction,
216+
UEditSnippetAction,
217+
USnippetAction,
218+
UViewItemAction;
230219

231220

232221
{ TNotifier }
@@ -356,13 +345,6 @@ procedure TNotifier.SetOverviewStyleChangeActions(
356345
fOverviewStyleChangeActions[Idx] := Actions[Idx];
357346
end;
358347

359-
procedure TNotifier.SetShowPrefsPageAction(const Action: TBasicAction);
360-
begin
361-
Assert(Action is TShowPrefsPageAction, ClassName
362-
+ '.SetShowPreferencesAction: Action is not TShowPrefsPageAction');
363-
fShowPrefsPageAction := Action;
364-
end;
365-
366348
procedure TNotifier.SetShowViewItemAction(const Action: TBasicAction);
367349
begin
368350
fShowViewItemAction := Action;
@@ -386,15 +368,6 @@ procedure TNotifier.ShowNews;
386368
fNewsAction.Execute;
387369
end;
388370

389-
procedure TNotifier.ShowPrefsPage(const ClsName: string);
390-
begin
391-
if Assigned(fShowPrefsPageAction) then
392-
begin
393-
(fShowPrefsPageAction as TShowPrefsPageAction).FrameClassName := ClsName;
394-
fShowPrefsPageAction.Execute;
395-
end;
396-
end;
397-
398371
procedure TNotifier.ShowViewItem(ViewItem: IView; const NewTab: Boolean);
399372
begin
400373
if Assigned(fShowViewItemAction) then

0 commit comments

Comments
 (0)