GNOME Bugzilla – Bug 326986
PF_FILE not working
Last modified: 2006-07-16 01:18:04 UTC
PF_FILEis not working in CVS HEAD. It returns an (undocumented) tuple, instead of a path string. That is an incompatible change to the way it works up to gimp-2.2. Regardless of that, when a python-fu script is called for the second time in a row, it attempts to load the previous returned value of the control (a tuple) as teh default value. This crashes the script, as the input values to the control should be strings, not tuples. I think the better would be to revert this as it were before, and when someone can spend some time in it, to replace the pf_file by proper gtk_file_selection dialog.
Using an empty string in the registry will solve this I think. (PF_FILE, "images_location", "fix these images:", "") I have no problem registering '/tmp' either or other actual and known paths. Is what is broken that GIMP is told to use a directory which is not there?
What's the state of this issue? We should sort this out before 2.4.
Created attachment 67999 [details] [review] changes pf_file to use a gtk.FileChooserButton which fixes issue Still b0rk. This patch makes use of the new gtk+ file chooser, which is canned up in a nice button widget. PF_FILE gets working fine with this patch.
Looks good to me and I have applied it. But I think we may need to update the pygtk version check in the configure script? 2006-06-27 Sven Neumann <sven@gimp.org> * plug-ins/pygimp/gimpui.py: applied patch from Joao S. O. Bueno Calligaris that makes PF_FILE use a GtkFileChooserButton. Fixes bug #326986.
Yes, that would be needed. I do not know when this GtkFileChooserButton was introduced, but my pygtk is 2.8.2 for gtk 2.8.10 - so I'd guess requiring a pygtk version equal to the gtk versionthat first introduced GtkFileChooserButton will be ok.
That would be GTK+ version 2.6 then.
I just bumped up the pygtk requirement to 2.8.0 for other reasons anyway.