[hamster-applet] just spacing
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] just spacing
- Date: Fri, 27 Nov 2009 23:21:22 +0000 (UTC)
commit ebddac308e1ef7548394ea85a05e7dda4e37b978
Author: Toms Bauģis <toms baugis gmail com>
Date: Fri Nov 27 21:49:35 2009 +0000
just spacing
hamster/stats.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/hamster/stats.py b/hamster/stats.py
index 178921a..a529e23 100644
--- a/hamster/stats.py
+++ b/hamster/stats.py
@@ -590,8 +590,7 @@ than 15 minutes you seem to be a busy bee." % ("<b>%d</b>" % short_percent))
#the single "totals" (by category) bar
category_sums = stuff.totals(facts, lambda fact: fact["category"],
lambda fact: stuff.duration_minutes(fact["delta"]) / 60.0)
- category_totals = [category_sums.get(cat, 0)
- for cat in all_categories]
+ category_totals = [category_sums.get(cat, 0) for cat in all_categories]
category_keys = ["%s %.1f" % (cat, category_sums.get(cat, 0.0))
for cat in all_categories]
self.category_chart.plot([_("Total")],
@@ -600,15 +599,16 @@ than 15 minutes you seem to be a busy bee." % ("<b>%d</b>" % short_percent))
# day / category chart
all_days = [self.start_date + dt.timedelta(i)
- for i in range((self.end_date - self.start_date).days + 1)]
-
+ for i in range((self.end_date - self.start_date).days + 1)]
+
by_date_cat = stuff.totals(facts,
- lambda fact: (fact["date"],
- fact["category"]),
+ lambda fact: (fact["date"], fact["category"]),
lambda fact: stuff.duration_minutes(fact["delta"]) / 60.0)
+
res = [[by_date_cat.get((day, cat), 0)
for cat in all_categories] for day in all_days]
+
#show days or dates depending on scale
if (self.end_date - self.start_date).days < 20:
day_keys = [day.strftime("%a") for day in all_days]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]