nelo
1
Having this:
procedure.add_file_argument("Your File",
_("specify file:"),
_("specify file:"),
Gimp.FileChooserAction.OPEN,
False, None, # None ok?, Default
GObject.ParamFlags.READWRITE)
How can I predefine a filename instead of None?
Ofnuts
2
file=Gio.File.new_for_path('/path/to/file')
or
file=Gio.File.new_build_filenamev(['path','to','file'])
nelo
3
Thank you, ofnuts. Works fine.
One additional question:
What’s the variable for the plug-ins dir?
something like gimp_plug_in_directory
Ofnuts
4
Gimp.directory()
is the root of the user profile.
The doc also mentions a directory_file()
function but it doesn’t show in the Python bindings.
nelo
5
Thanks again.
That helped.