Import line: | Gtk = imports.gi.Gtk; |
GIR File: | Gtk-3.0.gir |
C documentation: | GtkFileChooser |
Interface : | FileChooser |
Implementations: | Gtk.FileChooserButton, Gtk.FileChooserDialog, Gtk.FileChooserWidget |
Properties | Defined By | |
---|---|---|
action : Gtk.FileChooserAction
|
Gtk.FileChooser | |
create_folders : gboolean
Whether a file chooser not in GTK_FILE_CHOOSER_ACTION_OPEN mode
will offer the user to create new folders. Whether a file chooser not in GTK_FILE_CHOOSER_ACTION_OPEN mode
will offer the user to create new folders. |
Gtk.FileChooser | |
do_overwrite_confirmation : gboolean
Whether a file chooser in GTK_FILE_CHOOSER_ACTION_SAVE mode
will present an overwrite confirmation dialog if the user selects a file name that already exists. Whether a file chooser in GTK_FILE_CHOOSER_ACTION_SAVE mode
will present an overwrite confirmation dialog if the user selects a file name that already exists. |
Gtk.FileChooser | |
extra_widget : Gtk.Widget
|
Gtk.FileChooser | |
filter : Gtk.FileFilter
|
Gtk.FileChooser | |
local_only : gboolean
|
Gtk.FileChooser | |
preview_widget : Gtk.Widget
|
Gtk.FileChooser | |
preview_widget_active : gboolean
|
Gtk.FileChooser | |
select_multiple : gboolean
|
Gtk.FileChooser | |
show_hidden : gboolean
|
Gtk.FileChooser | |
use_preview_label : gboolean
|
Gtk.FileChooser |
Method / Constructor | Defined By | |
---|---|---|
add_filter
(FileFilter filter)
:
none
Adds filter to the list of filters that the user can select between.
Adds filter to the list of filters that the user can select between.
When a filter is selected, only files that are passed by that filter are displayed. Note that the chooser takes ownership of the filter, so you have to ref and sink it if you want to keep a reference.
|
Gtk.FileChooser | |
Adds a folder to be displayed with the shortcut folders in a file chooser.
Adds a folder to be displayed with the shortcut folders in a file chooser.
Note that shortcut folders do not get saved, as they are provided by the application. For example, you can use this to add a "/usr/share/mydrawprogram/Clipart" folder to the volume list. otherwise. In the latter case, the error will be set as appropriate.
|
Gtk.FileChooser | |
Adds a folder URI to be displayed with the shortcut folders in a file
chooser.
Adds a folder URI to be displayed with the shortcut folders in a file
chooser. Note that shortcut folders do not get saved, as they are provided by the application. For example, you can use this to add a "file:///usr/share/mydrawprogram/Clipart" folder to the volume list. otherwise. In the latter case, the error will be set as appropriate.
|
Gtk.FileChooser | |
get_action
()
:
Gtk.FileChooserAction
Gets the type of operation that the file chooser is performing; see
gtk_file_chooser_set_action().
Gets the type of operation that the file chooser is performing; see
gtk_file_chooser_set_action().
|
Gtk.FileChooser | |
get_create_folders
()
:
gboolean
Gets whether file choser will offer to create new folders.
Gets whether file choser will offer to create new folders.
See gtk_file_chooser_set_create_folders().
|
Gtk.FileChooser | |
get_current_folder
()
:
String
Gets the current folder of chooser as a local filename.
Gets the current folder of chooser as a local filename.
See gtk_file_chooser_set_current_folder(). Note that this is the folder that the file chooser is currently displaying (e.g. "/home/username/Documents"), which is as the currently-selected folder if the chooser is in GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER mode (e.g. "/home/username/Documents/selected-folder/". To get the currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the usual way to get the selection. or NULL if the current path cannot be represented as a local filename. Free with g_free(). This function will also return NULL if the file chooser was unable to load the last folder that was requested from it; for example, as would be for calling gtk_file_chooser_set_current_folder() on a nonexistent folder.
|
Gtk.FileChooser | |
get_current_folder_file
()
:
Gio.File
Gets the current folder of chooser as GFile.
Gets the current folder of chooser as GFile.
See gtk_file_chooser_get_current_folder_uri().
|
Gtk.FileChooser | |
get_current_folder_uri
()
:
String
Gets the current folder of chooser as an URI.
Gets the current folder of chooser as an URI.
See gtk_file_chooser_set_current_folder_uri(). Note that this is the folder that the file chooser is currently displaying (e.g. "file:///home/username/Documents"), which is as the currently-selected folder if the chooser is in GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER mode (e.g. "file:///home/username/Documents/selected-folder/". To get the currently-selected folder in that mode, use gtk_file_chooser_get_uri() as the usual way to get the selection. function will also return NULL if the file chooser was unable to load the last folder that was requested from it; for example, as would be for calling gtk_file_chooser_set_current_folder_uri() on a nonexistent folder.
|
Gtk.FileChooser | |
get_do_overwrite_confirmation
()
:
gboolean
Queries whether a file chooser is set to confirm for overwriting when the user
types a file name that already exists.
Queries whether a file chooser is set to confirm for overwriting when the user
types a file name that already exists. FALSE otherwise.
|
Gtk.FileChooser | |
get_extra_widget
()
:
Gtk.Widget
Gets the current preview widget; see
gtk_file_chooser_set_extra_widget().
Gets the current preview widget; see
gtk_file_chooser_set_extra_widget().
|
Gtk.FileChooser | |
get_file
()
:
Gio.File
Gets the GFile for the currently selected file in
the file selector.
Gets the GFile 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. use g_object_unref() to release it.
|
Gtk.FileChooser | |
get_filename
()
:
String
Gets the filename for the currently selected file in
the file selector.
Gets the filename for the currently selected file in
the file selector. If multiple files are selected, one of the filenames will be returned at random. If the file chooser is in folder mode, this function returns the selected folder. if no file is selected, or the selected file can't be represented with a local filename. Free with g_free().
|
Gtk.FileChooser | |
get_filenames
()
:
Array
Lists all the selected files and subfolders in the current folder of
folder cannot be represented as local filenames they will be ignored.
Lists all the selected files and subfolders in the current folder of
folder cannot be represented as local filenames they will be ignored. (See gtk_file_chooser_get_uris()) containing the filenames of all selected files and subfolders in the current folder. Free the returned list with g_slist_free(), and the filenames with g_free().
|
Gtk.FileChooser | |
get_files
()
:
Array
Lists all the selected files and subfolders in the current folder of chooser
as GFile.
Lists all the selected files and subfolders in the current folder of chooser
as GFile. An internal function, see gtk_file_chooser_get_uris(). containing a GFile for each selected file and subfolder in the current folder. Free the returned list with g_slist_free(), and the files with g_object_unref().
|
Gtk.FileChooser | |
get_filter
()
:
Gtk.FileFilter
Gets the current filter; see gtk_file_chooser_set_filter().
Gets the current filter; see gtk_file_chooser_set_filter().
|
Gtk.FileChooser | |
get_local_only
()
:
gboolean
Gets whether only local files can be selected in the
file selector.
Gets whether only local files can be selected in the
file selector. See gtk_file_chooser_set_local_only()
|
Gtk.FileChooser | |
get_preview_file
()
:
Gio.File
Gets the GFile that should be previewed in a custom preview
Internal function, see gtk_file_chooser_get_preview_uri().
Gets the GFile that should be previewed in a custom preview
Internal function, see gtk_file_chooser_get_preview_uri(). or NULL if no file is selected. Free with g_object_unref().
|
Gtk.FileChooser | |
get_preview_filename
()
:
String
Gets the filename that should be previewed in a custom preview
widget.
Gets the filename that should be previewed in a custom preview
widget. See gtk_file_chooser_set_preview_widget(). no file is selected, or if the selected file cannot be represented as a local filename. Free with g_free()
|
Gtk.FileChooser | |
get_preview_uri
()
:
String
Gets the URI that should be previewed in a custom preview
widget.
Gets the URI that should be previewed in a custom preview
widget. See gtk_file_chooser_set_preview_widget(). selected. Free with g_free().
|
Gtk.FileChooser | |
get_preview_widget
()
:
Gtk.Widget
Gets the current preview widget; see
gtk_file_chooser_set_preview_widget().
Gets the current preview widget; see
gtk_file_chooser_set_preview_widget().
|
Gtk.FileChooser | |
get_preview_widget_active
()
:
gboolean
Gets whether the preview widget set by gtk_file_chooser_set_preview_widget()
should be shown for the current filename.
Gets whether the preview widget set by gtk_file_chooser_set_preview_widget()
should be shown for the current filename. See gtk_file_chooser_set_preview_widget_active().
|
Gtk.FileChooser | |
get_select_multiple
()
:
gboolean
Gets whether multiple files can be selected in the file
selector.
Gets whether multiple files can be selected in the file
selector. See gtk_file_chooser_set_select_multiple().
|
Gtk.FileChooser | |
get_show_hidden
()
:
gboolean
Gets whether hidden files and folders are displayed in the file selector.
Gets whether hidden files and folders are displayed in the file selector.
See gtk_file_chooser_set_show_hidden().
|
Gtk.FileChooser | |
get_uri
()
:
String
Gets the URI for the currently selected file in
the file selector.
Gets the URI for the currently selected file in
the file selector. If multiple files are selected, one of the filenames will be returned at random. If the file chooser is in folder mode, this function returns the selected folder. if no file is selected. Free with g_free()
|
Gtk.FileChooser | |
get_uris
()
:
Array
Lists all the selected files and subfolders in the current folder of
files and subfolders in the current folder.
Lists all the selected files and subfolders in the current folder of
files and subfolders in the current folder. Free the returned list with g_slist_free(), and the filenames with g_free().
|
Gtk.FileChooser | |
get_use_preview_label
()
:
gboolean
Gets whether a stock label should be drawn with the name of the previewed
file.
Gets whether a stock label should be drawn with the name of the previewed
file. See gtk_file_chooser_set_use_preview_label(). name of the previewed file, FALSE otherwise.
|
Gtk.FileChooser | |
list_filters
()
:
Array
Lists the current set of user-selectable filters; see
gtk_file_chooser_add_filter(), gtk_file_chooser_remove_filter().
Lists the current set of user-selectable filters; see
gtk_file_chooser_add_filter(), gtk_file_chooser_remove_filter(). GSList containing the current set of user selectable filters. The contents of the list are owned by GTK+, but you must free the list itself with g_slist_free() when you are done with it.
|
Gtk.FileChooser | |
list_shortcut_folder_uris
()
:
Array
Queries the list of shortcut folders in the file chooser, as set by
gtk_file_chooser_add_shortcut_folder_uri().
Queries the list of shortcut folders in the file chooser, as set by
gtk_file_chooser_add_shortcut_folder_uri(). URIs, or NULL if there are no shortcut folders. Free the returned list with g_slist_free(), and the URIs with g_free().
|
Gtk.FileChooser | |
list_shortcut_folders
()
:
Array
Queries the list of shortcut folders in the file chooser, as set by
gtk_file_chooser_add_shortcut_folder().
Queries the list of shortcut folders in the file chooser, as set by
gtk_file_chooser_add_shortcut_folder(). folder filenames, or NULL if there are no shortcut folders. Free the returned list with g_slist_free(), and the filenames with g_free().
|
Gtk.FileChooser | |
remove_filter
(FileFilter filter)
:
none
Removes filter from the list of filters that the user can select between.
Removes filter from the list of filters that the user can select between.
|
Gtk.FileChooser | |
Removes a folder from a file chooser's list of shortcut folders.
|
Gtk.FileChooser | |
Removes a folder URI from a file chooser's list of shortcut folders.
|
Gtk.FileChooser | |
select_all
()
:
none
Selects all the files in the current folder of a file chooser.
Selects all the files in the current folder of a file chooser.
|
Gtk.FileChooser | |
Selects the file referred to by file.
|
Gtk.FileChooser | |
Selects a filename.
Selects a filename. If the file name isn't in the current
folder of chooser, then the current folder of chooser will be changed to the folder containing filename. selected successfully, FALSE otherwise.
|
Gtk.FileChooser | |
Selects the file to by uri.
|
Gtk.FileChooser | |
set_action
(FileChooserAction action)
:
none
Sets the type of operation that the chooser is performing; the
user interface is adapted to suit the selected action.
Sets the type of operation that the chooser is performing; the
user interface is adapted to suit the selected action. For example, an option to create a new folder might be shown if the action is GTK_FILE_CHOOSER_ACTION_SAVE but not if the action is GTK_FILE_CHOOSER_ACTION_OPEN.
|
Gtk.FileChooser | |
set_create_folders
(gboolean create_folders)
:
none
Sets whether file choser will offer to create new folders.
Sets whether file choser will offer to create new folders.
This is only relevant if the action is not set to be GTK_FILE_CHOOSER_ACTION_OPEN.
|
Gtk.FileChooser | |
Sets the current folder for chooser from a local filename.
Sets the current folder for chooser from a local filename.
The user will be shown the full contents of the current folder, plus user interface elements for navigating to other folders. otherwise.
|
Gtk.FileChooser | |
Sets the current folder for chooser from a GFile.
|
Gtk.FileChooser | |
Sets the current folder for chooser from an URI.
Sets the current folder for chooser from an URI.
The user will be shown the full contents of the current folder, plus user interface elements for navigating to other folders. otherwise.
|
Gtk.FileChooser | |
set_current_name
(String name)
:
none
Sets the current name in the file selector, as if entered
by the user.
Sets the current name in the file selector, as if entered
by the user. Note that the name passed in here is a UTF-8 string rather than a filename. This function is meant for such uses as a suggested name in a "Save As..." dialog. If you want to preselect a particular existing file, you should use gtk_file_chooser_set_filename() or gtk_file_chooser_set_uri() instead. Please see the documentation for those functions for an example of using gtk_file_chooser_set_current_name() as well.
|
Gtk.FileChooser | |
set_do_overwrite_confirmation
(gboolean do_overwrite_confirmation)
:
none
Sets whether a file chooser in GTK_FILE_CHOOSER_ACTION_SAVE mode will present
a confirmation dialog if the user types a file name that already exists.
Sets whether a file chooser in GTK_FILE_CHOOSER_ACTION_SAVE mode will present
a confirmation dialog if the user types a file name that already exists. This is FALSE by default. Regardless of this setting, the chooser will emit the GtkFileChooser::confirm-overwrite signal when appropriate. If all you need is the stock confirmation dialog, set this property to TRUE. You can override the way confirmation is done by actually handling the GtkFileChooser::confirm-overwrite signal; please refer to its documentation for the details.
|
Gtk.FileChooser | |
set_extra_widget
(Widget extra_widget)
:
none
Sets an application-supplied widget to provide extra options to the user.
Sets an application-supplied widget to provide extra options to the user.
|
Gtk.FileChooser | |
Sets file as the current filename for the file chooser, by changing
to the file's parent folder and actually selecting the file in list.
Sets file as the current filename for the file chooser, by changing
to the file's parent folder and actually selecting the file in list. If the chooser is in GTK_FILE_CHOOSER_ACTION_SAVE mode, the file's base name will also appear in the dialog's file name entry. If the file name isn't in the current folder of chooser, then the current folder of chooser will be changed to the folder containing filename. This is equivalent to a sequence of gtk_file_chooser_unselect_all() followed by gtk_file_chooser_select_filename(). Note that the file must exist, or nothing will be done except for the directory change. If you are implementing a 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 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. Instead, use something similar to this: |[ if (document_is_new) { /* the user just created a new document */ gtk_file_chooser_set_current_folder_file (chooser, default_file_for_saving); gtk_file_chooser_set_current_name (chooser, "Untitled document"); } else { /* the user edited an existing document */ gtk_file_chooser_set_file (chooser, existing_file); } ]| selected successfully, FALSE otherwise.
|
Gtk.FileChooser | |
Sets filename as the current filename for the file chooser, by changing
to the file's parent folder and actually selecting the file in list.
Sets filename as the current filename for the file chooser, by changing
to the file's parent folder and actually selecting the file in list. If the chooser is in GTK_FILE_CHOOSER_ACTION_SAVE mode, the file's base name will also appear in the dialog's file name entry. If the file name isn't in the current folder of chooser, then the current folder of chooser will be changed to the folder containing filename. This is equivalent to a sequence of gtk_file_chooser_unselect_all() followed by gtk_file_chooser_select_filename(). Note that the file must exist, or nothing will be done except for the directory change. If you are implementing a 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 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. Instead, use something similar to this: |[ if (document_is_new) { /* the user just created a new document */ gtk_file_chooser_set_current_folder (chooser, default_folder_for_saving); gtk_file_chooser_set_current_name (chooser, "Untitled document"); } else { /* the user edited an existing document */ gtk_file_chooser_set_filename (chooser, existing_filename); } ]| selected successfully, FALSE otherwise.
|
Gtk.FileChooser | |
set_filter
(FileFilter filter)
:
none
Sets the current filter; only the files that pass the
filter will be displayed.
Sets the current filter; only the files that pass the
filter will be displayed. If the user-selectable list of filters is non-empty, then the filter should be one of the filters in that list. Setting the current filter when the list of filters is empty is useful if you want to restrict the displayed set of files without letting the user change it.
|
Gtk.FileChooser | |
set_local_only
(gboolean local_only)
:
none
Sets whether only local files can be selected in the
file selector.
Sets whether only local files can be selected in the
file selector. If local_only is TRUE (the default), then the selected file are files are guaranteed to be accessible through the operating systems native file file system and therefore the application only needs to worry about the filename functions in GtkFileChooser, like gtk_file_chooser_get_filename(), rather than the URI functions like gtk_file_chooser_get_uri(),
|
Gtk.FileChooser | |
set_preview_widget
(Widget preview_widget)
:
none
Sets an application-supplied widget to use to display a custom preview
of the currently selected file.
Sets an application-supplied widget to use to display a custom preview
of the currently selected file. To implement a preview, after setting the preview widget, you connect to the GtkFileChooser::update-preview signal, and call gtk_file_chooser_get_preview_filename() or gtk_file_chooser_get_preview_uri() on each change. If you can display a preview of the new file, update your widget and set the preview active using gtk_file_chooser_set_preview_widget_active(). Otherwise, set the preview inactive. When there is no application-supplied preview widget, or the application-supplied preview widget is not active, the file chooser may display an internally generated preview of the current file or it may display no preview at all.
|
Gtk.FileChooser | |
set_preview_widget_active
(gboolean active)
:
none
Sets whether the preview widget set by
gtk_file_chooser_set_preview_widget() should be shown for the current filename.
Sets whether the preview widget set by
gtk_file_chooser_set_preview_widget() should be shown for the current filename. When active is set to false, the file chooser may display an internally generated preview of the current file or it may display no preview at all. See gtk_file_chooser_set_preview_widget() for more details.
|
Gtk.FileChooser | |
set_select_multiple
(gboolean select_multiple)
:
none
Sets whether multiple files can be selected in the file selector.
Sets whether multiple files can be selected in the file selector. This is
only relevant if the action is set to be GTK_FILE_CHOOSER_ACTION_OPEN or GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
|
Gtk.FileChooser | |
set_show_hidden
(gboolean show_hidden)
:
none
Sets whether hidden files and folders are displayed in the file selector.
Sets whether hidden files and folders are displayed in the file selector.
|
Gtk.FileChooser | |
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.
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 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 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. Instead, use something similar to this: |[ if (document_is_new) { /* the user just created a new document */ gtk_file_chooser_set_current_folder_uri (chooser, default_folder_for_saving); gtk_file_chooser_set_current_name (chooser, "Untitled document"); } else { /* the user edited an existing document */ gtk_file_chooser_set_uri (chooser, existing_uri); } ]| selected successfully, FALSE otherwise.
|
Gtk.FileChooser | |
set_use_preview_label
(gboolean use_label)
:
none
Sets whether the file chooser should display a stock label with the name of
the file that is being previewed; the default is TRUE.
Sets whether the file chooser should display a stock label with the name of
the file that is being previewed; the default is TRUE. Applications that want to draw the whole preview area themselves should set this to FALSE and display the name themselves in their preview widget.
|
Gtk.FileChooser | |
unselect_all
()
:
none
Unselects all the files in the current folder of a file chooser.
Unselects all the files in the current folder of a file chooser.
|
Gtk.FileChooser | |
unselect_file
(File file)
:
none
Unselects the file referred to by file.
Unselects the file referred to by file. If the file is not in the current
directory, does not exist, or is otherwise not currently selected, does nothing.
|
Gtk.FileChooser | |
unselect_filename
(String filename)
:
none
Unselects a currently selected filename.
Unselects a currently selected filename. If the filename
is not in the current directory, does not exist, or is otherwise not currently selected, does nothing.
|
Gtk.FileChooser | |
unselect_uri
(String uri)
:
none
Unselects the file referred to by uri.
Unselects the file referred to by uri. If the file
is not in the current directory, does not exist, or is otherwise not currently selected, does nothing.
|
Gtk.FileChooser |
Event | Defined By | |
---|---|---|
confirm_overwrite (FileChooser self)
:
Gtk.FileChooserConfirmation
This signal gets emitted whenever it is appropriate to present a
confirmation dialog when the user has selected a file name that already exists.
This signal gets emitted whenever it is appropriate to present a
confirmation dialog when the user has selected a file name that already exists. The signal only gets emitted when the file chooser is in GTK_FILE_CHOOSER_ACTION_SAVE mode. Most applications just need to turn on the GtkFileChooser:do-overwrite-confirmation property (or call the gtk_file_chooser_set_do_overwrite_confirmation() function), and they will automatically get a stock confirmation dialog. Applications which need to customize this behavior should do that, and also connect to the GtkFileChooser::confirm-overwrite signal. A signal handler for this signal must return a GtkFileChooserConfirmation value, which indicates the action to take. If the handler determines that the user wants to select a different filename, it should return GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN. If it determines that the user is satisfied with his choice of file name, it should return GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME. On the other hand, if it determines that the stock confirmation dialog should be used, it should return GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM. The following example illustrates this. static GtkFileChooserConfirmation confirm_overwrite_callback (GtkFileChooser *chooser, gpointer data) { char *uri; uri = gtk_file_chooser_get_uri (chooser); if (is_uri_read_only (uri)) { if (user_wants_to_replace_read_only_file (uri)) return GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME; else return GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN; } else return GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM; // fall back to the default dialog } ... chooser = gtk_file_chooser_dialog_new (...); gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE); g_signal_connect (chooser, "confirm-overwrite", G_CALLBACK (confirm_overwrite_callback), NULL); if (gtk_dialog_run (chooser) == GTK_RESPONSE_ACCEPT) save_to_file (gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser)); gtk_widget_destroy (chooser); action to take after emitting the signal.
|
Gtk.FileChooser | |
current_folder_changed (FileChooser self)
:
none
This signal is emitted when the current folder in a GtkFileChooser
changes.
This signal is emitted when the current folder in a GtkFileChooser
changes. This can happen due to the user performing some action that changes folders, such as selecting a bookmark or visiting a folder on the file list. It can also happen as a result of calling a function to explicitly change the current folder in a file chooser. Normally you do not need to connect to this signal, unless you need to keep track of which folder a file chooser is showing. gtk_file_chooser_get_current_folder(), gtk_file_chooser_set_current_folder_uri(), gtk_file_chooser_get_current_folder_uri().
|
Gtk.FileChooser | |
file_activated (FileChooser self)
:
none
This signal is emitted when the user "activates" a file in the file
chooser.
This signal is emitted when the user "activates" a file in the file
chooser. This can happen by double-clicking on a file in the file list, or by pressing Normally you do not need to connect to this signal. It is used internally by GtkFileChooserDialog to know when to activate the default button in the dialog. gtk_file_chooser_get_filenames(), gtk_file_chooser_get_uri(), gtk_file_chooser_get_uris().
|
Gtk.FileChooser | |
selection_changed (FileChooser self)
:
none
This signal is emitted when there is a change in the set of selected files
in a GtkFileChooser.
This signal is emitted when there is a change in the set of selected files
in a GtkFileChooser. This can happen when the user modifies the selection with the mouse or the keyboard, or when explicitly calling functions to change the selection. Normally you do not need to connect to this signal, as it is easier to wait for the file chooser to finish running, and then to get the list of selected files using the functions mentioned below. gtk_file_chooser_unselect_filename(), gtk_file_chooser_get_filename(), gtk_file_chooser_get_filenames(), gtk_file_chooser_select_uri(), gtk_file_chooser_unselect_uri(), gtk_file_chooser_get_uri(), gtk_file_chooser_get_uris().
|
Gtk.FileChooser | |
update_preview (FileChooser self)
:
none
This signal is emitted when the preview in a file chooser should be
regenerated.
This signal is emitted when the preview in a file chooser should be
regenerated. For example, this can happen when the currently selected file changes. You should use this signal if you want your file chooser to have a preview widget. Once you have installed a preview widget with gtk_file_chooser_set_preview_widget(), you should update it when this signal is emitted. You can use the functions gtk_file_chooser_get_preview_filename() or gtk_file_chooser_get_preview_uri() to get the name of the file to preview. Your widget may not be able to preview all kinds of files; your callback must call gtk_file_chooser_set_preview_widget_active() to inform the file chooser about whether the preview was generated successfully or not. Please see the example code in gtk_file_chooser_set_preview_widget_active(), gtk_file_chooser_set_use_preview_label(), gtk_file_chooser_get_preview_filename(), gtk_file_chooser_get_preview_uri().
|
Gtk.FileChooser |
Class / Namespace | Method / Signal / Properties |
---|---|
Gtk.FileChooserButton
Property |
dialog : Gtk.FileChooser
Instance of the GtkFileChooserDialog associated with the button.
|