Merge lp:~kjmikkel/gtg/removeSubtasks into lp:~gtg/gtg/old-trunk
- removeSubtasks
- Merge into old-trunk
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Lionel Dricot (community) | Needs Fixing | ||
Review via email: mp+12495@code.launchpad.net |
Commit message
Description of the change
silentStatic (kjmikkel) wrote : | # |
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.
- 326. By Mikkel Kjær Jensen <mikkel@mikkel-laptop>
-
tidied a bit up
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.
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.
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://
If you have question, ask on #gtg (or on #pygtk).
- 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
1 | === modified file 'AUTHORS' | |||
2 | --- AUTHORS 2009-09-11 22:58:12 +0000 | |||
3 | +++ AUTHORS 2009-10-05 09:33:13 +0000 | |||
4 | @@ -37,3 +37,4 @@ | |||
5 | 37 | * Paulo Cabido <paulo.cabido@gmail.com> | 37 | * Paulo Cabido <paulo.cabido@gmail.com> |
6 | 38 | * Patrick Coleman <blinken@gmail.com> | 38 | * Patrick Coleman <blinken@gmail.com> |
7 | 39 | * Luca Invernizzi <invernizzi.l@gmail.com> | 39 | * Luca Invernizzi <invernizzi.l@gmail.com> |
8 | 40 | * Mikkel Kjær Jensen <kjmikkel@gmail.com> | ||
9 | 40 | \ No newline at end of file | 41 | \ No newline at end of file |
10 | 41 | 42 | ||
11 | === added file 'CHANGELOG' | |||
12 | --- CHANGELOG 1970-01-01 00:00:00 +0000 | |||
13 | +++ CHANGELOG 2009-10-05 09:33:13 +0000 | |||
14 | @@ -0,0 +1,81 @@ | |||
15 | 1 | * When a task is deleted, all subtask are deleted as well by Mikkel Kjær Jensen | ||
16 | 2 | * Empty new tasks are deleted when editor is closed | ||
17 | 3 | * lot of bug fixed in the editor while playing with subtasks | ||
18 | 4 | * Works well with the "text besides icon" GNOME option | ||
19 | 5 | * Merge RTM plugin branch from Luca Invernizzi | ||
20 | 6 | * i18n: fixed window title in GTG/taskbrowser/browser.py, by Dario Bertini | ||
21 | 7 | * Patch from Luca Invernizzi to add XDG_CACHE redefinition in script/debug.sh | ||
22 | 8 | * Patch from Luca Invernizzi to remove unsued get_closed_date | ||
23 | 9 | * Added filtering capabilities by Paulo Cabido | ||
24 | 10 | - Filter callbacks were added to the task browser | ||
25 | 11 | - Filters were also added to the requester | ||
26 | 12 | * Fixed #406851, incorrect behaviour marking a dismissed task as done by Patrick Coleman | ||
27 | 13 | * Added accelerators to the task editor by Patrick Coleman | ||
28 | 14 | * Add plugin engine by Paulo Cabido | ||
29 | 15 | * When GTG is already running, use DBUS to raise existing instance rather than failing silently | ||
30 | 16 | * Refactorization and PEP8ification work by Jonathan Lange | ||
31 | 17 | * New keyboard bindings for 'Mark as done' and 'Dismiss' actions | ||
32 | 18 | * New keyboard bindings and accelerators by Jonathan Lange | ||
33 | 19 | * DBus interface by Ryan Paul | ||
34 | 20 | * Remove the 'Delete' button from the toolbar by Jonathan Lange | ||
35 | 21 | * Fix a spelling mistake in the manpage by Jonathan Lange | ||
36 | 22 | * Allow quickadd of capitalized date by remy@frerebeau.org | ||
37 | 23 | |||
38 | 24 | 2009-07-04 Getting Things GNOME! 0.1.2 | ||
39 | 25 | * Available in 18 languages, with 12 languages being more than 99% translated | ||
40 | 26 | * Shadows around the listview widgets, by Jean-François Fortin Tam | ||
41 | 27 | * Fixes package dependencies | ||
42 | 28 | * Tooltips for button | ||
43 | 29 | * Automatically select title in task editor | ||
44 | 30 | * Crash on startup with non empty LANGUAGE envvar | ||
45 | 31 | * Use GNOME settings for toolbar, by Anton Rebguns | ||
46 | 32 | * Better tag markup handling | ||
47 | 33 | * No more multiple instances | ||
48 | 34 | * HTTP link parsing by Ben Dowling | ||
49 | 35 | * Update README by Michael Vogt | ||
50 | 36 | * Update XML files sooner by Michael Vogt | ||
51 | 37 | * Remember color (by Zach Sheperd) | ||
52 | 38 | * URLs can now include ';' characters. Fixes bug 360969 | ||
53 | 39 | * Added support for opening subtasks and links with the keyboard: Fixes bug 369272, by Ben Dowling | ||
54 | 40 | * Add polish translation by Tomasz Maciejewski | ||
55 | 41 | * Apply patch to fix bug #326388 by Brian Kennedy | ||
56 | 42 | * Apply patch to fix bug #374745 by Brian Kennedy | ||
57 | 43 | * Title for newly created task is now selected to allow easy editing | ||
58 | 44 | * Apply patch to fix bug #374745 by Brian Kennedy | ||
59 | 45 | * Fixed some bugs in the task editor | ||
60 | 46 | |||
61 | 47 | 2009-04-01 Getting Things GNOME! 0.1.1 | ||
62 | 48 | * New icon from Kalle Persson | ||
63 | 49 | * Translations are now possible | ||
64 | 50 | * New features : | ||
65 | 51 | - Quickadd now accepts attributes (by Jonathan Barnoud) | ||
66 | 52 | - http:// links now open in the browser | ||
67 | 53 | - Shortcut for sidebar (F9): fixes bug #339710 | ||
68 | 54 | - Some UI love for the sidebar and the tag icons, shamelessy copied from f-spot | ||
69 | 55 | - Hotkeys goodness (patches from Antons Rebguns) | ||
70 | 56 | - Edit buttons : patches from Antons Rebguns | ||
71 | 57 | - Bug #339583, Bug #336314 : patches delete key and | ||
72 | 58 | * Bug fixes : | ||
73 | 59 | - Calendar open at the correct date | ||
74 | 60 | - TaskSerial refactorization (by Jonathan Barnoud) | ||
75 | 61 | - Tooltips on buttons (thanks to Jerome Guelfucci) | ||
76 | 62 | - First unit tests by Carl Chenet | ||
77 | 63 | - Error, no crash if the XML file cannot be read (thanks to Carl Chenet) | ||
78 | 64 | - fix bug #339383 (delete subtask when deleting first char) | ||
79 | 65 | - Escape title in the treeview : Bug #339874 | ||
80 | 66 | - Focus in the editor : Bug #339269, Bug #339195, Bug #339389 | ||
81 | 67 | - Bug #339269 : Quickadd has the focus on launch | ||
82 | 68 | enter key to confirm a delete (thanks Gérôme Fournier) | ||
83 | 69 | - Typos : Bug #339268 Bug #339492 and other patches from Gérôme Fournier. | ||
84 | 70 | |||
85 | 71 | 2009-03-06 Getting Things Gnome ! 0.1 | ||
86 | 72 | * Bumping version number. First release of GTG | ||
87 | 73 | |||
88 | 74 | 2009-03-01 Getting Things Gnome! 0.0.9rc3 | ||
89 | 75 | * pane/sidebar not saved | ||
90 | 76 | |||
91 | 77 | 2009-03-01 Getting Things Gnome! 0.0.9rc2 | ||
92 | 78 | * firstrun_tasks.xml not found on first launch | ||
93 | 79 | |||
94 | 80 | 2009-03-01 Getting Things Gnome! 0.0.9rc1 | ||
95 | 81 | * First official release 0.1rc1 | ||
96 | 0 | 82 | ||
97 | === renamed file 'CHANGELOG' => 'CHANGELOG.THIS' | |||
98 | === modified file 'GTG/core/task.py' | |||
99 | --- GTG/core/task.py 2009-10-01 16:23:03 +0000 | |||
100 | +++ GTG/core/task.py 2009-10-05 09:33:14 +0000 | |||
101 | @@ -96,6 +96,12 @@ | |||
102 | 96 | 96 | ||
103 | 97 | def get_title(self): | 97 | def get_title(self): |
104 | 98 | return self.title | 98 | return self.title |
105 | 99 | |||
106 | 100 | def get_titles(self, list): | ||
107 | 101 | list.append(", " + self.title) | ||
108 | 102 | for task in self.get_subtasks(): | ||
109 | 103 | list = task.get_titles(list) | ||
110 | 104 | return list | ||
111 | 99 | 105 | ||
112 | 100 | #Return True if the title was changed. | 106 | #Return True if the title was changed. |
113 | 101 | #False if the title was already the same. | 107 | #False if the title was already the same. |
114 | @@ -476,13 +482,12 @@ | |||
115 | 476 | #Use the requester | 482 | #Use the requester |
116 | 477 | def delete(self): | 483 | def delete(self): |
117 | 478 | self.set_sync_func(None, callsync=False) | 484 | self.set_sync_func(None, callsync=False) |
118 | 485 | for task in self.get_subtasks(): | ||
119 | 486 | self.req.delete_task(task.get_id()) | ||
120 | 479 | for i in self.get_parents(): | 487 | for i in self.get_parents(): |
121 | 480 | task = self.req.get_task(i) | 488 | task = self.req.get_task(i) |
122 | 481 | task.remove_subtask(self.get_id()) | 489 | task.remove_subtask(self.get_id()) |
127 | 482 | for task in self.get_subtasks(): | 490 | |
124 | 483 | task.remove_parent(self.get_id()) | ||
125 | 484 | #then we remove effectively the task | ||
126 | 485 | #self.req.delete_task(self.get_id()) | ||
128 | 486 | 491 | ||
129 | 487 | #This is a callback. The "sync" function has to be set | 492 | #This is a callback. The "sync" function has to be set |
130 | 488 | def set_sync_func(self, sync, callsync=True): | 493 | def set_sync_func(self, sync, callsync=True): |
131 | 489 | 494 | ||
132 | === modified file 'GTG/taskbrowser/browser.py' | |||
133 | --- GTG/taskbrowser/browser.py 2009-09-25 16:22:02 +0000 | |||
134 | +++ GTG/taskbrowser/browser.py 2009-10-05 09:33:14 +0000 | |||
135 | @@ -719,6 +719,12 @@ | |||
136 | 719 | task = self.req.get_task(tid) | 719 | task = self.req.get_task(tid) |
137 | 720 | return task.get_title() | 720 | return task.get_title() |
138 | 721 | 721 | ||
139 | 722 | def get_task_and_subtask_titles(self, tid): | ||
140 | 723 | task = self.req.get_task(tid) | ||
141 | 724 | titles_list = task.get_titles([]) | ||
142 | 725 | titles_list[0] = titles_list[0][2:] | ||
143 | 726 | return "".join(titles_list) | ||
144 | 727 | |||
145 | 722 | def close_task(self, tid): | 728 | def close_task(self, tid): |
146 | 723 | # When an editor is closed, it should deregister itself. | 729 | # When an editor is closed, it should deregister itself. |
147 | 724 | if tid in self.opened_task: | 730 | if tid in self.opened_task: |
148 | @@ -1229,6 +1235,12 @@ | |||
149 | 1229 | self.tid_todelete = tid | 1235 | self.tid_todelete = tid |
150 | 1230 | #We must at least have something to delete ! | 1236 | #We must at least have something to delete ! |
151 | 1231 | if self.tid_todelete: | 1237 | if self.tid_todelete: |
152 | 1238 | label = self.wTree.get_widget("label1") | ||
153 | 1239 | label_text = label.get_text() | ||
154 | 1240 | label_text = label_text[0:label_text.find(":") + 1] | ||
155 | 1241 | # I find the tasks that are going to be deleted | ||
156 | 1242 | titles = self.get_task_and_subtask_titles(self.tid_todelete) | ||
157 | 1243 | label.set_text("%s %s." % (label_text, titles)) | ||
158 | 1232 | delete_dialog = self.wTree.get_widget("confirm_delete") | 1244 | delete_dialog = self.wTree.get_widget("confirm_delete") |
159 | 1233 | delete_dialog.run() | 1245 | delete_dialog.run() |
160 | 1234 | delete_dialog.hide() | 1246 | delete_dialog.hide() |
161 | 1235 | 1247 | ||
162 | === modified file 'GTG/taskbrowser/taskbrowser.glade' | |||
163 | --- GTG/taskbrowser/taskbrowser.glade 2009-09-25 14:48:08 +0000 | |||
164 | +++ GTG/taskbrowser/taskbrowser.glade 2009-10-05 09:33:14 +0000 | |||
165 | @@ -678,7 +678,7 @@ | |||
166 | 678 | <property name="visible">True</property> | 678 | <property name="visible">True</property> |
167 | 679 | <property name="label" translatable="yes"><span weight="bold" size="large">Are you sure you want delete this task?</span> | 679 | <property name="label" translatable="yes"><span weight="bold" size="large">Are you sure you want delete this task?</span> |
168 | 680 | 680 | ||
170 | 681 | Deleting a task cannot be undone.</property> | 681 | Deleting a task cannot be undone, and will delete the following tasks: </property> |
171 | 682 | <property name="use_markup">True</property> | 682 | <property name="use_markup">True</property> |
172 | 683 | <property name="wrap">True</property> | 683 | <property name="wrap">True</property> |
173 | 684 | </widget> | 684 | </widget> |
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.