[hamster-applet] added end time and removed stripes.
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] added end time and removed stripes.
- Date: Mon, 16 Nov 2009 00:13:51 +0000 (UTC)
commit 7eeb0c0f3463a7b3775a6c6cc01b8ab5187078f8
Author: Toms Bauģis <toms baugis gmail com>
Date: Sun Nov 15 23:24:44 2009 +0000
added end time and removed stripes.
it still feels to heavy.
data/applet.ui | 1 -
hamster/applet.py | 12 +++++++++---
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/data/applet.ui b/data/applet.ui
index 961b87e..f41aea4 100644
--- a/data/applet.ui
+++ b/data/applet.ui
@@ -185,7 +185,6 @@
<property name="can_focus">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="headers_visible">False</property>
- <property name="rules_hint">True</property>
<property name="enable_search">False</property>
<property name="tooltip_column">1</property>
<signal name="key_press_event" handler="on_todays_keys"/>
diff --git a/hamster/applet.py b/hamster/applet.py
index 6e7e538..2470026 100755
--- a/hamster/applet.py
+++ b/hamster/applet.py
@@ -296,6 +296,7 @@ class HamsterApplet(object):
self.treeview.append_column(gtk.TreeViewColumn("Time",
gtk.CellRendererText(),
text=2))
+
self.treeview.append_column(stuff.ActivityColumn(name=1,
description=5,
category=6))
@@ -303,7 +304,6 @@ class HamsterApplet(object):
duration_cell = gtk.CellRendererText()
duration_cell.set_property("xalign", 1)
timeColumn = gtk.TreeViewColumn(_("Duration"), duration_cell, text=3)
-
self.treeview.append_column(timeColumn)
edit_cell = gtk.CellRendererPixbuf()
@@ -539,11 +539,17 @@ class HamsterApplet(object):
by_category[fact['category']] = \
by_category.setdefault(fact['category'], 0) + duration
+ if fact["end_time"]:
+ fact_time = "%s - %s " % (fact["start_time"].strftime("%H:%M"),
+ fact["end_time"].strftime("%H:%M"))
+ else:
+ fact_time = fact["start_time"].strftime("%H:%M ")
+
fact_store.append([fact['id'],
stuff.escape_pango(fact['name']),
- fact["start_time"].strftime("%H:%M"),
+ fact_time,
"%s" % stuff.format_duration(duration),
- fact["start_time"].strftime("%H:%M"),
+ "",
stuff.escape_pango(fact["description"]),
stuff.escape_pango(fact["category"]),
fact])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]