GTG

Merge lp:~kjmikkel/gtg/removeSubtasks into lp:~gtg/gtg/old-trunk

Proposed by silentStatic
Status: Merged
Merged at revision: not available
Proposed branch: lp:~kjmikkel/gtg/removeSubtasks
Merge into: lp:~gtg/gtg/old-trunk
Diff against target: 173 lines
5 files modified
AUTHORS (+1/-0)
CHANGELOG (+81/-0)
GTG/core/task.py (+9/-4)
GTG/taskbrowser/browser.py (+12/-0)
GTG/taskbrowser/taskbrowser.glade (+1/-1)
To merge this branch: bzr merge lp:~kjmikkel/gtg/removeSubtasks
Reviewer Review Type Date Requested Status
Lionel Dricot (community) Needs Fixing
Review via email: mp+12495@code.launchpad.net
To post a comment you must log in.
Revision history for this message
silentStatic (kjmikkel) wrote :

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.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

The diff doesn't look good as it contains +<<<<<<< TREE stuffs. Can you fix that please?

Also, we should really put the titles of tasks that will be deleted in the Warning box.

review: Needs Fixing
lp:~kjmikkel/gtg/removeSubtasks updated
326. By Mikkel Kjær Jensen <mikkel@mikkel-laptop>

tidied a bit up

Revision history for this message
silentStatic (kjmikkel) wrote :

> The diff doesn't look good as it contains +<<<<<<< TREE stuffs. Can you fix
> that please?

Of course

> Also, we should really put the titles of tasks that will be deleted in the
> Warning box.

Again, I agree, but I do not know how to add the warning dialogue and add the information to the label - since it is made using glade, it uses static information, and the parts of the dialogue do not seem accessible.

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

> Again, I agree, but I do not know how to add the warning dialogue and add the
> information to the label - since it is made using glade, it uses static
> information, and the parts of the dialogue do not seem accessible.

This will be a great PyGTK training for you :-)

Changing the text is not hard. First, you have to retrieve the widget from the glade file.
It will looks something like : label = self.wTree.get_widget("name_of_widget") (self.wTree should be already set, look for it in other source file that are using glade)

Then, you just have to use the built-in method of the retrieved widget. Something like label.set_label("my text"). To know the methods of a given object, use the documentation on pygtk.org (or in devhelp).

A great tutorial can be found at http://www.learningpython.com/2006/05/07/creating-a-gui-using-pygtk-and-glade/ and, more generally on http://www.learningpython.com/category/python/pygtk/

If you have question, ask on #gtg (or on #pygtk).

lp:~kjmikkel/gtg/removeSubtasks updated
327. By Mikkel Kjær Jensen <mikkel@mikkel-laptop>

more tidying up

328. By Mikkel Kjær Jensen <mikkel@mikkel-laptop>

even more tidying up

329. By Mikkel Kjær Jensen <mikkel@mikkel-laptop>

The delete notice now finds the titles of the tasks to be deleted. The reason for the use of substring and find in browser.py, is because otherwise the text of the label would keep the text from the last iteration

330. By Mikkel Kjær Jensen <mikkel@mikkel-laptop>

Changed order of when subtasks are deleted, and when a tasks parrents are removed

331. By silentStatic

aNOT* Patch from mrk to improve compatibility with non GNU systems

332. By silentStatic

Another attempt to avoid bzr stuff

333. By silentStatic

clean CHANGELOG slate for conflict resolution

334. By silentStatic

