GTG

Code review comment for lp:~invernizzi/gtg/tomboy-fix

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

sure.
The check checkTomboyPresent() has been introduced after removing the dbus dependency of the plugin (because looking for tomboy in dbus launches tomboy as a side effect). checkTomboyPresent() simply checks that tomboy is installed.
In order to avoid checking each time that some action require tomboy presence, the plugin checks once per run and then sets the self.activated flag to true.

The self.activated = True in the fist line in onTaskOpened is what causes the problem. Is a leftover of before the intruduction of checkTomboyPresent().
In practice, it disables the following check of tomboy presence, because checkTomboyPresent() skips the check since self.activated is already set to true.

The other modification, in addButtonToToolbar(), shouldn't be needed, since the check of tomboy presence should happen before. I put it there because, in case anything goes wrong, it gracefully disables the plugin without making it crash.

« Back to merge proposal