Package: gtk
Function gtk:file-chooser-file
Lambda Listgtk:file-chooser-file (chooser) SyntaxArgumentsDetails The gtk:file-chooser-file function gets the g:file object for
the currently selected file in the file chooser.
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-file) function sets file as the current filename for the file chooser, by changing to the parent folder of the file and actually selecting the file. If the file chooser is in :save mode, the base name of the file will also appear in the file name entry of the dialog. If the file name is not in the current folder of the file chooser, then the current folder of the file chooser will be changed to the folder containing file. Note that the file must exist, or nothing will be done except for the directory change. Examples(if document-is-new (progn ;; the user just created a new document (setf (gtk:file-chooser-current-folder-file chooser) default-file-for-saving) (setf (gtk:file-chooser-current-name chooser) "Untitled document")) (progn ;; the user edited an existing document (setf (gtk:file-chooser-file chooser) existing-file))) Warning | See also |
2024-11-21