FileChooserIF.setUri

Sets the file referred to by uri as the current file for the file chooser, by changing to the URI's parent folder and actually selecting the URI in the list. If the chooser is GTK_FILE_CHOOSER_ACTION_SAVE mode, the URI's base name will also appear in the dialog's file name entry. If the URI isn't in the current folder of chooser, then the current folder of chooser will be changed to the folder containing uri. This is equivalent to a sequence of gtk_file_chooser_unselect_all() followed by gtk_file_chooser_select_uri(). Note that the URI must exist, or nothing will be done except for the directory change. If you are implementing a File/Save As... dialog, you should use this function if you already have a file name to which the user may save; for example, when the user opens an existing file and then does File/Save As... on it. If you don't have a file name already — for example, if the user just created a new file and is saving it for the first time, do not call this function. Since 2.4

interface FileChooserIF
int
setUri
(
string uri
)

Parameters

uri string

the URI to set as current

Return Value

Type: int

TRUE if both the folder could be changed and the URI was selected successfully, FALSE otherwise.

Meta