dae/ankiqt — pull request #31 by has207 (2012-11-25 10:09:29+00:00)
Title: Toolbar improvements to make it easier to add new buttons from plugins

Couple of small improvements to make it easier to add toolbar buttons from within plugins.

* Force icon size to 16x16, otherwise they blow up the toolbar.
* Refactor button callbacks into a dict instead of the "case" statement
to make it easier to add new callbacks for buttons from within plugins.

For some context:

I'm working on porting over my plugins from Anki 1.2 and found it a bit painful to add a new button to the toolbar. I managed after a bit of trial and error but I figure these changes would make it much more straightforward for future plugin writers.