Review of "Time Tracker" version 1

Details Page Preview

Helps track time

Extension Homepage
https://github.com/jsnjack/time-tracker/

No comments.

FAQ

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

All Versions

Version Status
25 Active
24 Rejected
23 Active
22 Active
21 Rejected
20 Active
19 Active
18 Active
17 Active
16 Active
15 Active
14 Active
13 Active
12 Active
11 Active
10 Active
9 Active
8 Active
7 Active
6 Active
5 Active
4 Rejected
3 Active
2 Active
1 Rejected

Previous Reviews on this Version

fmuellner rejected
Couple of notes: - instead of _to_string(), you can use format(): timer = '%d:%02d:%02d'.format(hours, minutes, seconds); - don't call timeout_add() from the timeout function itself; just return true (or GLib.SOURCE_CONTINUE) to have the function called repeatedly - in disable(), you don't have to remove the button from its parent before destroying it; however you do need to remove the timeout source - rejecting because of that
jsnjack posted a review
Thank you for your notes! They are all very useful, but timeout function won't restart itself by returning true. I left it as it was. Please, check version 2.
fmuellner posted a review
Uhm yes, that's how GSources work. Note that only the return value of the actual timeout function is used, so when you write timeout = Mainloop.timeout_add(1000, function () { _refresh(); }); that's not _refresh(), but the anonymous function that calls it. timeout = Mainloop.timeout_add(1000, function () { _refresh(); return true; }); should work as expected.