Actually while doing this I found what I wonder is a bug. Bear in mind I have commented out any modification by my code.
To replicate (I am sure there are easier ways) paste this at line 284 of gui2/preferences/plugins.py:
from calibre.gui2 import gprefs
print gprefs['action-layout-toolbar']
Then add a plugin (debug output will display value as a list), click cancel and go to "Customize the toolbar", add or remove an item from the main toolbar, click apply, go back to plugins and choose add again. The prefs will display as a tuple!
Is that expected? My code is normally expecting to append to a list and suddenly it has a tuple to deal with?
|