ximion / appstream-dep11

Python module to handle Debian DEP-11 metadata
https://github.com/ximion/appstream-generator
GNU Lesser General Public License v3.0
3 stars 3 forks source link

Be compatible with icon themes that have different paths than Adwaita #7

Closed tintou closed 8 years ago

tintou commented 8 years ago

The current implementation looks for /usr/themes/$theme/$size/$iconname It needs to lookup into the index.theme to get the right path inside each theme

ximion commented 8 years ago

This is currently not implemented, since parsing the theme file and creating an in-memory tree of icons is relatively expensive. In any case, if implemented properly, we can parse the theme index, but this quite some work, so it currently doesn't have the highest priority for me, especially since Adwaita and Oxygen support the current layout. This change will probably come together with implementing an on-disk icon-cache (so we don't have to open the theme package over and over again to look for icons).

danirabbit commented 8 years ago

There's now a bounty on Bountysource for $60 here: https://www.bountysource.com/issues/29051104-be-compatible-with-icon-themes-that-have-different-paths-than-adwaita

ximion commented 8 years ago

Oh, cool :D (I never saw someone using Bountysource, although I always thought it was an awesome idea) Problem for me is time, and that I would need to complete the task this week, since I don't have an archive mirror of sufficient size on my laptop (and won't be close to my main computer for a few weeks). Still, I'll get back to this, maybe I can get all other pending tasks done this week afterall :)

ximion commented 8 years ago

I just added basic support for this feature to the generator - I still need to clean up the code a little and fix some performance regressions this introduces, but the feature is generally usable. I tested it with the Enlightment Daily PPA without encountering problems. Can you check if this works for you? Cheers, Matthias

tintou commented 8 years ago

That's really a big step forward for us, a lot off our apps are now showing. I think that we found a bug in the code: Error: name 'os' is not defined Adding import os to dep11/debfile.py did the trick

ximion commented 8 years ago

Jup, thanks! I am currently travelling an only have my laptop, which limits the amount of testing I can do (I usually run the code against a local Debian and Tanglu mirror to find bugs). Maybe it's soon time to write a proper testsuite :-P

Btw, I would recommend to modernize the Metainfo files Elementary use (lots of "ancient metadata" hints) - that will ensure all tags are processed properly.

ximion commented 8 years ago

All testing done, works as expected. Still ineffeicient though, but to fix that we'll need the stock icon cache (which is a separate task and already on my todo list).