I've published a fully working prototype at testing/background branch.
Fetch it, test it, enjoy it. But *please* don't look at the source code :P
This theming thing ended up being a /lot/ more complex than I expected. Even the "quick-and-dirty" approach took a whole day to get it right. So it was not "quick" at all, but it is surely /very/ dirty.
B
Next steps (wanna join Philippe?), in no particular order:
- Scan both data_dir /and/ prefs_dir, so user can create his own themes
- Use the above logic in a elegant way in gg.available_themes, so singularity.py can use that list to check prefs file and arg parsing (like languages)
- Always Load default theme first and then the requested theme, so requested may afford to be an incomplete theme. Kinda like the way languages is handled currently. And then we can delete those awful symlinks in vector
- Parse themes.dat from each theme, so user can map images to arbitrary files (instead fixed names like "earth_night.{png,jpg}"
- Once this is done, use more "generic" names for the image keys in code: background_day, background_night, icon, arrow
- Make themes a Class, with attributes instead of keys in gg.images
- Reload Earth images in a more elegant, non-hack-ish way
And, once this is done, the easy ones:
- Make icon, arrow, and, why not? fonts themable too :)
Good luck me and whoever ventures into that ;)
ML
On Monday, May 7, 2012 5:25:59 PM UTC-3, Philippe Tetar wrote: