I'm piggybacking on my own message: is there any (historical, I presume) reason why, when packing a theme, getstyle relocates files with their whole path? I.e. from /long/path/to/file.png to themeDir/long/path/to/file.png?

It seems to me that a much cleaner solution is to relocate /long/path/to/file.png to themeDir/assets/file.png. The only problem this seems to have is that a theme creator may use files with the same name, but located in different places, and getstyle would either have to rename these automatically (not too difficult) or bork and warn the user (trivial, but possibly annoying to use).

Fixing the code as it is now would require implementing an equivalent to mkdir -p, which is a rather unpleasant exercise in POSIX programming; relocating things to themeDir/assets/ requires about 1/10th of the code of an ersatz mkdir -p (i.e. a trivial mkdir() + a "get file name from this absolute path" function).

So I'm going to amend makeThemePack to do the latter, but I wanted to announce my intention to do so in advance, in case anyone more familiar with WMaker's codebase has relevant thoughts. This looks like a pretty obvious thing to do, so I thought I'd ask if I'm not missing something before doing something Really Really Smart on twenty year-old code

Alex


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to