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 132255 - Multiple selection mode needs logic from GtkFileSelection
Multiple selection mode needs logic from GtkFileSelection
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.3.x
Other All
: High major
: ---
Assigned To: Federico Mena Quintero
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2004-01-23 02:21 UTC by Federico Mena Quintero
Modified: 2011-02-04 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to make it use gtk_tree_view_get_cursor(). (2.58 KB, patch)
2004-03-21 22:20 UTC, Federico Mena Quintero
none Details | Review

Description Federico Mena Quintero 2004-01-23 02:21:09 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.
Comment 1 Federico Mena Quintero 2004-01-23 19:41:47 UTC
The functions that need this are in gtkfilechooserdefault.c:

  set_select_multiple()
  update_chooser_entry()
  check_preview_change()
  tree_selection_changed()
Comment 2 Federico Mena Quintero 2004-01-23 19:44:44 UTC
The function in gtkfilesel.c with the bits we need to port is
gtk_file_selection_file_changed().
Comment 3 Federico Mena Quintero 2004-03-10 19:07:27 UTC
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.
Comment 4 Federico Mena Quintero 2004-03-21 22:19:59 UTC
Attaching patch with fix.
Comment 5 Federico Mena Quintero 2004-03-21 22:20:47 UTC
Created attachment 25861 [details] [review]
Patch to make it use gtk_tree_view_get_cursor().
Comment 6 Michael Natterer 2004-03-22 16:40:30 UTC
Patch works like a charm with gimp 2.0 :) Thanks a lot!
Comment 7 Federico Mena Quintero 2004-03-25 21:52:04 UTC
Fixed on CVS.