[hamster-applet] overwhelmed
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet] overwhelmed
- Date: Thu, 19 Aug 2010 21:47:08 +0000 (UTC)
commit 397329cd669eeb46c3e0704f203ffbb1c89ec0d4
Author: Toms Bauģis <toms baugis gmail com>
Date: Thu Aug 19 22:46:53 2010 +0100
overwhelmed
src/hamster/trophies.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/hamster/trophies.py b/src/hamster/trophies.py
index c6cc921..bb77001 100644
--- a/src/hamster/trophies.py
+++ b/src/hamster/trophies.py
@@ -53,6 +53,10 @@ class Checker(object):
(fact['end_time'] is None and fact['start_time'].date() != dt.date.today()):
self.trophies.unlock_achievement("hamster-applet", "insomnia")
+ # overwhelmed: tracking for more than 16 hours during one da
+ total = stuff.duration_minutes([fact['delta'] for fact in facts])
+ if total > 16 * 60:
+ self.trophies.unlock_achievement("hamster-applet", "overwhelmed")
def check_update_based(self, prev_id, new_id, activity_name, tags, start_time, end_time, category_name, description):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]