## GtkFileSelection GtkFileSelection |

## Functions

GtkWidget * | gtk_file_selection_new ()
void | gtk_file_selection_complete ()
void | gtk_file_selection_show_fileop_buttons ()
void | gtk_file_selection_hide_fileop_buttons ()
void | gtk_file_selection_set_select_multiple ()
gboolean | gtk_file_selection_get_select_multiple ()

## Properties

char * | filename | Read / Write
gboolean | select-multiple | Read / Write
gboolean | show-fileops | Read / Write

## Types and Values

struct | GtkFileSelection
#define | gtk_file_selection_set_filename
#define | gtk_file_selection_get_filename
#define | gtk_file_selection_get_selections

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkObject
                ╰── GtkWidget
                    ╰── GtkContainer
                        ╰── GtkBin
                            ╰── GtkWindow
                                ╰── GtkDialog
                                    ╰── GtkFileSelection

## Implemented Interfaces

GtkFileSelection implements AtkImplementorIface and GtkBuildable.

## Includes

    #include <gtk/gtk.h>

## Description

## Functions

### gtk_file_selection_new ()

    GtkWidget *
    gtk_file_selection_new (const gchar *title);

`gtk_file_selection_new` is deprecated and should not be used in newly-written code.

### gtk_file_selection_complete ()

    void
    gtk_file_selection_complete (GtkFileSelection *filesel,
                                 const gchar *pattern);

`gtk_file_selection_complete` is deprecated and should not be used in newly-written code.

### gtk_file_selection_show_fileop_buttons ()

    void
    gtk_file_selection_show_fileop_buttons
                                   (GtkFileSelection *filesel);

`gtk_file_selection_show_fileop_buttons` is deprecated and should not be used in newly-written code.

### gtk_file_selection_hide_fileop_buttons ()

    void
    gtk_file_selection_hide_fileop_buttons
                                   (GtkFileSelection *filesel);

`gtk_file_selection_hide_fileop_buttons` is deprecated and should not be used in newly-written code.

### gtk_file_selection_set_select_multiple ()

    void
    gtk_file_selection_set_select_multiple
                                   (GtkFileSelection *filesel,
                                    gboolean select_multiple);

`gtk_file_selection_set_select_multiple` is deprecated and should not be used in newly-written code.

Sets whether the user is allowed to select multiple files in the file list. Use `gtk_file_selection_get_selections()` to get the list of selected files.

#### Parameters

filesel | a GtkFileSelection |
select_multiple | whether or not the user is allowed to select multiple files in the file list. |

### gtk_file_selection_get_select_multiple ()

    gboolean
    gtk_file_selection_get_select_multiple
                                   (GtkFileSelection *filesel);

`gtk_file_selection_get_select_multiple` is deprecated and should not be used in newly-written code.

Determines whether or not the user is allowed to select multiple files in the file list. See `gtk_file_selection_set_select_multiple()`.

#### Parameters

filesel | a GtkFileSelection |

#### Returns

`TRUE` if the user is allowed to select multiple files in the file list

## Types and Values

### struct GtkFileSelection

    struct GtkFileSelection {
      GtkWidget *dir_list;
      GtkWidget *file_list;
      GtkWidget *selection_entry;
      GtkWidget *selection_text;
      GtkWidget *main_vbox;
      GtkWidget *ok_button;
      GtkWidget *cancel_button;
      GtkWidget *help_button;
      GtkWidget *history_pulldown;
      GtkWidget *history_menu;
      GList     *history_list;
      GtkWidget *fileop_dialog;
      GtkWidget *fileop_entry;
      gchar     *fileop_file;
      gpointer   cmpl_state;

      GtkWidget *fileop_c_dir;
      GtkWidget *fileop_del_file;
      GtkWidget *fileop_ren_file;

      GtkWidget *button_area;
      GtkWidget *action_area;
    };

`GtkFileSelection` is deprecated and should not be used in newly-written code.

### gtk_file_selection_set_filename

    #define gtk_file_selection_set_filename gtk_file_selection_set_filename_utf8

`gtk_file_selection_set_filename` is deprecated and should not be used in newly-written code.

Sets a default path for the file requestor. If `filename` includes a directory path, then the requestor will open with that path as its current working directory.

This has the consequence that in order to open the requestor with a working directory and an empty filename, `filename` must have a trailing directory separator.

The encoding of `filename` is preferred GLib file name encoding, which may not be UTF-8. See `g_filename_from_utf8()`.

#### Parameters

filesel | a GtkFileSelection. |
filename | a string to set as the default file name. |

### gtk_file_selection_get_filename

    #define gtk_file_selection_get_filename gtk_file_selection_get_filename_utf8

`gtk_file_selection_get_filename` is deprecated and should not be used in newly-written code.

This function returns the selected filename in the GLib file name encoding. To convert to UTF-8, call `g_filename_to_utf8()`. The returned string points to a statically allocated buffer and should be copied if you plan to keep it around.

If no file is selected then the selected directory path is returned.

#### Parameters

filesel | a GtkFileSelection |

#### Returns

currently-selected filename in the on-disk encoding.

### gtk_file_selection_get_selections

    #define gtk_file_selection_get_selections gtk_file_selection_get_selections_utf8

`gtk_file_selection_get_selections` is deprecated and should not be used in newly-written code.

Retrieves the list of file selections the user has made in the dialog box. This function is intended for use when the user can select multiple files in the file list.

The filenames are in the GLib file name encoding. To convert to UTF-8, call `g_filename_to_utf8()` on each string.

#### Parameters

filesel | a GtkFileSelection |

#### Returns

a newly-allocated `NULL`-terminated array of strings. Use `g_strfreev()` to free it.

## Property Details

### The `“filename”` property

      “filename”                 char *

The currently selected filename.

Owner: GtkFileSelection

Flags: Read / Write

Default value: NULL

### The `“select-multiple”` property

      “select-multiple”          gboolean

Whether to allow multiple files to be selected.

Owner: GtkFileSelection

Flags: Read / Write

Default value: FALSE

### The `“show-fileops”` property

      “show-fileops”             gboolean

Whether buttons for creating/manipulating files should be displayed.

Owner: GtkFileSelection

Flags: Read / Write

Default value: TRUE