efreet_icon_private.h should be private to external code interacting
with the icon cache, so name it efreet_cache_private.h and only include
Eet.h there.
SVN revision: 55035
more memory than previous version.
TODO: efreet_icon_cache_create could be speeded up if we did
reuse already generated theme instead when doing inherit work.
NOTE: Let me add a rant against Freedesktop standard. Walking
around 22731 paths for 3051 icons is insane and that's just for
one theme ! Maybe they could give me one SSD...
SVN revision: 55018
The previous logic would create a fake theme object in
efreet_icon_find_theme_check() if we didn't find the theme. Later in
efreet_icon_theme_dir_scan_all() we would delete this theme, and then
segv. As the user hopefully wont query for a bunch of non existing
themes, and each theme object is fairly small, keep all in hash.
SVN revision: 54975
We return a pointer to an internal cache, so no need to do strdup. I we
implement a cache, the pointer will be a return from a mmap'ed file, so
no need to do strdup.
A bit late to do an API break, but must be done.
SVN revision: 54372
But really you should not call it as it will call stat for
every path it guess an icon could be in. For example, elementary_test
Toolbar 5 trigger 41132 call to stat on random place on your harddrive.
SVN revision: 54339
We need to delay deletion of non valid themes until all possible search
dirs are scanned. In Ubuntu 10.10 XDG_DATA_DIRS lists /usr/local/share
before /usr/share, so when searching for hicolor /usr/local/share is
dropped as a valid dir although it exists as it does not contain an
index.theme file.
SVN revision: 53882
Apply badzero.cocci, badnull.coci and badnull2.cocci
This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:
code before patch ||code after patch
===============================================================
return a == NULL; return !a;
return a != NULL; return !!a;
func(a == NULL); func(!a);
func(a != NULL); func(!!a);
b = a == NULL; b = !a;
b = a != NULL; b = !!a;
b = a == NULL ? c : d; b = !a ? c : d;
b = a != NULL ? c : d; b = a ? c : d;
other cases:
a == NULL !a
a != NULL a
SVN revision: 51487