Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
topydo
Commits
e3e59df1
Commit
e3e59df1
authored
Jun 14, 2015
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show todo numbers.
parent
e86b3287
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
topydo/ui/TodoListWidget.py
topydo/ui/TodoListWidget.py
+1
-1
topydo/ui/TodoWidget.py
topydo/ui/TodoWidget.py
+5
-1
No files found.
topydo/ui/TodoListWidget.py
View file @
e3e59df1
...
...
@@ -53,7 +53,7 @@ class TodoListWidget(urwid.LineBox):
items
=
[]
for
todo
in
self
.
view
.
todos
:
todowidget
=
TodoWidget
(
todo
)
todowidget
=
TodoWidget
(
todo
,
self
.
view
.
todolist
.
number
(
todo
)
)
items
.
append
((
todowidget
,
(
'pack'
,
None
)))
items
.
append
((
urwid
.
Divider
(
u'-'
),
(
'weight'
,
1
)))
...
...
topydo/ui/TodoWidget.py
View file @
e3e59df1
...
...
@@ -14,10 +14,12 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from
six
import
text_type
import
urwid
class
TodoWidget
(
urwid
.
WidgetWrap
):
def
__init__
(
self
,
p_todo
):
def
__init__
(
self
,
p_todo
,
p_number
):
self
.
todo
=
p_todo
priority
=
self
.
todo
.
priority
()
...
...
@@ -31,10 +33,12 @@ class TodoWidget(urwid.WidgetWrap):
todo_text
=
todo_text
[
4
:]
priority_widget
=
urwid
.
Text
(
priority_text
)
id_widget
=
urwid
.
Text
(
text_type
(
p_number
),
align
=
'right'
)
self
.
text_widget
=
urwid
.
Text
(
todo_text
)
self
.
columns
=
urwid
.
Columns
(
[
(
4
,
id_widget
),
(
3
,
priority_widget
),
(
'weight'
,
1
,
self
.
text_widget
),
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment