## MateFileEntry MateFileEntry |

## Synopsis

    #include <libmateui/libmateui.h>

    struct              MateFileEntry;
    GtkWidget *         mate_file_entry_new                (const char *history_id,
                                                             const char *browse_dialog_title);
    void                mate_file_entry_construct          (MateFileEntry *fentry,
                                                             const char *history_id,
                                                             const char *browse_dialog_title);
    GtkWidget *         mate_file_entry_mate_entry        (MateFileEntry *fentry);
    GtkWidget *         mate_file_entry_gtk_entry          (MateFileEntry *fentry);
    void                mate_file_entry_set_title          (MateFileEntry *fentry,
                                                             const char *browse_dialog_title);
    void                mate_file_entry_set_default_path   (MateFileEntry *fentry,
                                                             const char *path);
    void                mate_file_entry_set_directory_entry
                                                            (MateFileEntry *fentry,
                                                             gboolean directory_entry);
    gboolean            mate_file_entry_get_directory_entry
                                                            (MateFileEntry *fentry);
    char *              mate_file_entry_get_full_path      (MateFileEntry *fentry,
                                                             gboolean file_must_exist);
    void                mate_file_entry_set_filename       (MateFileEntry *fentry,
                                                             const char *filename);
    void                mate_file_entry_set_modal          (MateFileEntry *fentry,
                                                             gboolean is_modal);
    gboolean            mate_file_entry_get_modal          (MateFileEntry *fentry);
    void                mate_file_entry_set_directory      (MateFileEntry *fentry,
                                                             gboolean directory_entry);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBox
                                     +----GtkVBox
                                           +----MateFileEntry
                                                 +----MatePixmapEntry

## Implemented Interfaces

MateFileEntry implements AtkImplementorIface, GtkBuildable, GtkOrientable and GtkEditable.

## Properties

      "browse-dialog-title"      gchar*                : Read / Write
      "default-path"             gchar*                : Read / Write
      "directory-entry"          gboolean              : Read / Write
      "filechooser-action"       GtkFileChooserAction  : Read / Write
      "filename"                 gchar*                : Read / Write
      "mate-entry"              MateEntry*           : Read
      "gtk-entry"                GtkEntry*             : Read
      "history-id"               gchar*                : Read / Write
      "modal"                    gboolean              : Read / Write
      "use-filechooser"          gboolean              : Read / Write

## Signals

      "activate"                                       : Run Last
      "browse-clicked"                                 : Run Last

## Description

## Details

### struct MateFileEntry

    struct MateFileEntry;

### Warning

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

### mate_file_entry_new ()

    GtkWidget *         mate_file_entry_new                (const char *history_id,
                                                             const char *browse_dialog_title);

### Warning

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

Creates a new MateFileEntry widget.

`history_id` : | the id given to mate_entry_new (see MateEntry).
`browse_dialog_title` : | Title for the file dialog window.
Returns : | A pointer to the widget, NULL if it cannot be created.

### mate_file_entry_construct ()

    void                mate_file_entry_construct          (MateFileEntry *fentry,
                                                             const char *history_id,
                                                             const char *browse_dialog_title);

### Warning

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

Constructs a MateFileEntry

`fentry` : | A MateFileEntry to construct.
`history_id` : | the id given to mate_entry_new (see MateEntry).
`browse_dialog_title` : | Title for the file dialog window.

### mate_file_entry_mate_entry ()

    GtkWidget *         mate_file_entry_mate_entry        (MateFileEntry *fentry);

### Warning

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

It returns a pointer to the mate entry widget of the widget (seeMateEntry).

`fentry` : | The MateFileEntry widget to work with.
Returns : | A pointer to the component MateEntry widget

### mate_file_entry_gtk_entry ()

    GtkWidget *         mate_file_entry_gtk_entry          (MateFileEntry *fentry);

### Warning

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

Similar to mate_file_entry_mate_entry but returns the gtk entry instead of the Mate entry widget.

`fentry` : | The MateFileEntry widget to work with.
Returns : | Returns the GtkEntry widget

### mate_file_entry_set_title ()

    void                mate_file_entry_set_title          (MateFileEntry *fentry,
                                                             const char *browse_dialog_title);

### Warning

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

Set the title of the browse dialog to `browse_dialog_title`. The new title will go into effect the next time the browse button is pressed.

`fentry` : | The MateFileEntry widget to work with.
`browse_dialog_title` : | The new title for the file browse dialog window.

### mate_file_entry_set_default_path ()

    void                mate_file_entry_set_default_path   (MateFileEntry *fentry,
                                                             const char *path);

### Warning

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

Set the default path of browse dialog to `path`. The default path is only used if the entry is empty or if the current path of the entry is not an absolute path, in which case the default path is prepended to it before the dialog is started.

