Patch by Joseph Maher: maher@math.ucsb.edu This is a cleaned up version of the patch (against the cvs tree) I announced on gtk-list on 9/20/99, but didn't upload. This patch adds "most recent file list" functionality to the GtkFileSelection widget. You can choose to replace the text entry box with a combo box containing a list of recent files. The programmer needs to deal with storing the list of files when the gtkfilesel widget is not running, but the widget adds the newly selected file to the list. In particular the list of recent files is _not_ freed when the widget is destroyed. These changes should be completely backwards compatible with earlier code using the file selection widget. If you reject this patch, but think its fixable let me know what needs to be done, and I might do it! ---details--- I've added the following "public" methods: void gtk_file_selection_set_recent (GtkFileSelection *filesel, GList *glist_recent); GList* gtk_file_selection_get_recent (GtkFileSelection *filesel); void gtk_file_selection_remove_recent (GtkFileSelection *filesel); If you don't call any of these, the file slection widget should work exactly as before. To start things off, use the set_recent function, and send it a GList pointer - this should point to a list of recent filenames. These will appear in the combo box list. When you use gtk_file_selection_get_filename to get the filename, you should also call the get_recent function, wihch will return a pointer to the list - this will have the new filename added to the list of recent files. The remove_recent function destroys the combo widget and leaves things as before. I've also added void gtk_file_selection_add_to_recent_list (GtkWidget *widget, GtkFileSelection *filesel); which is used internally by the file selection dialog. I've added the following data to struct GtkFileSelection: GtkWidget *selection_combo; GtkWidget *entry_vbox; GList *glist_recent; The selection_combo pointer is set to NULL unless the set_recent function is caled. When the selection_combo widget exists, the selection_entry widget is set to point to the text entry part of the combo widget. The entry_vbox is a container used to store either the text entry widget or the combo widget as appropriate. The GList pointer points to the list of recent files. I've added the following constant #define MAX_RECENT_FILES 10 At most 10 files are stored in the list. This is a completely arbitrary number.