Skip to content

Commit

Permalink
Make Home and End keys work in overview
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Chachereau committed Nov 9, 2014
1 parent 135828d commit 50def31
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/hamster/widgets/facttree.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ class FactTree(graphics.Scene, gtk.Scrollable):
"""
The fact tree is a painter - it maintains scroll state and shows what we can
see. That means it does not show all the facts there are, but rather only
those tht you can see.
those that you can see.
It's also painter as it reuses labels. Caching is futile, we do all the painting
every tie
every time
Expand Down Expand Up @@ -288,6 +288,12 @@ def on_key_press(self, scene, event):
self.y -= self.height * 0.8
self.on_scroll()

elif event.keyval == gdk.KEY_Home:
self.set_current_fact(0)

elif event.keyval == gdk.KEY_End:
self.set_current_fact(len(self.facts) - 1)

elif event.keyval == gdk.KEY_Return:
self.activate_row(self.hover_day, self.current_fact)

Expand Down

0 comments on commit 50def31

Please sign in to comment.