Introduction
Many people don't like the GTK+ file selector. Although GTK+ 2.4 has a new file selector now, there are still some problems:
- The new file selector API is not compatible with the old one. This means applications will have to explicit support the new file selector. Right now, many apps still use the old file selector.
- Not everybody has upgraded or wants to upgrade to GTK+ 2.4.
I've improved the (old) file selector and made it more useful and usable.
Improved file selector
- The file selector now has Back, Up, Reload, Home, Bookmarks, Terminal and File Manager buttons. All toolbar buttons have tooltips.
- The file operation buttons are turned into toolbar buttons with nice icons.
- Removed the . and .. from the file list; they are now replaced by the Reload and Up buttons.
- UI cleanups: I changed the spacing in order to make the dialog look nicer and more HIG-compliant.
- The file list now has a Date and Size field.
- Removed the "Selection: /foo" label since it's kind of redundant. This also gives more space to the file list.
- The pulldown menu has been changed to a combo box. This can also be accessed using Ctrl+L.
- It will remember the last directory you visited, even when the GtkFileSelector widget is destroyed.
- If the app is linked to gnome-vfs, the file selector will display each file's file type name. If the app is linked to libgnomeui too, the file selector will also display the file icons. This feature does not add any dependancies to gnome-vfs or libgnomeui! Pure GTK+ will work like before, but GNOME apps will "magically" gain the ability to display file types and icons.
- Adds a filter combo box (code by Daniel Speyer).
Environment variables
Some features have performance penalties. Here are some environment variables to disable them.
- Set GTK_FILESEL_NO_ICONS to 1 to disable looking up icons for files.
- Set GTK_FILESEL_NO_MIME to 1 to disable file type detection. This will also disable icons.
- Set GTK_FILESEL_SIMPLE to 1 to disable all columns (Date, Size, etc.) except File. This will disable icon lookup and file type detection too.
- Set GTK_FILESEL_NO_FILTER to 1 to disable the filter combo box.
Downloads
RPM for Fedora Core 1
This RPM is the GTK+ RPM that comes with Fedora Core 1, but patched with the new file selector.
Download the RPM (3.2 MB)
The patch
If want to apply the patch manually, or just want to look at it, you can download it here:
Patch for GTK 2.2
Patch for GTK 2.4
Patch for GTK 2.6
Date: 2005-01-07
Discussion
Want to comment on this file selector? Go to
the GnomeSupport.org forums.

Copyright © 2004 Hongli Lai (most icons are from
GNOME and the background is from
LinuxArt.com)