← Back to team overview

gtg team mailing list archive

[Merge] lp:~gtg-user/gtg/tomboy-quickfix into lp:gtg

 

Luca Invernizzi has proposed merging lp:~gtg-user/gtg/tomboy-quickfix into lp:gtg.

    Requested reviews:
    Gtg developers (gtg)
Related bugs:
  #475877 plugins activation should be instantly applied
  https://bugs.launchpad.net/bugs/475877


Bug #475877.
Tomboy plugin now ignores the closing of the task if the plugin was not active during the opening of the task.
-- 
https://code.launchpad.net/~gtg-user/gtg/tomboy-quickfix/+merge/14507
Your team Gtg developers is subscribed to branch lp:gtg.
=== modified file 'GTG/plugins/tomboy/tomboy.py'
--- GTG/plugins/tomboy/tomboy.py	2009-10-04 19:23:28 +0000
+++ GTG/plugins/tomboy/tomboy.py	2009-11-05 22:15:18 +0000
@@ -34,6 +34,7 @@
         self.token_start = 'TOMBOY__'
         self.token_end = '|'
         self.path = os.path.dirname(os.path.abspath(__file__))
+        self.findTomboyIconPath()
 
     #Tomboy installation is checked through the presence of its icon
     def findTomboyIconPath(self):
@@ -80,6 +81,10 @@
 
     # Converts all tomboy note widgets in the  equivalent text
     def onTaskClosed(self, plugin_api):
+        if not  hasattr (self, "activated") or not self.activated == True:
+            #plugin has not been properly activated, (bug 475877 )
+            # closing without executing onTaskClosed
+            return
         if not self.checkTomboyPresent():
             return False
         for anchor in self.anchors:
@@ -144,6 +149,7 @@
             token_ending = text.find(self.token_end)
 
     def onTaskOpened(self, plugin_api):
+        self.activated = True
         if not self.checkTomboyPresent():
             return False
         #NOTE: get_textview() only works in this function


Follow ups