Explorar o código

UPD: Remove fpc < 2.6 specific code

Alexander Koblov %!s(int64=11) %!d(string=hai) anos
pai
achega
969a54eb3f
Modificáronse 2 ficheiros con 2 adicións e 51 borrados
  1. 1 24
      src/fdiffer.pas
  2. 1 27
      src/fviewer.pas

+ 1 - 24
src/fdiffer.pas

@@ -229,16 +229,10 @@ type
     procedure SynDiffEditLeftStatusChange(Sender: TObject; Changes: TSynStatusChanges);
     procedure SynDiffEditRightStatusChange(Sender: TObject; Changes: TSynStatusChanges);
 
-    property Commands: TFormCommands read FCommands{$IF FPC_FULLVERSION >= 020501} implements IFormCommands{$ENDIF};
+    property Commands: TFormCommands read FCommands implements IFormCommands;
   public
     constructor Create(TheOwner: TComponent); override;
     destructor Destroy; override;
-    {$IF FPC_FULLVERSION < 020501}
-    // "implements" does not work in FPC < 2.5.1
-    function ExecuteCommand(Command: string; const Params: array of string): TCommandFuncResult;
-    function GetCommandCaption(Command: String; CaptionType: TCommandCaptionType): String;
-    procedure GetCommandsList(List: TStrings);
-    {$ENDIF}
   published
     procedure cm_CopyLeftToRight(const Params: array of string);
     procedure cm_CopyRightToLeft(const Params: array of string);
@@ -1160,23 +1154,6 @@ begin
     end;
 end;
 
-{$IF FPC_FULLVERSION < 020501}
-function TfrmDiffer.ExecuteCommand(Command: string; const Params: array of string): TCommandFuncResult;
-begin
-  Result := FCommands.ExecuteCommand(Command, Params);
-end;
-
-function TfrmDiffer.GetCommandCaption(Command: String; CaptionType: TCommandCaptionType): String;
-begin
-  Result := FCommands.GetCommandCaption(Command, CaptionType);
-end;
-
-procedure TfrmDiffer.GetCommandsList(List: TStrings);
-begin
-  FCommands.GetCommandsList(List);
-end;
-{$ENDIF}
-
 initialization
   TFormCommands.RegisterCommandsForm(TfrmDiffer, HotkeysCategory, @rsHotkeyCategoryDiffer);
 

+ 1 - 27
src/fviewer.pas

@@ -273,7 +273,7 @@ type
     procedure SaveImageAs (Var sExt: String; senderSave: boolean; Quality: integer);
     procedure CreatePreview(FullPathToFile:string; index:integer; delete: boolean = false);
 
-    property Commands: TFormCommands read FCommands{$IF FPC_FULLVERSION >= 020501} implements IFormCommands{$ENDIF};
+    property Commands: TFormCommands read FCommands implements IFormCommands;
 
   public
     constructor Create(TheOwner: TComponent; aFileSource: IFileSource; aQuickView: Boolean = False); overload;
@@ -284,13 +284,6 @@ type
     procedure LoadFile(iIndex:Integer);
     procedure ExitPluginMode;
 
-    {$IF FPC_FULLVERSION < 020501}
-    // "implements" does not work in FPC < 2.5.1
-    function ExecuteCommand(Command: string; const Params: array of string): TCommandFuncResult;
-    function GetCommandCaption(Command: String; CaptionType: TCommandCaptionType): String;
-    procedure GetCommandsList(List: TStrings);
-    {$ENDIF}
-
   published
     // Commands for hotkey manager
     procedure cm_About(const Params: array of string);
@@ -2161,25 +2154,6 @@ begin
   end;
 end;
 
-// Commands for hotkey manager
-
-{$IF FPC_FULLVERSION < 020501}
-function TfrmViewer.ExecuteCommand(Command: string; const Params: array of string): TCommandFuncResult;
-begin
-  Result := FCommands.ExecuteCommand(Command, Params);
-end;
-
-function TfrmViewer.GetCommandCaption(Command: String; CaptionType: TCommandCaptionType): String;
-begin
-  Result := FCommands.GetCommandCaption(Command, CaptionType);
-end;
-
-procedure TfrmViewer.GetCommandsList(List: TStrings);
-begin
-  FCommands.GetCommandsList(List);
-end;
-{$ENDIF}
-
 procedure TfrmViewer.cm_About(const Params: array of string);
 begin
   miAbout2Click(Self);