diff --git a/components/pochecker/pocheckerconsts.pas b/components/pochecker/pocheckerconsts.pas index 685db5d182..d19f4ff883 100644 --- a/components/pochecker/pocheckerconsts.pas +++ b/components/pochecker/pocheckerconsts.pas @@ -24,8 +24,7 @@ resourcestring sTotalErrors = 'Total errors found: %d'; sTotalWarnings = 'Total warnings found: %d'; sNoErrorsFound = 'No errors found'; - sCurrentTest = 'Current Test:'; - sCurrentPoFile = 'Current po-file:'; + sCurrentTest = 'Test: %s on %s'; sNoTestSelected = 'There are no tests selected.'; //Result form diff --git a/components/pochecker/pocheckermain.lfm b/components/pochecker/pocheckermain.lfm index 25ffc6ee44..97ded97866 100644 --- a/components/pochecker/pocheckermain.lfm +++ b/components/pochecker/pocheckermain.lfm @@ -103,66 +103,10 @@ object PoCheckerForm: TPoCheckerForm OnClick = RunBtnClick TabOrder = 2 end - object StatusPanel: TPanel - Left = 0 - Height = 49 - Top = 293 - Width = 581 - Align = alBottom - BevelOuter = bvLowered - ClientHeight = 49 - ClientWidth = 581 - TabOrder = 3 - object CurTestHeaderLabel: TLabel - Left = 8 - Height = 15 - Top = 8 - Width = 68 - Caption = 'Current Test:' - ParentColor = False - end - object CurPoHeaderLabel: TLabel - AnchorSideLeft.Control = CurTestHeaderLabel - AnchorSideTop.Control = CurTestHeaderLabel - AnchorSideTop.Side = asrBottom - Left = 8 - Height = 15 - Top = 23 - Width = 81 - Caption = 'Current po-file:' - ParentColor = False - end - object CurTestLabel: TLabel - AnchorSideLeft.Control = CurTestHeaderLabel - AnchorSideLeft.Side = asrBottom - AnchorSideTop.Control = CurTestHeaderLabel - AnchorSideTop.Side = asrCenter - Left = 82 - Height = 15 - Top = 8 - Width = 69 - BorderSpacing.Around = 6 - Caption = 'CurTestLabel' - ParentColor = False - end - object CurPoLabel: TLabel - AnchorSideLeft.Control = CurPoHeaderLabel - AnchorSideLeft.Side = asrBottom - AnchorSideTop.Control = CurPoHeaderLabel - AnchorSideTop.Side = asrCenter - Left = 95 - Height = 15 - Top = 23 - Width = 61 - BorderSpacing.Around = 6 - Caption = 'CurPoLabel' - ParentColor = False - end - end object NoErrLabel: TLabel Left = 8 Height = 25 - Top = 262 + Top = 280 Width = 146 Anchors = [akLeft, akBottom] Caption = 'No errors found' @@ -182,7 +126,7 @@ object PoCheckerForm: TPoCheckerForm Width = 156 BorderSpacing.Top = 6 Caption = 'Find all translated PO files' - TabOrder = 4 + TabOrder = 3 end object SelectBasicBtn: TButton AnchorSideLeft.Control = TestListBox @@ -196,7 +140,7 @@ object PoCheckerForm: TPoCheckerForm Caption = 'Select Basic Tests' Enabled = False OnClick = SelectBasicBtnClick - TabOrder = 5 + TabOrder = 4 end object SelectAllBtn: TButton AnchorSideLeft.Control = SelectBasicBtn @@ -210,7 +154,7 @@ object PoCheckerForm: TPoCheckerForm Caption = 'Select All Tests' Enabled = False OnClick = SelectAllBtnClick - TabOrder = 6 + TabOrder = 5 end object UnselectAllBtn: TButton AnchorSideLeft.Control = SelectAllBtn @@ -224,7 +168,7 @@ object PoCheckerForm: TPoCheckerForm Caption = 'Unselect All Tests' Enabled = False OnClick = UnselectAllBtnClick - TabOrder = 7 + TabOrder = 6 end object IgnoreFuzzyCheckBox: TCheckBox AnchorSideLeft.Control = TestListBox @@ -236,7 +180,14 @@ object PoCheckerForm: TPoCheckerForm Width = 152 BorderSpacing.Top = 6 Caption = 'sIgnoreFuzzyTranslations' - TabOrder = 8 + TabOrder = 7 + end + object StatusBar: TStatusBar + Left = 0 + Height = 23 + Top = 319 + Width = 581 + Panels = <> end object OpenDialog: TOpenDialog Filter = 'po-files (*.po)|*.po|all files|*' diff --git a/components/pochecker/pocheckermain.pp b/components/pochecker/pocheckermain.pp index a690419814..8a412f34ba 100644 --- a/components/pochecker/pocheckermain.pp +++ b/components/pochecker/pocheckermain.pp @@ -25,7 +25,7 @@ interface uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, - StdCtrls, LCLProc, CheckLst, Buttons, ExtCtrls, + StdCtrls, LCLProc, CheckLst, Buttons, ExtCtrls, ComCtrls, {$IFDEF POCHECKERSTANDALONE} Translations, {$ELSE} @@ -38,6 +38,7 @@ type { TPoCheckerForm } TPoCheckerForm = class(TForm) + StatusBar: TStatusBar; private PoFamily: TPoFamily; FSelectedPoName: String; @@ -53,7 +54,7 @@ type function TrySelectFile(out Filename: String): Boolean; function TryCreatePoFamily(Filename: String): Boolean; procedure RunSelectedTests; - procedure ClearAndDisableStatusPanel; + procedure ClearStatusBar; procedure SetSelectedPoName(AFilename: String); procedure LoadConfig; procedure SaveConfig; @@ -63,12 +64,7 @@ type SelectAllBtn: TButton; SelectBasicBtn: TButton; FindAllPOsCheckBox: TCheckBox; - CurTestHeaderLabel: TLabel; - CurPoHeaderLabel: TLabel; - CurTestLabel: TLabel; - CurPoLabel: TLabel; NoErrLabel: TLabel; - StatusPanel: TPanel; RunBtn: TBitBtn; OpenBtn: TBitBtn; Button3: TButton; @@ -93,6 +89,7 @@ implementation {$R *.lfm} + procedure ShowPoCheckerForm(); begin if not Assigned(PoCheckerForm) then @@ -136,10 +133,8 @@ begin RunBtn.Caption := sRunSelectedTests; NoErrLabel.Caption := sNoErrorsFound; FillTestListBox; - ClearAndDisableStatusPanel; + ClearStatusBar; NoErrLabel.Visible := False; - CurTestHeaderLabel.Caption := sCurrentTest; - CurPoHeaderLabel.Caption := sCurrentPoFile; SelectAllBtn.Caption := sSelectAllTests; SelectBasicBtn.Caption := sSelectBasicTests; UnselectAllBtn.Caption := sUnselectAllTests; @@ -206,8 +201,8 @@ end; procedure TPoCheckerForm.OnTestStart(const ATestName, APoFileName: string); begin //debugln('OnTestStart: ATestName = "',AtestName,'" APoFileName = "',APoFileName); - CurTestLabel.Caption := ATestName; - CurPoLabel.Caption := APoFileName; + StatusBar.SimplePanel := True; + StatusBar.SimpleText := Format('Test: %s on %s',[ATestName,APoFileName]); Application.ProcessMessages; end; @@ -393,7 +388,6 @@ begin SL := TStringList.Create; mr := mrNone; try - StatusPanel.Enabled := True; if (not (ptoFindAllChildren in TestOptions)) and Assigned(PoFamily.Child) and (PoFamily.ChildName <> FSelectedPoName) then PoFamily.ChildName := FSelectedPoName; @@ -422,17 +416,15 @@ begin finally if Assigned(SL) then SL.Free; - ClearAndDisableStatusPanel; + ClearStatusBar; end; if mr = mrOpenEditorFile then WindowState:= wsMinimized; end; -procedure TPoCheckerForm.ClearAndDisableStatusPanel; +procedure TPoCheckerForm.ClearStatusBar; begin - CurTestLabel.Caption := ''; - CurPoLabel.Caption := ''; - StatusPanel.Enabled := False; + StatusBar.SimpleText := ''; end; procedure TPoCheckerForm.SetSelectedPoName(AFilename: String);