pluginAPI's selection "changed" signal works only for last enabled plugin
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GTG |
Fix Released
|
High
|
Parin Porecha |
Bug Description
steps to reproduce the bug in pluginAPI -
Please get this branch https:/
I’ve created a clone plugin of ‘Not today’ called ‘Yes today’. This plugin sets start date of selected tasks as ‘Today’. All of the code is same. Just button name, icon and details in .gtg-plugin file are different.
- Enable ‘Not today’ plugin
- You’ll see a button ‘Do it tomorrow’ in toolbar
- Now, select any no. of arbitrary tasks. You’ll see that the button gets enabled. On clicking it the start date gets set correctly. - On clicking elsewhere, the button gets disabled. So, click elsewhere to disable the button.
- Now enable ‘Yes today’ plugin
- You’ll see a button ‘Do it today’ in toolbar after the previous button
- Now select any no. of arbitrary tasks. Now what you’ll see is that ‘Do it today’ button gets enabled. But, ‘Do it tomorrow’ does not.
- Now disable the plugin ‘Yes today’
- Select any task/s. You’ll get an error message about the button of ‘Yes today’
This is just one way of reproducing this bug. Disabling one plugin, enabling the other to change button positions and then repeating the process gives same result. Either the other button does not work, or you get an error message.
Related branches
- Izidor Matušov: Approve
-
Diff: 51 lines (+12/-4)2 files modifiedGTG/core/plugins/api.py (+10/-4)
GTG/core/plugins/engine.py (+2/-0)
Changed in gtg: | |
status: | In Progress → Fix Committed |
Changed in gtg: | |
status: | Fix Committed → Fix Released |
Is this the traceback that you are getting on disabling the "Not Today" plugin and clicking on any task?
Traceback (most recent call last): nimit/project/ gtg/plugin_ bug/GTG/ core/plugins/ api.py" , line 68, in __selection_changed selection_ changed_ callback( selection) nimit/project/ gtg/plugin_ bug/GTG/ plugins/ yes_today/ yes_today. py", line 47, in selection_changed tb_button. set_sensitive( True)
File "/home/
self.
File "/home/
self.
AttributeError: 'bool' object has no attribute 'set_sensitive'