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
d1597160
Commit
d1597160
authored
Sep 16, 2014
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle recurrence when completing a task.
parent
014a3cc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
Main.py
Main.py
+8
-0
No files found.
Main.py
View file @
d1597160
...
...
@@ -8,6 +8,7 @@ import sys
import
Config
import
Filter
from
PrettyPrinter
import
pretty_print
from
Recurrence
import
advance_recurring_todo
from
RelativeDate
import
relative_date_to_date
import
Sorter
import
TodoFile
...
...
@@ -174,11 +175,18 @@ class Application(object):
self
.
todolist
.
todo
(
child
).
set_completed
()
self
.
print_todo
(
child
)
def
handle_recurrence
(
todo
):
if
todo
.
has_tag
(
'rec'
):
new_todo
=
advance_recurring_todo
(
todo
)
self
.
todolist
.
add_todo
(
new_todo
)
self
.
print_todo
(
self
.
todolist
.
count
())
number
=
convert_number
(
argument
(
2
))
todo
=
self
.
todolist
.
todo
(
number
)
if
todo
and
not
todo
.
is_completed
():
complete_children
(
number
)
handle_recurrence
(
todo
)
todo
.
set_completed
()
self
.
print_todo
(
number
)
...
...
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