Skip to content

Commit

Permalink
Merge pull request #8 from Arandusoft/development
Browse files Browse the repository at this point in the history
Fixes related to idle timer
  • Loading branch information
lainz committed May 15, 2018
2 parents c2a7329 + 9a193c3 commit 70ce3e3
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 19 deletions.
13 changes: 9 additions & 4 deletions i18n/paymowidget.es.po
Expand Up @@ -13,19 +13,19 @@ msgstr ""

#: tfrmidletime.btndiscardidletime.caption
msgid "Discard Idle Time"
msgstr "Descartar Tiempo Inactivo"
msgstr ""

#: tfrmidletime.btnkeepidletime.caption
msgid "Keep Idle Time"
msgstr "Mantener Tiempo Inactivo"
msgstr ""

#: tfrmidletime.caption
msgid "Idle Time Alert"
msgstr "Alerta de Tiempo Inactivo"
msgstr ""

#: tfrmidletime.lbldescription1.caption
msgid "You've been idle:"
msgstr "Has estado inactivo:"
msgstr ""

#: tfrmidletime.lbldescription2.caption
msgid "00:00"
Expand Down Expand Up @@ -267,10 +267,14 @@ msgid "Users"
msgstr "Usuarios"

#: tfrmuserlist.listview1.columns[0].caption
#, fuzzy
#| msgid "Name"
msgid "Name"
msgstr "Nombre"

#: tfrmuserlist.listview1.columns[1].caption
#, fuzzy
#| msgid "Task"
msgctxt "tfrmuserlist.listview1.columns[1].caption"
msgid "Task"
msgstr "Tarea"
Expand Down Expand Up @@ -409,3 +413,4 @@ msgstr "trabajando en"
#: uresourcestring.rsyesterday
msgid "YESTERDAY"
msgstr "AYER"

10 changes: 8 additions & 2 deletions paymowidget.lpi
Expand Up @@ -22,7 +22,7 @@
<VersionInfo>
<UseVersionInfo Value="True"/>
<MajorVersionNr Value="1"/>
<RevisionNr Value="13"/>
<RevisionNr Value="14"/>
<StringTable CompanyName="Arandusoft"/>
</VersionInfo>
<BuildModes Count="10">
Expand Down Expand Up @@ -462,7 +462,7 @@
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="4">
<Exceptions Count="6">
<Item1>
<Name Value="EAbort"/>
</Item1>
Expand All @@ -475,6 +475,12 @@
<Item4>
<Name Value="EFCreateError"/>
</Item4>
<Item5>
<Name Value="ERangeError"/>
</Item5>
<Item6>
<Name Value="RunError(201)"/>
</Item6>
</Exceptions>
</Debugging>
</CONFIG>
2 changes: 1 addition & 1 deletion setup_win32.iss
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "FPC Paymo Widget"
#define MyAppVersion "1.0.13"
#define MyAppVersion "1.0.14"
#define MyAppPublisher "Arandú Software"
#define MyAppURL "http://www.arandusoft.com/"
#define MyAppExeName "paymowidget.exe"
Expand Down
6 changes: 5 additions & 1 deletion uidletime.pas
Expand Up @@ -55,7 +55,11 @@ procedure TfrmIdleTime.FormShow(Sender: TObject);

procedure TfrmIdleTime.UpdateDisplay;
begin
lblDescription2.Caption := TTaskList.SecondsToHHMMSS(SecondsBetween(now, first_idle));
try
lblDescription2.Caption := TTaskList.SecondsToHHMMSS(SecondsBetween(now, first_idle));
except
//lblDescription2.Caption := 'ERROR!';
end;
end;

procedure TfrmIdleTime.btnDiscardIdleTimeClick(Sender: TObject);
Expand Down
16 changes: 8 additions & 8 deletions umain.lfm
Expand Up @@ -442,7 +442,7 @@ object frmMain: TfrmMain
Left = 16
Height = 23
Top = 64
Width = 156
Width = 160
Caption = 'Show time in app icon'
Font.Height = 19
Font.Name = 'Nunito Sans'
Expand All @@ -462,8 +462,8 @@ object frmMain: TfrmMain
EditLabel.AnchorSideRight.Side = asrBottom
EditLabel.AnchorSideBottom.Control = leAPIURL
EditLabel.Left = 16
EditLabel.Height = 16
EditLabel.Top = 101
EditLabel.Height = 15
EditLabel.Top = 102
EditLabel.Width = 224
EditLabel.Caption = 'API URL'
EditLabel.ParentColor = False
Expand Down Expand Up @@ -542,7 +542,7 @@ object frmMain: TfrmMain
Left = 16
Height = 19
Top = 160
Width = 198
Width = 201
Caption = 'Refresh data interval (in seconds)'
Font.Height = 19
ParentColor = False
Expand Down Expand Up @@ -573,7 +573,7 @@ object frmMain: TfrmMain
end
object edSearch: TEdit
Left = 0
Height = 24
Height = 23
Top = 70
Width = 456
Align = alTop
Expand All @@ -583,7 +583,7 @@ object frmMain: TfrmMain
object TabControl1: TTabControl
Left = 0
Height = 250
Top = 94
Top = 93
Width = 456
OnChange = TabControl1Change
TabIndex = 0
Expand Down Expand Up @@ -613,7 +613,7 @@ object frmMain: TfrmMain
Left = 38
Height = 16
Top = 24
Width = 34
Width = 38
Caption = 'Project'
Font.Color = 4805637
Font.Height = 16
Expand Down Expand Up @@ -642,7 +642,7 @@ object frmMain: TfrmMain
Left = 99
Height = 53
Top = 128
Width = 154
Width = 156
Caption = '00:00:00'
Font.Color = clWhite
Font.Height = 53
Expand Down
15 changes: 12 additions & 3 deletions umain.pas
Expand Up @@ -229,7 +229,7 @@ procedure TfrmMain.FormCreate(Sender: TObject);
begin
try
timerRefresh.Enabled := True;
timerRefreshTimer(self);
//timerRefreshTimer(self);
except
end;
end;
Expand Down Expand Up @@ -539,6 +539,7 @@ procedure TfrmMain.FormShow(Sender: TObject);
{$ENDIF}
timerEntry.Enabled := True;
timerRefresh.Enabled := True;
timerRefreshTimer(self);
end;

procedure TfrmMain.tmrIdleTimer(Sender: TObject);
Expand All @@ -553,10 +554,17 @@ function IdleTime: DWord;
end;
var
task_id: int64;
iSecondsIdle: integer;
begin
// always update display
frmIdleTime.updateDisplay;
if (IdleTime>=60*IDLETIMECHECK) and (Paymo.RunningTimerData <> nil) then
try
iSecondsIdle:=IdleTime;
except
iSecondsIdle:=0;
DebugLog('FPC Paymo Widget', 'Idle detection', 'Error');
end;
if (iSecondsIdle>=60*IDLETIMECHECK) and (Paymo.RunningTimerData <> nil) then
begin
if (not frmIdleTime.IsVisible) then
case frmIdleTime.ShowModal of
Expand Down Expand Up @@ -718,7 +726,8 @@ procedure TfrmMain.hideMenu(Sender: TObject);
pnlTop.Enabled := True;
edSearch.Enabled := True;
pnlTime.Enabled := True;
TabControl1.Visible := True;
if TabControl1.Tabs.Count > 0 then
TabControl1.Visible := True;
if Assigned(Tasks) then
Tasks.Enabled := True;
end;
Expand Down

0 comments on commit 70ce3e3

Please sign in to comment.