Commit 0d086fe7 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Add support for the mouse wheel

parent 5f5a125a
...@@ -157,6 +157,13 @@ class TodoListWidget(urwid.LineBox): ...@@ -157,6 +157,13 @@ class TodoListWidget(urwid.LineBox):
else: else:
return self.listbox.keypress(p_size, p_key) return self.listbox.keypress(p_size, p_key)
def mouse_event(self, p_size, p_event, p_button, p_column, p_row, p_focus):
if p_event == 'mouse press':
if p_button == 4: # up
self.listbox.keypress(p_size, 'up')
elif p_button == 5: #down:
self.listbox.keypress(p_size, 'down')
def selectable(self): def selectable(self):
return True return True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment