diff -Nru cqrprop-0.0.2/debian/changelog cqrprop-0.0.3/debian/changelog --- cqrprop-0.0.2/debian/changelog 2016-08-05 15:22:10.000000000 +0000 +++ cqrprop-0.0.3/debian/changelog 2016-11-20 15:53:43.000000000 +0000 @@ -1,4 +1,10 @@ -cqrprop (0.0.2-1~trusty) trusty; urgency=low +cqrprop (0.0.3-1~trusty) trusty; urgency=low + + * configurable delay before first image download added + + -- Petr Hlozek Sun, 20 Nov 2016 16:37:00 +0100 + +cqrprop (0.0.2-1) unstable; urgency=low * the old image is diplayed when new is downloaded * window position is saved after the end of move diff -Nru cqrprop-0.0.2/src/cqrprop.lpi cqrprop-0.0.3/src/cqrprop.lpi --- cqrprop-0.0.2/src/cqrprop.lpi 2016-08-05 15:20:33.000000000 +0000 +++ cqrprop-0.0.3/src/cqrprop.lpi 2016-11-20 15:48:48.000000000 +0000 @@ -33,7 +33,7 @@ - + @@ -79,6 +79,10 @@ + + + + diff -Nru cqrprop-0.0.2/src/cqrprop.lpr cqrprop-0.0.3/src/cqrprop.lpr --- cqrprop-0.0.2/src/cqrprop.lpr 2016-08-05 15:20:33.000000000 +0000 +++ cqrprop-0.0.3/src/cqrprop.lpr 2016-11-20 15:48:48.000000000 +0000 @@ -7,7 +7,8 @@ cthreads, {$ENDIF} Interfaces, // this includes the LCL widgetset - Forms, fMainFormHidden, fCommon, fShowPropForm, fAbout, fOptions, dUtils + Forms, fMainFormHidden, fCommon, fShowPropForm, fAbout, fOptions, dUtils, + uVersion { you can add units after this }; {$R *.res} diff -Nru cqrprop-0.0.2/src/fOptions.lfm cqrprop-0.0.3/src/fOptions.lfm --- cqrprop-0.0.2/src/fOptions.lfm 2016-08-05 15:20:33.000000000 +0000 +++ cqrprop-0.0.3/src/fOptions.lfm 2016-11-20 15:48:48.000000000 +0000 @@ -2,19 +2,19 @@ Left = 678 Height = 230 Top = 390 - Width = 525 + Width = 597 BorderStyle = bsDialog Caption = 'Options' ClientHeight = 230 - ClientWidth = 525 + ClientWidth = 597 Position = poDesktopCenter object GroupBox1: TGroupBox[0] Left = 16 Height = 128 Top = 8 - Width = 401 + Width = 456 ClientHeight = 124 - ClientWidth = 397 + ClientWidth = 452 TabOrder = 0 object Label1: TLabel Left = 16 @@ -45,16 +45,16 @@ end object GroupBox2: TGroupBox[1] Left = 16 - Height = 64 - Top = 152 - Width = 401 - ClientHeight = 60 - ClientWidth = 397 + Height = 75 + Top = 139 + Width = 456 + ClientHeight = 71 + ClientWidth = 452 TabOrder = 1 object Label2: TLabel Left = 16 Height = 17 - Top = 18 + Top = 6 Width = 141 Caption = 'Refresh image every ' ParentColor = False @@ -62,34 +62,59 @@ object edtRefreshTime: TSpinEdit Left = 166 Height = 27 - Top = 13 + Top = 2 Width = 74 MinValue = 2 TabOrder = 0 Value = 2 end object Label3: TLabel - Left = 251 + Left = 256 Height = 17 - Top = 18 + Top = 6 Width = 56 Caption = 'minutes' ParentColor = False end + object Label4: TLabel + Left = 16 + Height = 17 + Top = 45 + Width = 32 + Caption = 'Wait' + ParentColor = False + end + object edtWaitTime: TSpinEdit + Left = 64 + Height = 27 + Top = 40 + Width = 74 + MinValue = 2 + TabOrder = 1 + Value = 2 + end + object Label5: TLabel + Left = 152 + Height = 17 + Top = 45 + Width = 283 + Caption = 'seconds before the first image download' + ParentColor = False + end end object btnOK: TButton[2] - Left = 432 + Left = 496 Height = 29 - Top = 8 + Top = 16 Width = 80 Caption = '&OK' OnClick = btnOKClick TabOrder = 2 end object btnCancel: TButton[3] - Left = 432 + Left = 496 Height = 29 - Top = 48 + Top = 56 Width = 80 Cancel = True Caption = 'Cancel' diff -Nru cqrprop-0.0.2/src/fOptions.pas cqrprop-0.0.3/src/fOptions.pas --- cqrprop-0.0.2/src/fOptions.pas 2016-08-05 15:20:33.000000000 +0000 +++ cqrprop-0.0.3/src/fOptions.pas 2016-11-20 15:48:48.000000000 +0000 @@ -18,11 +18,14 @@ btnCancel : TButton; edtDownloadLink : TEdit; edtRefreshTime : TSpinEdit; + edtWaitTime : TSpinEdit; GroupBox1 : TGroupBox; GroupBox2 : TGroupBox; Label1 : TLabel; Label2 : TLabel; Label3 : TLabel; + Label4 : TLabel; + Label5 : TLabel; procedure btnOKClick(Sender : TObject); procedure btnOpenWebClick(Sender : TObject); procedure FormShow(Sender: TObject); @@ -49,7 +52,8 @@ ini := TIniFile.Create(dmUtils.GetAppConfigFileName); try edtDownloadLink.Text := ini.ReadString('App', 'DownloadLink', 'http://www.hamqsl.com/solar2.php'); - edtRefreshTime.Value := ini.ReadInteger('App', 'RefreshTime', 5) + edtRefreshTime.Value := ini.ReadInteger('App', 'RefreshTime', 5); + edtWaitTime.Value := ini.ReadInteger('App', 'WaitTime', 2) finally FreeAndNil(ini) end @@ -63,7 +67,8 @@ try ini.CacheUpdates := False; ini.WriteString('App', 'DownloadLink', edtDownloadLink.Text); - ini.WriteInteger('App', 'RefreshTime', edtRefreshTime.Value) + ini.WriteInteger('App', 'RefreshTime', edtRefreshTime.Value); + ini.WriteInteger('App', 'WaitTime', edtWaitTime.Value) finally ini.UpdateFile; FreeAndNil(ini) diff -Nru cqrprop-0.0.2/src/fShowPropForm.lfm cqrprop-0.0.3/src/fShowPropForm.lfm --- cqrprop-0.0.2/src/fShowPropForm.lfm 2016-08-05 15:20:33.000000000 +0000 +++ cqrprop-0.0.3/src/fShowPropForm.lfm 2016-11-20 15:48:48.000000000 +0000 @@ -84,4 +84,10 @@ left = 64 top = 192 end + object tmrWait: TTimer[4] + Enabled = False + OnTimer = tmrWaitTimer + left = 64 + top = 256 + end end diff -Nru cqrprop-0.0.2/src/fShowPropForm.pas cqrprop-0.0.3/src/fShowPropForm.pas --- cqrprop-0.0.2/src/fShowPropForm.pas 2016-08-05 15:20:33.000000000 +0000 +++ cqrprop-0.0.3/src/fShowPropForm.pas 2016-11-20 15:48:48.000000000 +0000 @@ -27,6 +27,7 @@ MenuItem7 : TMenuItem; pnlInfo : TPanel; popMenu : TPopupMenu; + tmrWait : TTimer; tmrImageDownload : TTimer; procedure acAboutExecute(Sender : TObject); procedure acCloseExecute(Sender : TObject); @@ -41,11 +42,13 @@ procedure imgPropMouseUp(Sender : TObject; Button : TMouseButton; Shift : TShiftState; X, Y : Integer); procedure tmrImageDownloadTimer(Sender : TObject); + procedure tmrWaitTimer(Sender : TObject); private OldX, OldY : Integer; FormMoving : Boolean; function GetTimerInterval : Integer; + function GetWaitInterval : Integer; public ImageFileName : String; ImageFile : TFileStream; @@ -174,9 +177,9 @@ ShowInTaskBar := stNever; ImageFile := nil; - tmrImageDownload.Interval := GetTimerInterval; - tmrImageDownload.Enabled := True; - acRefresh.Execute + pnlInfo.Caption := 'Waiting...'; + tmrWait.Interval := GetWaitInterval; + tmrWait.Enabled := True end; procedure TfrmShowPropForm.FormClose(Sender: TObject; var CloseAction: TCloseAction); @@ -222,6 +225,15 @@ acRefresh.Execute end; +procedure TfrmShowPropForm.tmrWaitTimer(Sender : TObject); +begin + tmrWait.Enabled := False; + pnlInfo.Caption := ''; + tmrImageDownload.Interval := GetTimerInterval; + tmrImageDownload.Enabled := True; + acRefresh.Execute +end; + function TfrmShowPropForm.GetTimerInterval : Integer; var ini : TIniFile; @@ -232,6 +244,18 @@ finally FreeAndNil(ini) end +end; + +function TfrmShowPropForm.GetWaitInterval : Integer; +var + ini : TIniFile; +begin + ini := TIniFile.Create(dmUtils.GetAppConfigFileName); + try + Result := ini.ReadInteger('App', 'WaitTime', 2) * 1000 //in miliseconds + finally + FreeAndNil(ini) + end end; procedure TfrmShowPropForm.SynShowImage; diff -Nru cqrprop-0.0.2/src/uVersion.pas cqrprop-0.0.3/src/uVersion.pas --- cqrprop-0.0.2/src/uVersion.pas 2016-08-05 15:20:33.000000000 +0000 +++ cqrprop-0.0.3/src/uVersion.pas 2016-11-20 15:48:48.000000000 +0000 @@ -4,12 +4,12 @@ interface const - cVERSION = '0.0.2 (001)'; + cVERSION = '0.0.3 (001)'; cMAJOR = 0; cMINOR = 0; - cRELEAS = 2; + cRELEAS = 3; cBUILD = 1; - cBUILD_DATE = '2016-08-05'; + cBUILD_DATE = '2016-11-20'; implementation diff -Nru cqrprop-0.0.2/tools/new_version cqrprop-0.0.3/tools/new_version --- cqrprop-0.0.2/tools/new_version 2016-08-05 15:20:33.000000000 +0000 +++ cqrprop-0.0.3/tools/new_version 2016-11-20 15:48:48.000000000 +0000 @@ -1,9 +1,9 @@ #!/bin/bash -VERSION=0.0.2 +VERSION=0.0.3 # cqrprop version -FINAL=/home/ok2cqr/projects/final_cqrprop/ +FINAL=$HOME/projects/final_cqrprop/ #whre would you like to store final build files #**************************************** diff -Nru cqrprop-0.0.2/tools/new_version_local cqrprop-0.0.3/tools/new_version_local --- cqrprop-0.0.2/tools/new_version_local 2016-08-05 15:20:33.000000000 +0000 +++ cqrprop-0.0.3/tools/new_version_local 2016-11-20 15:48:48.000000000 +0000 @@ -1,9 +1,9 @@ #!/bin/bash -VERSION=0.0.2 +VERSION=0.0.3 # cqrprop version -FINAL=/home/ok2cqr/projects/final_cqrprop/ +FINAL=$HOME/projects/final_cqrprop/ #whre would you like to store final build files #**************************************** @@ -21,14 +21,14 @@ echo cqrprop_"$VERSION"_$ARCH.tar.gz -cd /home/ok2cqr/projects/cqrprop +cd $HOME/projects/cqrprop make clean mkdir $CTMP/cqrprop-$VERSION -p mkdir $FINAL -p cd $CTMP mkdir cqrprop-$VERSION -cp -r /home/ok2cqr/projects/cqrprop/* cqrprop-$VERSION +cp -r $HOME/projects/cqrprop/* cqrprop-$VERSION tar -cvzf cqrprop_$VERSION.orig.tar.gz --exclude='debian' --exclude='.git' cqrprop-$VERSION cd cqrprop-$VERSION