[Sugar-devel] icon search path

Sascha Silbe sascha-ml-reply-to-2011-2 at silbe.org
Sat Apr 2 14:07:15 EDT 2011


Excerpts from Walter Bender's message of Sat Apr 02 18:24:05 +0200 2011:

> Is there a way to add to the path used to search for icons by name?

>From sugar.activity.main.main():

    gtk.icon_theme_get_default().append_search_path(bundle.get_icons_path())

So something like:

    icon_theme = gtk.icon_theme_get_default()
    for plugin_path in plugin_paths:
        icon_theme.append_search_path(os.path.join(plugin_path, 'icons'))

should do the trick.

Sascha

-- 
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 500 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110402/b3ceb6bc/attachment.pgp>


More information about the Sugar-devel mailing list