GNOME Bugzilla – Bug 132255
Multiple selection mode needs logic from GtkFileSelection
Last modified: 2011-02-04 16:16:07 UTC
GtkFileChooser has a multiple selection mode. However, the correct way to update the filename entry and the preview depend on logic present in the old GtkFileSelection, which is not in GtkFileChooser. This involves diffing the old and new selection sets, and setting the entry and the preview to the most recently-selected file.
The functions that need this are in gtkfilechooserdefault.c: set_select_multiple() update_chooser_entry() check_preview_change() tree_selection_changed()
The function in gtkfilesel.c with the bits we need to port is gtk_file_selection_file_changed().
We may not need to do all that magic; isn't gtk_tree_view_get_cursor() enough for this? Think of going down the list of files with Ctrl-Down, and marking the files you want to open with Ctrl-Space. You do want the file corresponding to the cursor row to be previewed.
Attaching patch with fix.
Created attachment 25861 [details] [review] Patch to make it use gtk_tree_view_get_cursor().
Patch works like a charm with gimp 2.0 :) Thanks a lot!
Fixed on CVS.