← Back to team overview

gtg-user team mailing list archive

[Merge] lp:~gtg-user/gtg/bugfix-1001962 into lp:gtg

 

Alan Gomes Alvino has proposed merging lp:~gtg-user/gtg/bugfix-1001962 into lp:gtg.

Requested reviews:
  Gtg developers (gtg)
Related bugs:
  Bug #1001962 in Getting Things GNOME!: "Writing a tag in a task leave all the intermediary tags"
  https://bugs.launchpad.net/gtg/+bug/1001962

For more details, see:
https://code.launchpad.net/~gtg-user/gtg/bugfix-1001962/+merge/111329

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. 
-- 
https://code.launchpad.net/~gtg-user/gtg/bugfix-1001962/+merge/111329
Your team Gtg users is subscribed to branch lp:~gtg-user/gtg/bugfix-1001962.
=== modified file 'CHANGELOG'
--- CHANGELOG	2012-06-09 12:25:03 +0000
+++ CHANGELOG	2012-06-21 03:19:18 +0000
@@ -1,4 +1,5 @@
 2012-0?-?? Getting Things GNOME! 0.3
+    * Fix the insert tag menu #1001962
     * Hide tasks with due date someday, #931376
     * New Date class by Paul Kishimoto and Izidor Matušov
       * Parse due:3 as next 3rd day in month

=== 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 @@
                         buff.create_mark("/%s"%my_word, word_end, False)
                         #adding tag to a local list
                         new_tags.append(my_word)
-                        #adding tag to the model
-                        self.add_tag_callback(my_word)
+                        # Added to solve the bug 1001962
+                        word_end.forward_char()
+                        check_word = buff.get_text(word_start, word_end)
+                        #Get the last char of word and see if is space
+                        if(check_word[-1] == ' '):
+                            #adding tag to the model
+                            self.add_tag_callback(my_word)
 
                 # We set new word boundaries
                 word_start = char_end.copy()


Follow ups