Commit 525f7349 authored by Bram Schoenmakers's avatar Bram Schoenmakers

Add property for setting the view of a column.

parent 7b5d3c52
......@@ -21,7 +21,7 @@ from topydo.ui.TodoWidget import TodoWidget
class TodoListWidget(urwid.LineBox):
def __init__(self, p_view, p_title):
self.view = p_view
self._view = None
# store a state for multi-key shortcuts (e.g. 'gg')
self.keystate = None
......@@ -30,7 +30,7 @@ class TodoListWidget(urwid.LineBox):
self.todolist = urwid.SimpleFocusListWalker([])
self.listbox = urwid.ListBox(self.todolist)
self.update()
self.view = p_view
pile = urwid.Pile([
(1, title_widget),
......@@ -44,6 +44,15 @@ class TodoListWidget(urwid.LineBox):
urwid.register_signal(TodoListWidget, ['execute_command'])
@property
def view(self):
return self._view
@view.setter
def view(self, p_view):
self._view = p_view
self.update()
def update(self):
"""
Updates the todo list according to the todos in the view associated
......
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