View Single Post
Old 03-09-2011, 09:20 AM   #7
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,731
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
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?
kiwidude is offline   Reply With Quote