GTG

Merge lp:~gtg-user/gtg/bugfix-1001962 into lp:~gtg/gtg/old-trunk

Proposed by Alan Gomes Alvino
Status: Rejected
Rejected by: Izidor Matušov
Proposed branch: lp:~gtg-user/gtg/bugfix-1001962
Merge into: lp:~gtg/gtg/old-trunk
Diff against target: 29 lines (+8/-2)
2 files modified
CHANGELOG (+1/-0)
GTG/gtk/editor/taskview.py (+7/-2)
To merge this branch: bzr merge lp:~gtg-user/gtg/bugfix-1001962
Reviewer Review Type Date Requested Status
Izidor Matušov Disapprove
Lionel Dricot (community) Disapprove
Review via email: mp+111329@code.launchpad.net

Description of the change

When create a tag after every word pressed the taskwiew added a word to the tag_list, what i do was read the last char and verify if it's a 'space'(blank). If is a 'space' the tag is added, if not the tag is not added. A problem in this solution is that the mark of the tag just will be showed after the space.

To post a comment you must log in.
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

There are multiple problems in this solution:

1) A tag could be followed by many characters, not only a space
2) A tag could be followed by the end of the text

But, more importantly, this doesn't solve the root cause of the bug which is that a tag with 0 tasks is not removed from the sidebar. That's where the real bug is.

review: Disapprove
Revision history for this message
Izidor Matušov (izidor) wrote :

This bug should be solved in LibLarch. As Lionel said, your solution is a workaround and doesn't solve the reason of this bug.

review: Disapprove

Unmerged revisions

1199. By Alan Gomes <email address hidden>

Changelog changed

1198. By Alan Gomes <email address hidden>

Fix the bug getting the forward char of the end of word and checking if is space

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CHANGELOG'
--- CHANGELOG 2012-06-09 12:25:03 +0000
+++ CHANGELOG 2012-06-21 03:19:18 +0000
@@ -1,4 +1,5 @@
12012-0?-?? Getting Things GNOME! 0.312012-0?-?? Getting Things GNOME! 0.3
2 * Fix the insert tag menu #1001962
2 * Hide tasks with due date someday, #9313763 * Hide tasks with due date someday, #931376
3 * New Date class by Paul Kishimoto and Izidor Matušov4 * New Date class by Paul Kishimoto and Izidor Matušov
4 * Parse due:3 as next 3rd day in month5 * Parse due:3 as next 3rd day in month
56
=== modified file 'GTG/gtk/editor/taskview.py'
--- GTG/gtk/editor/taskview.py 2012-05-20 19:05:20 +0000
+++ GTG/gtk/editor/taskview.py 2012-06-21 03:19:18 +0000
@@ -713,8 +713,13 @@
713 buff.create_mark("/%s"%my_word, word_end, False)713 buff.create_mark("/%s"%my_word, word_end, False)
714 #adding tag to a local list714 #adding tag to a local list
715 new_tags.append(my_word)715 new_tags.append(my_word)
716 #adding tag to the model716 # Added to solve the bug 1001962
717 self.add_tag_callback(my_word)717 word_end.forward_char()
718 check_word = buff.get_text(word_start, word_end)
719 #Get the last char of word and see if is space
720 if(check_word[-1] == ' '):
721 #adding tag to the model
722 self.add_tag_callback(my_word)
718723
719 # We set new word boundaries724 # We set new word boundaries
720 word_start = char_end.copy()725 word_start = char_end.copy()

Subscribers

People subscribed via source and target branches

to status/vote changes: