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
a8ae9225
Commit
a8ae9225
authored
Sep 14, 2014
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ask user to mark the subtasks as done as well.
parent
f2117d9a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
Main.py
Main.py
+15
-0
No files found.
Main.py
View file @
a8ae9225
...
...
@@ -161,10 +161,25 @@ class Application(object):
usage
()
def
do
(
self
):
def
complete_children
(
p_number
):
children
=
[
t
.
number
for
t
in
self
.
todolist
.
children
(
p_number
)
if
not
t
.
is_completed
()]
if
children
:
for
child
in
children
:
self
.
print_todo
(
child
)
confirmation
=
raw_input
(
"Also mark subtasks as done? [n] "
);
if
re
.
match
(
'^y(es)?$'
,
confirmation
,
re
.
I
):
for
child
in
children
:
self
.
todolist
.
todo
(
child
).
set_completed
()
self
.
print_todo
(
child
)
number
=
convert_number
(
argument
(
2
))
todo
=
self
.
todolist
.
todo
(
number
)
if
todo
and
not
todo
.
is_completed
():
complete_children
(
number
)
todo
.
set_completed
()
self
.
print_todo
(
number
)
self
.
dirty
=
True
...
...
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