[hamster-applet/gnome-2-28] force scrollbar if there are more than ten facts in today
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet/gnome-2-28] force scrollbar if there are more than ten facts in today
- Date: Sat, 21 Nov 2009 01:17:35 +0000 (UTC)
commit 934d54af0a12c4ed9e2dbb016ecce3732a22bc96
Author: Toms Bauģis <toms baugis gmail com>
Date: Sat Nov 21 01:16:50 2009 +0000
force scrollbar if there are more than ten facts in today
hamster/applet.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/hamster/applet.py b/hamster/applet.py
index 5c4d195..e52f378 100755
--- a/hamster/applet.py
+++ b/hamster/applet.py
@@ -532,8 +532,14 @@ class HamsterApplet(object):
fact_store.clear()
facts = runtime.storage.get_facts(today)
+ if len(facts) > 10:
+ self._gui.get_object("todays_scroll").set_size_request(-1, 250)
+ self._gui.get_object("todays_scroll").set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_ALWAYS)
+ else:
+ self._gui.get_object("todays_scroll").set_size_request(-1, -1)
+ self._gui.get_object("todays_scroll").set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_NEVER)
+
by_category = {}
-
for fact in facts:
duration = 24 * 60 * fact["delta"].days + fact["delta"].seconds / 60
by_category[fact['category']] = \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]