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
1=== modified file 'AUTHORS'
2--- AUTHORS 2014-03-01 21:15:24 +0000
3+++ AUTHORS 2014-03-05 19:39:10 +0000
4@@ -132,4 +132,5 @@
5 * Sagar Ghuge <ghugesss@gmail.com>
6 * Sushant Raikar <sushantthecoder@gmail.com>
7 * Atit Anand <atit.anand.cs@gmail.com>
8-* Sara Ribeiro <sara.rmgr@gmail.com>
9+* Parth P. Panchal <parthpanchl@gmail.com>
10+* Sara Ribeiro <sara.rmgr@gmail.com>
11\ No newline at end of file
12
13=== modified file 'CHANGELOG'
14--- CHANGELOG 2014-03-01 21:15:24 +0000
15+++ CHANGELOG 2014-03-05 19:39:10 +0000
16@@ -18,6 +18,7 @@
17 * Fix for bug #1286491 : RTM sync backend fails to load, by Pawan Hegde
18 * Fix for bug #1286493 : GTG cannot connect to RTM, by Pawan Hegde
19 * Fix for bug #1288011 : More intuitive title label for tasks, by Sara Ribeiro
20+ * Fix for bug #316922 : Have a link to the parent(s) in the task editor, by Parth Panchal
21
22 2013-11-24 Getting Things GNOME! 0.3.1
23 * Fix for bug #1024473: Have 'Show Main Window' in notification area, by Antonio Roquentin
24
25=== modified file 'GTG/gtk/editor/editor.py'
26--- GTG/gtk/editor/editor.py 2013-11-25 02:37:46 +0000
27+++ GTG/gtk/editor/editor.py 2014-03-05 19:39:10 +0000
28@@ -68,6 +68,7 @@
29 self.subtask_button.set_tooltip_text(GnomeConfig.SUBTASK_TOOLTIP)
30 self.inserttag_button = self.builder.get_object("inserttag")
31 self.inserttag_button.set_tooltip_text(GnomeConfig.TAG_TOOLTIP)
32+ self.open_parents_button = self.builder.get_object("open_parents")
33
34 # Create our dictionary and connect it
35 dic = {
36@@ -95,6 +96,7 @@
37 w, e, GTGCalendar.DATE_KIND_CLOSED),
38 "on_insert_subtask_clicked": self.insert_subtask,
39 "on_inserttag_clicked": self.inserttag_clicked,
40+ "on_open_parent_clicked": self.open_parent_clicked,
41 "on_move": self.on_move,
42 }
43 self.builder.connect_signals(dic)
44@@ -359,6 +361,20 @@
45 menu.append(mi)
46 if tag_count > 0:
47 self.inserttag_button.set_menu(menu)
48+
49+ # Refreshing the parent list in open_parent_button
50+ menu = Gtk.Menu()
51+ parents = self.task.get_parents()
52+ if len(parents) > 0:
53+ for parent in self.task.get_parents():
54+ task = self.req.get_task(parent)
55+ mi = Gtk.MenuItem(label = task.get_title(), use_underline=False)
56+ mi.connect("activate", self.open_parent, parent)
57+ mi.show()
58+ menu.append(mi)
59+ self.open_parents_button.set_menu(menu)
60+ else:
61+ self.open_parents_button.set_sensitive(False)
62
63 if refreshtext:
64 self.textview.modified(refresheditor=False)
65@@ -503,6 +519,13 @@
66 def inserttag(self, widget, tag):
67 self.textview.insert_tags([tag])
68 self.textview.grab_focus()
69+
70+ def open_parent_clicked(self, widget):
71+ self.vmanager.open_task(self.task.get_parents()[0])
72+
73+ # On click handler for open_parent_button's menu items
74+ def open_parent(self, widget, tid):
75+ self.vmanager.open_task(tid)
76
77 def save(self):
78 self.task.set_title(self.textview.get_title())
79
80=== modified file 'GTG/gtk/editor/taskeditor.ui'
81--- GTG/gtk/editor/taskeditor.ui 2014-02-18 21:25:17 +0000
82+++ GTG/gtk/editor/taskeditor.ui 2014-03-05 19:39:10 +0000
83@@ -4,7 +4,7 @@
84 <object class="GtkWindow" id="TaskEditor">
85 <property name="can_focus">False</property>
86 <property name="title" translatable="yes">Task</property>
87- <property name="default_width">450</property>
88+ <property name="default_width">500</property>
89 <property name="default_height">400</property>
90 <signal name="configure-event" handler="on_move" swapped="no"/>
91 <child>
92@@ -93,6 +93,36 @@
93 </packing>
94 </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>
126 <object class="GtkSeparatorToolItem" id="separator_note">
127 <property name="visible">True</property>
128 <property name="can_focus">False</property>
129@@ -186,7 +216,7 @@
130 <property name="invisible_char">●</property>
131 <property name="width_chars">10</property>
132 <signal name="changed" handler="startingdate_changed" swapped="no"/>
133- <signal name="focus-out-event" handler="startdate_focus_out"/>
134+ <signal name="focus-out-event" handler="startdate_focus_out" swapped="no"/>
135 </object>
136 <packing>
137 <property name="expand">False</property>
138@@ -249,7 +279,7 @@
139 <property name="invisible_char">●</property>
140 <property name="width_chars">10</property>
141 <signal name="changed" handler="duedate_changed" swapped="no"/>
142- <signal name="focus-out-event" handler="duedate_focus_out"/>
143+ <signal name="focus-out-event" handler="duedate_focus_out" swapped="no"/>
144 </object>
145 <packing>
146 <property name="expand">False</property>
147@@ -312,7 +342,7 @@
148 <property name="invisible_char">●</property>
149 <property name="width_chars">10</property>
150 <signal name="changed" handler="closeddate_changed" swapped="no"/>
151- <signal name="focus-out-event" handler="closeddate_focus_out"/>
152+ <signal name="focus-out-event" handler="closeddate_focus_out" swapped="no"/>
153 </object>
154 <packing>
155 <property name="expand">False</property>

Subscribers

People subscribed via source and target branches

to status/vote changes: