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 580321 - FileChooserButton forgets file filters
FileChooserButton forgets file filters
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.16.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2009-04-26 18:44 UTC by Helge Stenström
Modified: 2013-05-30 07:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Demonstration of how file filters is not persistent. (513 bytes, text/x-python)
2009-04-26 18:47 UTC, Helge Stenström
  Details
C program demonstrates how file filter is not persistent. (1.22 KB, patch)
2009-04-30 11:52 UTC, Helge Stenström
none Details | Review

Description Helge Stenström 2009-04-26 18:44:05 UTC
Please describe the problem:
A file filer is set to a FileChooserButton. The first time the FileChooserButton is clicked, the filter is there and works. The second time, the filter is gone. This can be confirmed by the FileChooser.list_filters() method, or by the look of the FileChooser dialog.

Expected behavior: The file filter is persistent.
Observed behavior: The file filter disappears after the first activation of the FileChooserButton.

Unknown if this is caused by the "button" or by the FileChooser.

Attached: small demonstration example.
Tested with Ubuntu 8.10 and python-gtk2 version 2.13.0ubuntu8.

Steps to reproduce:
Either run the python program at http://launchpadlibrarian.net/25995141/fcb.py
or

1. Create a gtk.Window, a gtk.FileChooserButton and a gtk.FileFilter.
2. Add a pattern to the FileFilter.
3. Add the filter to the button, and the button to the Window.
4. Start gtk.main()
5. Click the button, which opens a dialog.
6. Observe the Filter being active
7. Select a file and click Open.
8. Click the Button again.
9. Observe that there is no filter; all files in the current directory are visible.


Actual results:
The file filter is active the first time the dialog is used, but not at later times.

Expected results:
The filter should be persistent.

Does this happen every time?
Yes. At least with my installation; Ubuntu 8.10, pygtk (python-gtk2) 2.13.0-0ubuntu8

Other information:
See also bug report at: https://bugs.launchpad.net/ubuntu/+source/pygtk/+bug/367285
Comment 1 Helge Stenström 2009-04-26 18:47:54 UTC
Created attachment 133359 [details]
Demonstration of how file filters is not persistent.
Comment 2 Paul Pogonyshev 2009-04-27 19:20:39 UTC
Cannot reproduce here.  This was most likely a GTK+ (not PyGTK) bug that was fixed at some point.
Comment 3 Helge Stenström 2009-04-30 08:30:15 UTC
I have now tried in Ubuntu 9.04, with pygtk 2.14, on a different computer, and the problem remains. 
Comment 4 Helge Stenström 2009-04-30 11:52:11 UTC
Created attachment 133650 [details] [review]
C program demonstrates how file filter is not persistent.
Comment 5 Helge Stenström 2009-04-30 11:53:06 UTC
The bug demonstration program is now translated to C. (my first C program in many years). It fails in the same way as the Python version. Might still be a programmer error, but the Python program worked on a Solaris workstation. This C program failed on RedHat 4. I'm not sure about the gtk version. How can I find out?

If this is a bug, I suppose it should be reported elsewhere. Where?
Comment 6 Timothy Arceri 2013-05-30 07:07:44 UTC
Can not reproduce using the test C program. Guessing this was fixed a while back as suggested in comment 2.