xfce_resource_pop_path

edscott wilson garcia edscott at xfce.org
Fri Mar 19 01:19:54 CET 2004


El jue, 18-03-2004 a las 08:10, Benedikt Meurer escribió:
> edscott wilson garcia wrote:
> > Hey Benny,
> 
> Hi Edscott,
> 
> > Looking into the new libxfce4util/xfce-resource.c routines, I have a
> > small comment. I would need a small function, 
> > xfce_resource_clear(XfceResourceType type) to clear the contents of the
> > respective glist (pop everything of the specified type). Is it OK if I
> > commit a function to do such or would you rather do it yourself?
> 
> I think you misunderstood the usage of the functions. Theres no need to clear 
> any of the GLists, as it would make the whole module useless. The push/pop are 
> provided for modules that temporarily need to add further paths, but should 
> not be used unless theres no other way. The preferred solution is to move the 
> files to the locations as specified in the respective XDG standard.

If that means the routines cannot be used to search paths for icon
themes, or non-XDG places like where the panel icon themes are currently
located, then nothing is gained from using the functions. If we limiting
ourselves to XDG, then I see much easier, faster, and efficient just to
access the XDG defined paths directly and forget about the overhead of
loading a dynamic library. Probably the fastest approach is to use
inline code via macros. 

> 
> Could you explain, why you see a need for a clear function?


Sure. I can see much usefulness of the functions for icon themes. To
change an icon theme on the fly you have to remove all paths to old
theme and insert new paths to new theme. If it were just one path, no
problem. Push and pop does the trick. But each theme can have a whole
bunch (undetermined amount) of paths necessary to find icons. The
easiest way is to wipe the paths clean and put in the new ones.
Of course that would probably wipe out one or two XDG defined paths too,
but since that's standard, there is no problem at all to reinsert them
again. No magic to that ;-)

Without a clear function I would have to keep count of what's been
pushed and popped and I'm afraid I don't have time for that at this
moment. 

regards,

Edscott  

> 
> > regards,
> > Edscott
> 
> regards,
> Benedikt




More information about the Xfce4-dev mailing list