GTG

Merge lp:~parthpanchl/gtg/workspace2 into lp:~gtg/gtg/old-trunk

Proposed by Parth Panchal
Status: Merged
Merged at revision: 1360
Proposed branch: lp:~parthpanchl/gtg/workspace2
Merge into: lp:~gtg/gtg/old-trunk
Diff against target: 155 lines (+60/-5)
4 files modified
AUTHORS (+2/-1)
CHANGELOG (+1/-0)
GTG/gtk/editor/editor.py (+23/-0)
GTG/gtk/editor/taskeditor.ui (+34/-4)
To merge this branch: bzr merge lp:~parthpanchl/gtg/workspace2
Reviewer Review Type Date Requested Status
Nimit Shah Approve
Review via email: mp+209528@code.launchpad.net

Commit message

Description of the change

Fixes Bug #316922
- Adds a toolbar button with drop down menu to task editor that opens its parent tasks

Testing
- Resize the task editor to fully display the button & drop down menu otherwise os will stack overflowing tollbar buttons in a drop down menu losing the button's menu functionality

To post a comment you must log in.
Revision history for this message
Nimit Shah (nimit-svnit) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'AUTHORS'
--- AUTHORS 2014-03-01 21:15:24 +0000
+++ AUTHORS 2014-03-05 19:39:10 +0000
@@ -132,4 +132,5 @@
132* Sagar Ghuge <ghugesss@gmail.com>132* Sagar Ghuge <ghugesss@gmail.com>
133* Sushant Raikar <sushantthecoder@gmail.com>133* Sushant Raikar <sushantthecoder@gmail.com>
134* Atit Anand <atit.anand.cs@gmail.com>134* Atit Anand <atit.anand.cs@gmail.com>
135* Sara Ribeiro <sara.rmgr@gmail.com>135* Parth P. Panchal <parthpanchl@gmail.com>
136* Sara Ribeiro <sara.rmgr@gmail.com>
136\ No newline at end of file137\ No newline at end of file
137138
=== modified file 'CHANGELOG'
--- CHANGELOG 2014-03-01 21:15:24 +0000
+++ CHANGELOG 2014-03-05 19:39:10 +0000
@@ -18,6 +18,7 @@
18 * Fix for bug #1286491 : RTM sync backend fails to load, by Pawan Hegde18 * Fix for bug #1286491 : RTM sync backend fails to load, by Pawan Hegde
19 * Fix for bug #1286493 : GTG cannot connect to RTM, by Pawan Hegde19 * Fix for bug #1286493 : GTG cannot connect to RTM, by Pawan Hegde
20 * Fix for bug #1288011 : More intuitive title label for tasks, by Sara Ribeiro20 * Fix for bug #1288011 : More intuitive title label for tasks, by Sara Ribeiro
21 * Fix for bug #316922 : Have a link to the parent(s) in the task editor, by Parth Panchal
2122
222013-11-24 Getting Things GNOME! 0.3.1232013-11-24 Getting Things GNOME! 0.3.1
23 * Fix for bug #1024473: Have 'Show Main Window' in notification area, by Antonio Roquentin24 * Fix for bug #1024473: Have 'Show Main Window' in notification area, by Antonio Roquentin
2425
=== modified file 'GTG/gtk/editor/editor.py'
--- GTG/gtk/editor/editor.py 2013-11-25 02:37:46 +0000
+++ GTG/gtk/editor/editor.py 2014-03-05 19:39:10 +0000
@@ -68,6 +68,7 @@
68 self.subtask_button.set_tooltip_text(GnomeConfig.SUBTASK_TOOLTIP)68 self.subtask_button.set_tooltip_text(GnomeConfig.SUBTASK_TOOLTIP)
69 self.inserttag_button = self.builder.get_object("inserttag")69 self.inserttag_button = self.builder.get_object("inserttag")
70 self.inserttag_button.set_tooltip_text(GnomeConfig.TAG_TOOLTIP)70 self.inserttag_button.set_tooltip_text(GnomeConfig.TAG_TOOLTIP)
71 self.open_parents_button = self.builder.get_object("open_parents")
7172
72 # Create our dictionary and connect it73 # Create our dictionary and connect it
73 dic = {74 dic = {
@@ -95,6 +96,7 @@
95 w, e, GTGCalendar.DATE_KIND_CLOSED),96 w, e, GTGCalendar.DATE_KIND_CLOSED),
96 "on_insert_subtask_clicked": self.insert_subtask,97 "on_insert_subtask_clicked": self.insert_subtask,
97 "on_inserttag_clicked": self.inserttag_clicked,98 "on_inserttag_clicked": self.inserttag_clicked,
99 "on_open_parent_clicked": self.open_parent_clicked,
98 "on_move": self.on_move,100 "on_move": self.on_move,
99 }101 }
100 self.builder.connect_signals(dic)102 self.builder.connect_signals(dic)
@@ -359,6 +361,20 @@
359 menu.append(mi)361 menu.append(mi)
360 if tag_count > 0:362 if tag_count > 0:
361 self.inserttag_button.set_menu(menu)363 self.inserttag_button.set_menu(menu)
364
365 # Refreshing the parent list in open_parent_button
366 menu = Gtk.Menu()
367 parents = self.task.get_parents()
368 if len(parents) > 0:
369 for parent in self.task.get_parents():
370 task = self.req.get_task(parent)
371 mi = Gtk.MenuItem(label = task.get_title(), use_underline=False)
372 mi.connect("activate", self.open_parent, parent)
373 mi.show()
374 menu.append(mi)
375 self.open_parents_button.set_menu(menu)
376 else:
377 self.open_parents_button.set_sensitive(False)
362378
363 if refreshtext:379 if refreshtext:
364 self.textview.modified(refresheditor=False)380 self.textview.modified(refresheditor=False)
@@ -503,6 +519,13 @@
503 def inserttag(self, widget, tag):519 def inserttag(self, widget, tag):
504 self.textview.insert_tags([tag])520 self.textview.insert_tags([tag])
505 self.textview.grab_focus()521 self.textview.grab_focus()
522
523 def open_parent_clicked(self, widget):
524 self.vmanager.open_task(self.task.get_parents()[0])
525
526 # On click handler for open_parent_button's menu items
527 def open_parent(self, widget, tid):
528 self.vmanager.open_task(tid)
506529
507 def save(self):530 def save(self):
508 self.task.set_title(self.textview.get_title())531 self.task.set_title(self.textview.get_title())
509532
=== modified file 'GTG/gtk/editor/taskeditor.ui'
--- GTG/gtk/editor/taskeditor.ui 2014-02-18 21:25:17 +0000
+++ GTG/gtk/editor/taskeditor.ui 2014-03-05 19:39:10 +0000
@@ -4,7 +4,7 @@
4 <object class="GtkWindow" id="TaskEditor">4 <object class="GtkWindow" id="TaskEditor">
5 <property name="can_focus">False</property>5 <property name="can_focus">False</property>
6 <property name="title" translatable="yes">Task</property>6 <property name="title" translatable="yes">Task</property>
7 <property name="default_width">450</property>7 <property name="default_width">500</property>
8 <property name="default_height">400</property>8 <property name="default_height">400</property>
9 <signal name="configure-event" handler="on_move" swapped="no"/>9 <signal name="configure-event" handler="on_move" swapped="no"/>
10 <child>10 <child>
@@ -93,6 +93,36 @@
93 </packing>93 </packing>
94 </child>94 </child>
95 <child>95 <child>
96 <object class="GtkSeparatorToolItem" id="toolbutton2">
97 <property name="visible">True</property>
98 <property name="can_focus">False</property>
99 </object>
100 <packing>
101 <property name="expand">False</property>
102 <property name="homogeneous">True</property>
103 </packing>
104 </child>
105 <child>
106 <object class="GtkMenuToolButton" id="open_parents">
107 <property name="visible">True</property>
108 <property name="can_focus">False</property>
109 <property name="label" translatable="yes">Open parent task</property>
110 <property name="stock_id">gtk-go-up</property>
111 <accelerator key="p" signal="clicked" modifiers="GDK_CONTROL_MASK"/>
112 <child internal-child="accessible">
113 <object class="AtkObject" id="open_parents-atkobject">
114 <property name="AtkObject::accessible-name" translatable="yes">Open parent task</property>
115 <property name="AtkObject::accessible-description" translatable="yes">Opens parent task of this task</property>
116 </object>
117 </child>
118 <signal name="clicked" handler="on_open_parent_clicked" swapped="no"/>
119 </object>
120 <packing>
121 <property name="expand">False</property>
122 <property name="homogeneous">True</property>
123 </packing>
124 </child>
125 <child>
96 <object class="GtkSeparatorToolItem" id="separator_note">126 <object class="GtkSeparatorToolItem" id="separator_note">
97 <property name="visible">True</property>127 <property name="visible">True</property>
98 <property name="can_focus">False</property>128 <property name="can_focus">False</property>
@@ -186,7 +216,7 @@
186 <property name="invisible_char">●</property>216 <property name="invisible_char">●</property>
187 <property name="width_chars">10</property>217 <property name="width_chars">10</property>
188 <signal name="changed" handler="startingdate_changed" swapped="no"/>218 <signal name="changed" handler="startingdate_changed" swapped="no"/>
189 <signal name="focus-out-event" handler="startdate_focus_out"/>219 <signal name="focus-out-event" handler="startdate_focus_out" swapped="no"/>
190 </object>220 </object>
191 <packing>221 <packing>
192 <property name="expand">False</property>222 <property name="expand">False</property>
@@ -249,7 +279,7 @@
249 <property name="invisible_char">●</property>279 <property name="invisible_char">●</property>
250 <property name="width_chars">10</property>280 <property name="width_chars">10</property>
251 <signal name="changed" handler="duedate_changed" swapped="no"/>281 <signal name="changed" handler="duedate_changed" swapped="no"/>
252 <signal name="focus-out-event" handler="duedate_focus_out"/>282 <signal name="focus-out-event" handler="duedate_focus_out" swapped="no"/>
253 </object>283 </object>
254 <packing>284 <packing>
255 <property name="expand">False</property>285 <property name="expand">False</property>
@@ -312,7 +342,7 @@
312 <property name="invisible_char">●</property>342 <property name="invisible_char">●</property>
313 <property name="width_chars">10</property>343 <property name="width_chars">10</property>
314 <signal name="changed" handler="closeddate_changed" swapped="no"/>344 <signal name="changed" handler="closeddate_changed" swapped="no"/>
315 <signal name="focus-out-event" handler="closeddate_focus_out"/>345 <signal name="focus-out-event" handler="closeddate_focus_out" swapped="no"/>
316 </object>346 </object>
317 <packing>347 <packing>
318 <property name="expand">False</property>348 <property name="expand">False</property>

Subscribers

People subscribed via source and target branches

to status/vote changes: