From: Kevin A. <al...@se...> - 2004-08-24 19:07:04
|
>> 3) Image path - this follows on from an observation I made recently. >> When >> you select an image in the background dialog you can use the file >> browser >> to track it down, but in the resource file the path is never stored >> and >> therefore the image fails to load unless it's in the same directory as >> the resource file. >> >> Now why you'd want to locate the image somewhere other than the >> current >> directory I couldn't say... > > Yep, I should probably change the code to save a relative path so you > could select a file and then have it be something like > images/testo.jpg. I'll ponder that for the various places Image is > used. I'm pretty sure relative paths already work, but there is no > attempt to break apart the path and then rejoin it so slashes are > converted to backslashes, etc. > >> 4) Colour...oops...Color picker - could this open with the property's >> current value? At the moment it always starts with black. Just makes >> it >> easier to make a minor color shift and makes the OS X color picker >> look >> better when it opens. > > Yes it could. I just need to change a few lines so that the current > color is passed in as the name arg to the colorDialog. Good one! I'll > look at this along with the image path issue above tomorrow. I've added a relativePath function (swiped from the Python Cookbook) to util.py. The resourceEditor now uses this function for the background image, icon, and file attributes for Image and ImageButton. Those components now get a File... button and openFileDialog for selecting images. I also fixed the default color issue above. I still need to experiment with normalizing the relative path to always use forward slashes so the paths work on each platform, but I need to do a few more tests before checking that in. Anyone working from cvs should let me know if I bused anything. ka |