After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 326986 - PF_FILE not working
PF_FILE not working
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Gimp-Python
git master
Other All
: Normal normal
: 2.4
Assigned To: Manish Singh
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-01-14 20:48 UTC by Joao S. O. Bueno
Modified: 2006-07-16 01:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
changes pf_file to use a gtk.FileChooserButton which fixes issue (1.61 KB, patch)
2006-06-26 01:57 UTC, Joao S. O. Bueno
committed Details | Review

Description Joao S. O. Bueno 2006-01-14 20:48:15 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.
Comment 1 Carol 2006-01-15 03:02:51 UTC
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?

Comment 2 Sven Neumann 2006-06-19 10:27:06 UTC
What's the state of this issue? We should sort this out before 2.4.
Comment 3 Joao S. O. Bueno 2006-06-26 01:57:43 UTC
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.
Comment 4 Sven Neumann 2006-06-27 19:27:54 UTC
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.
Comment 5 Joao S. O. Bueno 2006-06-28 03:39:01 UTC
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.
Comment 6 Sven Neumann 2006-06-28 05:55:00 UTC
That would be GTK+ version 2.6 then.
Comment 7 Manish Singh 2006-07-16 01:18:04 UTC
I just bumped up the pygtk requirement to 2.8.0 for other reasons anyway.