GSOC Day 7 – Owners, Icons, Media Begins
I decided to get started on media support in tpclient-pywx today, even though there wasn’t really a definitive specification for how the media properties would be organized. Fortunately, llnz had promised that he would start adding media to the minisec ruleset, so he gave me some idea of how it might be set up.
Since panelPicture.py already had most of the infrastructure for media support in place, I decided to start there. I added a function to attempt to get any image URLs inside an object’s property list, passing that to the panel. I wasn’t able to test it very fully, since llnz had not yet finished his commits. I’ll improve it tomorrow, since he has since managed to put the changes in.
Next, I replaced the code that drew icons by type in the nested list of objects on the right side of the client. It was incompatible with tp04, and I updated it to fit with the code in panelPicture that did a similar job. Mithro has since told me that he doesn’t think we should try to auto-detect these things, instead relying on the media inside each object. So, that might have been a bit of a useless exercise, but we’ll see what comes of it.
Finally, I added a getOwner function to the objectutils library, which will be quite useful for replacing sections of the code that still use the old methods for finding an object’s owner. I started by using it to return colorized objects to the starmap. Now, as in tp03, you can see who owns a starsystem much more easily.
Tomorrow, more media support. I’m looking forward to making some progress on this, so it feels like less of a hack.