Evan Hisey said the following, on 08/02/2008 06:43: > Duncan- > I am having trouble figuring out the bitmap calls in osd.py. The > last thing that needs to be patch to get the TuxnTosh them ready to go > is figuring out why I get this warning at form osd.py: > 'WARNING osd.py (645): Bitmap file > "/home/barnowl/freevo-1.8/share/freevo/images/re/freevo/icons/themes/tuxntosh2/appletux.jpeg" > doesn't exist!' . It is ture this does not exist. what is happening is > the actual path to the image directory is getting appended to the > bitmap uri information in the skin. That part makes since and is > occurring at line 642 in osd.py ( I think). What is odd, is that > instead of just pre-pending like one would expect, I am losing the > first 8 characters of the file path. For example if the installed path > to the images directory was > "/home/barnowl/freevo-1.8/share/freevo/images/" and the file path in > the skin was /usr/share/freevo/icons/themes/tuxntosh2/appletux.jpeg > (as it happens to be in the case) I would expect the pre-pended > filename to be > "/home/barnowl/freevo-1.8/share/freevo/images//icons/themes/tuxntosh2/appletux.jpeg" > not > "/home/barnowl/freevo-1.8/share/freevo/images/re/freevo/icons/themes/tuxntosh2/appletux.jpeg". > > As I am not familiar with exactly who the url[8:] works, but changing > it to url[1:] produces the expected results and does not appear to > affect any of the other themes. The change is thus changing thisat > lines 641-642: > if not os.path.isfile(filename): > filename = os.path.join(config.IMAGE_DIR, url[8:]) >
Good question, it looks like a bit of nonsense to me but because it is so explicit it must have been done for a good reason. I can only guess that it is to remove file:/// from the URI, if this is the case then it has been done badly as it would have been clearer and more reliable if the code had a startswith('file://'). Personally I hardly ever write comments but this is one case that deserves a comment. I suspect that the path to the jpeg should be set to something like: '/themes/tuxntosh2/appletux.jpeg' then the [8:] would work. You need to check what has been done in other skins. > to this: > if not os.path.isfile(filename): > filename = os.path.join(config.IMAGE_DIR, url[1:]) > > With this change I can rewrite the .fxd to match the new path > structure and have a working Tuxntosh theme. Anyone see or know of an > obvious issue with this change? HTH Duncan ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel