These are chat archives for spyder-ide/public

10th
Aug 2015
Patrick Moran
@pjm4github
Aug 10 2015 21:46
OK - I googled but cant find what happened to get_icon (used to be in from spyderlib.config import get_icon)
Sylvain Corlay
@SylvainCorlay
Aug 10 2015 21:48
it should not be used directly anymore
now we support two icon themes, Spyder 3, which is based on font-awesome and the previous theme, Spyder 2 now called Spyder 2.
you can get any icon from the current theme using icon_manager.icon(name)
Patrick Moran
@pjm4github
Aug 10 2015 22:07
hmm - I have old code that uses get_icon. How do i port it? Surely someone else has done this. Do you have a hook for a pointer so I can get started? I dont know what the "current theme" is. Where to I find the icon_manager?
BTW - I didn't write the old code. It will be a nightmare for me to port it. I dont know which spyderlib version was used with the old code.
Thanks for helping....
Patrick Moran
@pjm4github
Aug 10 2015 22:43
OK I found it "from spyderlib.utils.qthelpers import get_icon" - whew that was easy...
Sylvain Corlay
@SylvainCorlay
Aug 10 2015 22:43
sorry, I missed your earlier message
you should rather use icon_manager
which will be consistent with the look & feel of the rest of Spyder