Hi,
I requested the following a week or so ago:
- It would be really cool to have a proper directory selection (or
popup directory chooser) as an option on the inkex dialog. This way the user doesn't have to memorise their favourite directories etc., they can browse to them, or use favourites, etc.
The idea would be to make it easy for extension developers to export files and so on to a useful directory. As there's still no directory widget on the extension GUI (and making one is probably beyond my abilities at the moment), and there's also no document path available in the SVG anymore..., I think I have come up with a simpler, but still reasonable solution:
I've made a small patch (attached) that sends a "--docbase" argument (the directory of the current SVG file) through to the extension (similarly to the way the --id arguments are sent for selected objects), this allows exporting and stuff to happen without the user having to type a directory into a textbox (a tedious job).
Note: If the current inkscape document hasn't been saved, then of course there is no directory to send through. The inkex.py file will usefully default --docbase to ~, which should work on all platforms when used with python's os.path.expanduser() function. (I'm sure there are similar functions within perl, but I refuse to look them up, perl code is bad for your eyes)
Can perhaps someone with more experience here tell me whether my patch here is a reasonable way to do this, and whether this could safely be commited?
Thanks, Craig
PS: Is this kind of thing best sent to the devel mailing list like this, or should I open/reply to a bug in launchpad and attach a patch there?