Re: Question about FileChooserDialog




On Fri, 17 Nov 2006 13:21:08 +0100 Murray Cumming wrote:
>> What's the recommended way to present a dialog to
>> the user which allows the user to select several
>> file names? FileChooserDialog seems to allow
>> selection of only one filename.
>
>Many interesting methods are in the FileChooser base class.
>
>For instance, set_select_multiple():
>http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1FileChooser.html#30a13c0df47fab50c93ad8f38db0c88c

Thanks, I see. I assume that I'd retrieve the selected filenames by
calling Gtk::FileChooser::get_filenames() which returns a
Glib::SListHandle<Glib::ustring>.
However, it's not entirely clear how to "clean up" afterwards. The docs say
"Returns:
    A G::SList containing the filenames of all selected files and subfolders in the current folder. Free the returned list with Glib::slist_free(), and the filenames with Glib::free()."

(I assume G::SList is just a typo for Glib::SListHandle)
Glib::slist_free and Glib::free are not listed in the Glib namespace reference at:
http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/namespaceGlib.html
so how are they used? Is there an example somewhere?




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