clean changelog

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'AUTHORS'
--- AUTHORS 2009-09-11 22:58:12 +0000
+++ AUTHORS 2009-10-05 09:33:13 +0000
@@ -37,3 +37,4 @@
37* Paulo Cabido <paulo.cabido@gmail.com>37* Paulo Cabido <paulo.cabido@gmail.com>
38* Patrick Coleman <blinken@gmail.com>38* Patrick Coleman <blinken@gmail.com>
39* Luca Invernizzi <invernizzi.l@gmail.com>39* Luca Invernizzi <invernizzi.l@gmail.com>
40* Mikkel Kjær Jensen <kjmikkel@gmail.com>
40\ No newline at end of file41\ No newline at end of file
4142
=== added file 'CHANGELOG'
--- CHANGELOG 1970-01-01 00:00:00 +0000
+++ CHANGELOG 2009-10-05 09:33:13 +0000
@@ -0,0 +1,81 @@
1 * When a task is deleted, all subtask are deleted as well by Mikkel Kjær Jensen
2 * Empty new tasks are deleted when editor is closed
3 * lot of bug fixed in the editor while playing with subtasks
4 * Works well with the "text besides icon" GNOME option
5 * Merge RTM plugin branch from Luca Invernizzi
6 * i18n: fixed window title in GTG/taskbrowser/browser.py, by Dario Bertini
7 * Patch from Luca Invernizzi to add XDG_CACHE redefinition in script/debug.sh
8 * Patch from Luca Invernizzi to remove unsued get_closed_date
9 * Added filtering capabilities by Paulo Cabido
10 - Filter callbacks were added to the task browser
11 - Filters were also added to the requester
12 * Fixed #406851, incorrect behaviour marking a dismissed task as done by Patrick Coleman
13 * Added accelerators to the task editor by Patrick Coleman
14 * Add plugin engine by Paulo Cabido
15 * When GTG is already running, use DBUS to raise existing instance rather than failing silently
16 * Refactorization and PEP8ification work by Jonathan Lange
17 * New keyboard bindings for 'Mark as done' and 'Dismiss' actions
18 * New keyboard bindings and accelerators by Jonathan Lange
19 * DBus interface by Ryan Paul
20 * Remove the 'Delete' button from the toolbar by Jonathan Lange
21 * Fix a spelling mistake in the manpage by Jonathan Lange
22 * Allow quickadd of capitalized date by remy@frerebeau.org
23
242009-07-04 Getting Things GNOME! 0.1.2
25 * Available in 18 languages, with 12 languages being more than 99% translated
26 * Shadows around the listview widgets, by Jean-François Fortin Tam
27 * Fixes package dependencies
28 * Tooltips for button
29 * Automatically select title in task editor
30 * Crash on startup with non empty LANGUAGE envvar
31 * Use GNOME settings for toolbar, by Anton Rebguns
32 * Better tag markup handling
33 * No more multiple instances
34 * HTTP link parsing by Ben Dowling
35 * Update README by Michael Vogt
36 * Update XML files sooner by Michael Vogt
37 * Remember color (by Zach Sheperd)
38 * URLs can now include ';' characters. Fixes bug 360969
39 * Added support for opening subtasks and links with the keyboard: Fixes bug 369272, by Ben Dowling
40 * Add polish translation by Tomasz Maciejewski
41 * Apply patch to fix bug #326388 by Brian Kennedy
42 * Apply patch to fix bug #374745 by Brian Kennedy
43 * Title for newly created task is now selected to allow easy editing
44 * Apply patch to fix bug #374745 by Brian Kennedy
45 * Fixed some bugs in the task editor
46
472009-04-01 Getting Things GNOME! 0.1.1
48 * New icon from Kalle Persson
49 * Translations are now possible
50 * New features :
51 - Quickadd now accepts attributes (by Jonathan Barnoud)
52 - http:// links now open in the browser
53 - Shortcut for sidebar (F9): fixes bug #339710
54 - Some UI love for the sidebar and the tag icons, shamelessy copied from f-spot
55 - Hotkeys goodness (patches from Antons Rebguns)
56 - Edit buttons : patches from Antons Rebguns
57 - Bug #339583, Bug #336314 : patches delete key and
58 * Bug fixes :
59 - Calendar open at the correct date
60 - TaskSerial refactorization (by Jonathan Barnoud)
61 - Tooltips on buttons (thanks to Jerome Guelfucci)
62 - First unit tests by Carl Chenet
63 - Error, no crash if the XML file cannot be read (thanks to Carl Chenet)
64 - fix bug #339383 (delete subtask when deleting first char)
65 - Escape title in the treeview : Bug #339874
66 - Focus in the editor : Bug #339269, Bug #339195, Bug #339389
67 - Bug #339269 : Quickadd has the focus on launch
68 enter key to confirm a delete (thanks Gérôme Fournier)
69 - Typos : Bug #339268 Bug #339492 and other patches from Gérôme Fournier.
70
712009-03-06 Getting Things Gnome ! 0.1
72 * Bumping version number. First release of GTG
73
742009-03-01 Getting Things Gnome! 0.0.9rc3
75 * pane/sidebar not saved
76
772009-03-01 Getting Things Gnome! 0.0.9rc2
78 * firstrun_tasks.xml not found on first launch
79
802009-03-01 Getting Things Gnome! 0.0.9rc1
81 * First official release 0.1rc1
082
=== renamed file 'CHANGELOG' => 'CHANGELOG.THIS'
=== modified file 'GTG/core/task.py'
--- GTG/core/task.py 2009-10-01 16:23:03 +0000
+++ GTG/core/task.py 2009-10-05 09:33:14 +0000
@@ -96,6 +96,12 @@
9696
97 def get_title(self):97 def get_title(self):
98 return self.title98 return self.title
99
100 def get_titles(self, list):
101 list.append(", " + self.title)
102 for task in self.get_subtasks():
103 list = task.get_titles(list)
104 return list
99105
100 #Return True if the title was changed.106 #Return True if the title was changed.
101 #False if the title was already the same.107 #False if the title was already the same.
@@ -476,13 +482,12 @@
476 #Use the requester482 #Use the requester
477 def delete(self):483 def delete(self):
478 self.set_sync_func(None, callsync=False)484 self.set_sync_func(None, callsync=False)
485 for task in self.get_subtasks():
486 self.req.delete_task(task.get_id())
479 for i in self.get_parents():487 for i in self.get_parents():
480 task = self.req.get_task(i)488 task = self.req.get_task(i)
481 task.remove_subtask(self.get_id())489 task.remove_subtask(self.get_id())
482 for task in self.get_subtasks():490
483 task.remove_parent(self.get_id())
484 #then we remove effectively the task
485 #self.req.delete_task(self.get_id())
486491
487 #This is a callback. The "sync" function has to be set492 #This is a callback. The "sync" function has to be set
488 def set_sync_func(self, sync, callsync=True):493 def set_sync_func(self, sync, callsync=True):
489494
=== modified file 'GTG/taskbrowser/browser.py'
--- GTG/taskbrowser/browser.py 2009-09-25 16:22:02 +0000
+++ GTG/taskbrowser/browser.py 2009-10-05 09:33:14 +0000
@@ -719,6 +719,12 @@
719 task = self.req.get_task(tid)719 task = self.req.get_task(tid)
720 return task.get_title()720 return task.get_title()
721721
722 def get_task_and_subtask_titles(self, tid):
723 task = self.req.get_task(tid)
724 titles_list = task.get_titles([])
725 titles_list[0] = titles_list[0][2:]
726 return "".join(titles_list)
727
722 def close_task(self, tid):728 def close_task(self, tid):
723 # When an editor is closed, it should deregister itself.729 # When an editor is closed, it should deregister itself.
724 if tid in self.opened_task:730 if tid in self.opened_task:
@@ -1229,6 +1235,12 @@
1229 self.tid_todelete = tid1235 self.tid_todelete = tid
1230 #We must at least have something to delete !1236 #We must at least have something to delete !
1231 if self.tid_todelete:1237 if self.tid_todelete:
1238 label = self.wTree.get_widget("label1")
1239 label_text = label.get_text()
1240 label_text = label_text[0:label_text.find(":") + 1]
1241 # I find the tasks that are going to be deleted
1242 titles = self.get_task_and_subtask_titles(self.tid_todelete)
1243 label.set_text("%s %s." % (label_text, titles))
1232 delete_dialog = self.wTree.get_widget("confirm_delete")1244 delete_dialog = self.wTree.get_widget("confirm_delete")
1233 delete_dialog.run()1245 delete_dialog.run()
1234 delete_dialog.hide()1246 delete_dialog.hide()
12351247
=== modified file 'GTG/taskbrowser/taskbrowser.glade'
--- GTG/taskbrowser/taskbrowser.glade 2009-09-25 14:48:08 +0000
+++ GTG/taskbrowser/taskbrowser.glade 2009-10-05 09:33:14 +0000
@@ -678,7 +678,7 @@
678 <property name="visible">True</property>678 <property name="visible">True</property>
679 <property name="label" translatable="yes">&lt;span weight="bold" size="large"&gt;Are you sure you want delete this task?&lt;/span&gt;679 <property name="label" translatable="yes">&lt;span weight="bold" size="large"&gt;Are you sure you want delete this task?&lt;/span&gt;
680680
681Deleting a task cannot be undone.</property>681Deleting a task cannot be undone, and will delete the following tasks: </property>
682 <property name="use_markup">True</property>682 <property name="use_markup">True</property>
683 <property name="wrap">True</property>683 <property name="wrap">True</property>
684 </widget>684 </widget>

Subscribers

People subscribed via source and target branches

to status/vote changes: