[Sugar-devel] [GSoC] I need help for Webified - SSB activity favicons
Lucian Branescu
lucian.branescu at gmail.com
Wed Jun 24 20:56:21 EDT 2009
In case you don't know what Webified is
http://wiki.sugarlabs.org/go/Webified http://honeyweb.wordpress.com
In short, I have added to Browse the ability to create SSB
(http://en.wikipedia.org/wiki/Site-specific_browser) activities.
Since I'm generating activities, they need to have icons. After some
discussions, I have decided to use a .svg wrapper icon for all SSBs
that includes the website favicon.
I need to extract the favicon from a website and include it in the
.svg icon. Any thoughts?
Right now, I'm doing
<code>
cls = components.classes['@mozilla.org/network/io-service;1']
io_service = cls.getService(interfaces.nsIIOService)
ns_uri = io_service.newURI(uri, None, None)
cls = components.classes['@mozilla.org/browser/favicon-service;1']
favicon_service = cls.getService(interfaces.nsIFaviconService)
favicon_service.getFaviconData(ns_uri)
</code>
But the last line throws xpcom.Exception: -2147221231. I haven't been
able to figure out what that error is.
More information about the Sugar-devel
mailing list