Bug 233027

Summary: (No active desktop time reversal) fails if (Track Active Applications is actived) and (other aplication is clicked)
Product: [Applications] ktimetracker Reporter: René Mérou <rene.merou>
Component: generalAssignee: Thorsten Staerk <dev>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version First Reported In: 4.3.x   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description René Mérou 2010-04-02 03:12:56 UTC
Version:           4.3.3 (using KDE 4.3.4)
OS:                Linux
Installed from:    Debian testing/unstable Packages

I have the Track Active Applications is actived.
I work a little and then I left my computer.
2 hours later i return and i see the windows asking me if i want to continue timing or reverse the time to the moment i left my computer.
I click other aplication, ktimetracker  to see if there is any change in timings.
I click to reversal the time and i got surprise:

The time of my time tracker is -2:09 minutes.

Its suposed that the 2 hours must be deleted from the aplication that had the 2 hours added, not from the aplication that now has been last called.

If i get some help, maybe ill correct it by myself,  i like this aplication and i like to contribute to it.

One way to solve it is to store in the dialog the id of the aplication runing at the moment of the timeout signal.  Latter, if someone click other aplication, 1- detect it, 2-take note of the diference in time. 3- continue tracking the new aplication selected and 4- when answered to reversal the time,  just do this:  If aplication is still there, delete the diference in time.  

And 0, for this dialog to reverse time: never track this dialog as "one active aplication" and do not stop tracking the aplication when timeout is called and this dialog is called.
Comment 1 Thorsten Staerk 2011-10-14 11:44:47 UTC

*** This bug has been marked as a duplicate of bug 245043 ***