[Sugar-devel] rethinking your icon customization patch

Daniel Narvaez dwnarvaez at gmail.com
Wed Jun 19 11:05:54 EDT 2013


Oh yes, you will need to invalidate both caches. I guess the shell can keep
a file monitor on the icons dir and invalidate when it changes.

On Wednesday, 19 June 2013, Walter Bender wrote:

> On Wed, Jun 19, 2013 at 10:53 AM, Daniel Narvaez <dwnarvaez at gmail.com<javascript:;>>
> wrote:
> > About the cache, did you try
> >
> >
> https://developer.gnome.org/gtk3/stable/GtkIconTheme.html#gtk-icon-theme-rescan-if-needed
>
> Tried that. Sugar seems to cache its icons separately from GTK. There
> used to be a cache file, but now I think it is all in memory. I need
> to dig deeper.
>
> -walter
> >
> >
> > On Wednesday, 19 June 2013, Walter Bender wrote:
> >>
> >> Here are some thoughts about the custom icon patch:
> >>
> >> (1) if we prepend ~/.sugar/icons to the theme icon path, then anything
> >> in that path will be used (as long as we flush the cache) as per
> >> dnarvaez's comment on the patch
> >> (2) if we have a sugar activity for selecting svg files (from the
> >> journal and some samples) and loading the selected file as
> >> computer-xo.svg into ~/.sugar/icons then we are done.
> >>
> >> #1 is a two-line addition to jarabe/main.py
> >>
> >>     icons_path = os.path.join(os.path.expanduser('~'), '.sugar',
> 'icons')
> >>     Gtk.IconTheme.get_default().prepend_search_path(icons_path)
> >>
> >> #2 is similar to what you already did for the cpsection, only it is a
> >> stand-alone activity similar to xo-colors
> >>
> >> We can use Turtle Art and other activities to generate SVGs. (The old
> >> version of xo-colors let you edit the XO icon... with revisiting in
> >> this context.)
> >>
> >> We need to figure out how to flush the icon cache.
> >>
> >> regards.
> >>
> >> -walter
> >>
> >>
> >> --
> >> Walter Bender
> >> Sugar Labs
> >> http://www.sugarlabs.org
> >
> >
> >
> > --
> > Daniel Narvaez
> >
>
>
>
> --
> Walter Bender
> Sugar Labs
> http://www.sugarlabs.org
>


-- 
Daniel Narvaez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130619/d87c300d/attachment.html>


More information about the Sugar-devel mailing list