maho | 3 Jun 20:27
Favicon

starting/stopping clock .

Hi, 

I wanted to implement one small and easy (or rather "I thought that it's
easy") feature in taskcoach. Stop an effort when laptop lid is closed/PC is
suspended, and resume it after PC is resumed. 

My idea was such:
- taskcoach registers to dbus when started, 

- scripts in /etc/acpi/suspend.d and /etc/acpi/resume.d/ are sending
         signals to taskcoach 

Everything was ok, I learned how to use dbus, successfully sent/received
signals, and now I think that starting/stopping clock will be the easiest
thing (as I have experience with wxPython programming). 

But it appeared, that taskcoach code isn't so easy. I see that it's very
nice, and seems that is designed very good, but is complicated from other
side ... how the hell can I just stop timer? :) Could someone give me some
hints?

regards

Maho.

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
(Continue reading)

Frank Niessink | 3 Jun 22:32

Re: starting/stopping clock .

Hi,

2008/6/3 maho <maho@...>:
> Hi,
>
> I wanted to implement one small and easy (or rather "I thought that it's
> easy") feature in taskcoach. Stop an effort when laptop lid is closed/PC is
> suspended, and resume it after PC is resumed.

Here's how I would approach this. First, since Task Coach has no
pause/resume functionality at the moment I would implement that first,
including the user interface. To resume, we need to know the task the
user was tracking when effort tracking was paused. That information is
already available by looking up the most recent effort record in the
effort list. So conceptually, there is no difference between stopping
effort tracking and pausing effort tracking. By the way, I am assuming
that the time between pause and resume will not be registered as time
spent on the task (what would the use of pause/resume be if it were,
right?). So, to summarize "pause = stop tracking" and "resume = start
tracking for the task that was last being tracked."

Now we need to decide what the user interface will look like.
Currently, Task Coach has two task tracking buttons: start effort and
stop effort (the clocks). We at least need a resume button that is
enabled as long as there is at least one effort record in the effort
list. We also need an icon, by the way, so look for one in
icons.in/nuvola.zip. If no stock icon is available I create one
myself, in this case by for example combining the clock icon with a
'play' button, and add it to the zip file. Since that big zip file is
not distributed with Task Coach, but icons are converted to a python
(Continue reading)

maho | 3 Jun 23:52
Favicon

Re: starting/stopping clock .

Frank Niessink wrote:

[...]
> 
> Last step is to bind the dbus events somewhere to EffortStop.doCommand
> and EffortResume.doCommand. I guess the best place is a new module in
> the gui package.

        Oh, it's information I was looking for. I will check if it works for me
tomorrow :). 

> 
> Hope this helps, Frank
> 
> PS: If you'd like me to implement the UI part, let me know, it
> shouldn't take long no that I've thought it through already ;-)

        I'll try to do UI part too, but if it will be too hard, I'll just post
ticket to sf.net BT with "backend part" patch ....

regards

Maho

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/taskcoach-dev/
(Continue reading)


Gmane