Re: gtk FilechooserWidget



There's a gtk_file_chooser_get_filenames () function and a gtk_file_chooser_get_files () function
<http://developer.gnome.org/gtk3/stable/GtkFileChooser.html#gtk-file-chooser-get-files>http://developer.gnome.org/gtk3/stable/GtkFileChooser.html#gtk-file-chooser-get-filenames
http://developer.gnome.org/gtk3/stable/GtkFileChooser.html#gtk-file-chooser-get-files

Is it what you are looking for ?

Or maybe you need to handle the selection-changed signal :
http://developer.gnome.org/gtk3/stable/GtkFileChooser.html#GtkFileChooser-selection-changed

Hope this helps.

Regards.

On 21/01/2012 19:33, John Emmas wrote:
On 16 Jan 2012, at 15:07, John Emmas wrote:

I'm working with a Gtk::FileChooserWidget (where the user can select multiple files).  Even though multiple 
selections are possible, as the user selects each file I want to display some information about it in a 
separate box.

But how can I found out which file just got selected?  According to the documentation, 'get_filename()' 
returns a selection at random if there's more than one file selected.  So how can I find out which file the 
user last clicked?

I posted the above a few days ago and I'm guessing that no replies means there isn't a way to do this.  If 
that's the case, can I suggest a change to the FileChooserWidget behaviour for a future version of gtk?  
Whenever the widget contains multiple selections I'd like to suggest that get_filename() should return the 
last item clicked, instead of returning a random item according to the current spec.  I can't see much 
advantage in returning a random item whereas returning the last clicked item would be useful IMHO.  For 
consistency it would probably also need to return the last clicked item, even if the last operation was to 
deselect that item.  Don't know how other gtk users feel about this...  anyone else feel that this would be 
better than the current behaviour?

John
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



--
Axel FILMORE




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]