Package: gtk

Function gtk:file-chooser-namestring

Lambda List

gtk:file-chooser-namestring (chooser)

Syntax

(gtk:file-chooser-namestring chooser) => path
(setf (gtk:file-chooser-namestring chooser) path)

Arguments

chooser -- a gtk:file-chooser widget
path -- a pathname or a namestring for the file

Details

The gtk:file-chooser-namestring function gets the namestring for the currently selected file in the file selector. If multiple files are selected, one of the files will be returned at random. If the file chooser is in folder mode, this function returns the selected folder.

The (setf gtk:file-chooser-namestring) function sets namestring as the current file for the file chooser, by changing to the file's parent folder and actually selecting the file in list. If the chooser is in :save mode, the file's base name will also appear in the dialog's file name entry.

Lisp implementation

This function corresponds to the gtk:file-chooser-file function, but has a Lisp namestring as an argument for the file. The type conversion between a g:file object and a namestring is automatically done with the g:file-as-namestring type specifier.

Warning

The gtk:file-chooser implementation is deprecated since 4.10. Use the gtk:file-dialog object instead.
 

See also

2024-11-21