gtg team mailing list archive
-
gtg team
-
Mailing list archive
-
Message #00282
[Merge] lp:~kjmikkel/gtg/removeSubtasks into lp:gtg
silentStatic has proposed merging lp:~kjmikkel/gtg/removeSubtasks into lp:gtg.
Requested reviews:
Gtg developers (gtg)
Purpose:
When deleting a task, all of its subtasks will be deleted as well, unlike 1.2, where they just loose their parent.
Notes:
No errors or strange behaviour. The warning message that appears when deleting a task might be improved though.
--
https://code.launchpad.net/~kjmikkel/gtg/removeSubtasks/+merge/12495
Your team Gtg developers is subscribed to branch lp:gtg.
=== modified file 'AUTHORS'
--- AUTHORS 2009-09-11 22:58:12 +0000
+++ AUTHORS 2009-09-27 20:45:21 +0000
@@ -37,3 +37,4 @@
* Paulo Cabido <paulo.cabido@xxxxxxxxx>
* Patrick Coleman <blinken@xxxxxxxxx>
* Luca Invernizzi <invernizzi.l@xxxxxxxxx>
+* Mikkel Kjær Jensen <kjmikkel@xxxxxxxxx>
\ No newline at end of file
=== modified file 'CHANGELOG'
--- CHANGELOG 2009-09-25 16:22:02 +0000
+++ CHANGELOG 2009-09-27 20:45:21 +0000
@@ -1,6 +1,10 @@
+<<<<<<< TREE
* Empty new tasks are deleted when editor is closed
* lot of bug fixed in the editor while playing with subtasks
* Works well with the "text besides icon" GNOME option
+=======
+ * Deleting a task will also delete all subtasks
+>>>>>>> MERGE-SOURCE
* Merge RTM plugin branch from Luca Invernizzi
* i18n: fixed window title in GTG/taskbrowser/browser.py, by Dario Bertini
* Patch from Luca Invernizzi to add XDG_CACHE redefinition in script/debug.sh
=== modified file 'GTG/core/datastore.py'
--- GTG/core/datastore.py 2009-09-24 13:15:17 +0000
+++ GTG/core/datastore.py 2009-09-27 20:45:22 +0000
@@ -67,8 +67,8 @@
#If the task doesn't exist, we create it with a forced pid
return task
- def delete_task(self,tid) :
- if tid and self.tasks.has_key(tid) :
+ def delete_task(self,tid):
+ if tid and self.tasks.has_key(tid):
self.tasks[tid].delete()
uid,pid = tid.split('@') #pylint: disable-msg=W0612
back = self.backends[pid]
=== modified file 'GTG/core/task.py'
--- GTG/core/task.py 2009-09-24 13:15:17 +0000
+++ GTG/core/task.py 2009-09-27 20:45:22 +0000
@@ -34,7 +34,7 @@
STA_ACTIVE = "Active"
STA_DISMISSED = "Dismiss"
STA_DONE = "Done"
-
+
def __init__(self, ze_id, requester, newtask=False):
#the id of this task in the project should be set
#tid is a string ! (we have to choose a type and stick to it)
@@ -480,7 +480,9 @@
task = self.req.get_task(i)
task.remove_subtask(self.get_id())
for task in self.get_subtasks():
- task.remove_parent(self.get_id())
+ # task.remove_parent(self.get_id())
+ self.req.delete_task(task.get_id())
+
#then we remove effectively the task
#self.req.delete_task(self.get_id())
=== modified file 'GTG/taskbrowser/browser.py'
--- GTG/taskbrowser/browser.py 2009-09-25 16:22:02 +0000
+++ GTG/taskbrowser/browser.py 2009-09-27 20:45:22 +0000
@@ -897,7 +897,7 @@
for tid in self.priv["collapsed_tids"]:
if not self.req.has_task(tid):
self.priv["collapsed_tids"].remove(tid)
-
+
# Get configuration values
tag_sidebar = self.sidebar.get_property("visible")
closed_pane = self.closed_pane.get_property("visible")
=== modified file 'GTG/taskbrowser/taskbrowser.glade'
--- GTG/taskbrowser/taskbrowser.glade 2009-09-25 14:48:08 +0000
+++ GTG/taskbrowser/taskbrowser.glade 2009-09-27 20:45:22 +0000
@@ -678,7 +678,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes"><span weight="bold" size="large">Are you sure you want delete this task?</span>
-Deleting a task cannot be undone.</property>
+Deleting a task cannot be undone, and will also delete all subtasks.</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
</widget>
=== modified file 'GTG/taskbrowser/tasktree.py'
Follow ups