On Apr 1, 2010, at 12:27, Mjumbe Poe wrote: >> I'd guess it's looking in epiphany's current-working-directory, which is >> likely not what you want. > > you're right, it's looking in the working directory (i copied the ui > file to my home folder and started up epiphany from a terminal; found > the file, no problem). not really ideal. > >> I hadn't considered this before; does anyone know how this worked in the >> Python days? > > i don't know how it worked with python extensions, but wouldn't it > make sense to use the same paths that it searches for .extension > files?
It would be convenient, but not actually make sense. These are just calls out to the actual C functions, which don't take search paths or anything like that, they just look in the cwd. It would appear that in the Python days, people did things like: os.path.join(os.path.dirname(__file__), "delicious%d.png" % pixels) You can use some combination of GLib.path_get_basename and GLib.build_filename and friends, but I'm not sure that we expose the script path (__file__, in python) in the case of epiphany extensions (we do in the case of the 'seed' interpreter, but maybe not the library, I'm not sure). Maybe there's another Epiphany-y way to get the path to the extensions directory? > thanks, > - mjumbe
_______________________________________________ epiphany-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/epiphany-list