`fentry` : | The MateFileEntry widget to work with.
`path` : | A path string.

### mate_file_entry_set_directory_entry ()

    void                mate_file_entry_set_directory_entry
                                                            (MateFileEntry *fentry,
                                                             gboolean directory_entry);

### Warning

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

Sets whether this is a directory only entry. If `directory_entry` is true, then mate_file_entry_get_full_path will check for the file being a directory, and the browse dialog will have the file list disabled.

`fentry` : | The MateFileEntry widget to work with.
`directory_entry` : | boolean

### mate_file_entry_get_directory_entry ()

    gboolean            mate_file_entry_get_directory_entry
                                                            (MateFileEntry *fentry);

### Warning

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

Gets whether this is a directory only entry. See also mate_file_entry_set_directory_entry.

`fentry` : | The MateFileEntry widget to work with.
Returns : | A boolean.

### mate_file_entry_get_full_path ()

    char *              mate_file_entry_get_full_path      (MateFileEntry *fentry,
                                                             gboolean file_must_exist);

### Warning

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

Gets the full absolute path of the file from the entry. If `file_must_exist` is false, nothing is tested and the path is returned. If `file_must_exist` is true, then the path is only returned if the path actually exists. In case the entry is a directory entry (see mate_file_entry_set_directory_entry), then if the path exists and is a directory then it's returned; if not, it is assumed it was a file so we try to strip it, and try again. It allocates memory for the returned string.

`fentry` : | The MateFileEntry widget to work with.
`file_must_exist` : | boolean
Returns : | a newly allocated string with the path or NULL if something went wrong

### mate_file_entry_set_filename ()

    void                mate_file_entry_set_filename       (MateFileEntry *fentry,
                                                             const char *filename);

### Warning

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

Sets the internal entry to this string.

`fentry` : | The MateFileEntry widget to work with.

### mate_file_entry_set_modal ()

    void                mate_file_entry_set_modal          (MateFileEntry *fentry,
                                                             gboolean is_modal);

### Warning

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

Sets the modality of the browse dialog.

`fentry` : | The MateFileEntry widget to work with.
`is_modal` : | true if the window is to be modal, false otherwise.

### mate_file_entry_get_modal ()

    gboolean            mate_file_entry_get_modal          (MateFileEntry *fentry);

### Warning

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

This function gets the boolean which specifies if the browsing dialog is modal or not

`fentry` : | The MateFileEntry widget to work with.
Returns : | A boolean.

### mate_file_entry_set_directory ()

    void                mate_file_entry_set_directory      (MateFileEntry *fentry,
                                                             gboolean directory_entry);

### Warning

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

Deprecated, use mate_file_entry_set_directory_entry

`fentry` : | The MateFileEntry widget to work with.
`directory_entry` : | boolean

## Property Details

### The `"browse-dialog-title"` property

      "browse-dialog-title"      gchar*                : Read / Write

Title for the Browse file dialog.

Default value: NULL

### The `"default-path"` property

      "default-path"             gchar*                : Read / Write

Default path for the Browse file window.

Default value: NULL

### The `"directory-entry"` property

      "directory-entry"          gboolean              : Read / Write

Whether the file entry is being used to enter directory names or complete filenames.

Default value: FALSE

### The `"filechooser-action"` property

      "filechooser-action"       GtkFileChooserAction  : Read / Write

The type of operation that the file selector is performing.

Default value: GTK_FILE_CHOOSER_ACTION_OPEN

### The `"filename"` property

      "filename"                 gchar*                : Read / Write

Filename that should be displayed in the file entry.

Default value: NULL

### The `"mate-entry"` property

      "mate-entry"              MateEntry*           : Read

MateEntry that the file entry uses for entering filenames. You can use this property to get the MateEntry if you need to modify or query any of its parameters.

### The `"gtk-entry"` property

      "gtk-entry"                GtkEntry*             : Read

GtkEntry that the file entry uses for entering filenames. You can use this property to get the GtkEntry if you need to modify or query any of its parameters.

### The `"history-id"` property

      "history-id"               gchar*                : Read / Write

Unique identifier for the file entry. This will be used to save the history list.

Default value: NULL

### The `"modal"` property

      "modal"                    gboolean              : Read / Write

Whether the Browse file window should be modal.

Default value: FALSE

### The `"use-filechooser"` property

      "use-filechooser"          gboolean              : Read / Write

Whether to use the new GtkFileChooser widget or the GtkFileSelection widget to select files.

Default value: FALSE

## Signal Details

### The `"activate"` signal

    void                user_function                      (MateFileEntry *fileentry,
                                                            gpointer        user_data)      : Run Last

`fileentry` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.

### The `"browse-clicked"` signal

    void                user_function                      (MateFileEntry *fileentry,
                                                            gpointer        user_data)      : Run Last

`fileentry` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.