GTG

Merge lp:~izidor/gtg/fix-625708 into lp:~gtg/gtg/old-trunk

Proposed by Izidor Matušov
Status: Merged
Merged at revision: 934
Proposed branch: lp:~izidor/gtg/fix-625708
Merge into: lp:~gtg/gtg/old-trunk
Diff against target: 37 lines (+10/-2)
1 file modified
GTG/gtk/browser/browser.py (+10/-2)
To merge this branch: bzr merge lp:~izidor/gtg/fix-625708
Reviewer Review Type Date Requested Status
Luca Invernizzi (community) Approve
Review via email: mp+56764@code.launchpad.net

Description of the change

Tag completion did not work prior working on this bug so it is not related to this change (it is a regression)

I use the patch for a long time in GTG 0.2.4.

To post a comment you must log in.
Revision history for this message
Luca Invernizzi (invernizzi) wrote :

Approved. Just changed the string "NewTask" to "NewTag" because we are applying a tag (i.e: not a task) to one of our tasks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'GTG/gtk/browser/browser.py'
2--- GTG/gtk/browser/browser.py 2011-04-04 07:48:46 +0000
3+++ GTG/gtk/browser/browser.py 2011-04-07 13:28:34 +0000
4@@ -132,6 +132,10 @@
5 #Autocompletion for Tags
6 self._init_tag_list()
7 self._init_tag_completion()
8+
9+ # Rember values from last time
10+ self.last_added_tags = "NewTask"
11+ self.last_apply_tags_to_subtasks = False
12
13 self.restore_state_from_conf()
14
15@@ -1008,9 +1012,9 @@
16 # We don't want to reset the text entry and checkbox if we got
17 # sent back here after a warning.
18 if not tryagain:
19- tag_entry.set_text("NewTag")
20- apply_to_subtasks.set_active(False)
21+ tag_entry.set_text(self.last_added_tags)
22 tag_entry.set_completion(self.tag_completion)
23+ apply_to_subtasks.set_active(self.last_apply_tags_to_subtasks)
24 tag_entry.grab_focus()
25 addtag_dialog = self.builder.get_object("addtag_dialog")
26 addtag_dialog.run()
27@@ -1046,6 +1050,10 @@
28 for new_tag in new_tags:
29 task.add_tag(new_tag)
30 task.sync()
31+
32+ # Rember the last actions
33+ self.last_added_tags = tag_entry.get_text()
34+ self.last_apply_tags_to_subtasks = apply_to_subtasks.get_active()
35
36 def on_tag_entry_key_press_event(self, widget, event):
37 if gtk.gdk.keyval_name(event.keyval) == "Return":

Subscribers

People subscribed via source and target branches

to status/vote changes: