GnomeFileEntry

GnomeFileEntry

Functions

Properties

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

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkObject
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBox
                        ╰── GtkVBox
                            ╰── GnomeFileEntry
                                ╰── GnomePixmapEntry

Implemented Interfaces

GnomeFileEntry implements AtkImplementorIface, GtkBuildable, GtkOrientable and GtkEditable.

Includes

#include <libgnomeui/libgnomeui.h>

Description

Functions

gnome_file_entry_new ()

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

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

Creates a new GnomeFileEntry widget.

Parameters

history_id

the id given to gnome_entry_new (see GnomeEntry).

 

browse_dialog_title

Title for the file dialog window.

 

Returns

A pointer to the widget, NULL if it cannot be created.


gnome_file_entry_construct ()

void
gnome_file_entry_construct (GnomeFileEntry *fentry,
                            const char *history_id,
                            const char *browse_dialog_title);

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

Constructs a GnomeFileEntry

Parameters

fentry

A GnomeFileEntry to construct.

 

history_id

the id given to gnome_entry_new (see GnomeEntry).

 

browse_dialog_title

Title for the file dialog window.

 

gnome_file_entry_gnome_entry ()

GtkWidget *
gnome_file_entry_gnome_entry (GnomeFileEntry *fentry);

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

It returns a pointer to the gnome entry widget of the widget (seeGnomeEntry).

Parameters

fentry

The GnomeFileEntry widget to work with.

 

Returns

A pointer to the component GnomeEntry widget


gnome_file_entry_gtk_entry ()

GtkWidget *
gnome_file_entry_gtk_entry (GnomeFileEntry *fentry);

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

Similar to gnome_file_entry_gnome_entry but returns the gtk entry instead of the Gnome entry widget.

Parameters

fentry

The GnomeFileEntry widget to work with.

 

Returns

Returns the GtkEntry widget


gnome_file_entry_set_title ()

void
gnome_file_entry_set_title (GnomeFileEntry *fentry,
                            const char *browse_dialog_title);

gnome_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.

Parameters

fentry

The GnomeFileEntry widget to work with.

 

browse_dialog_title

The new title for the file browse dialog window.

 

gnome_file_entry_set_default_path ()

void
gnome_file_entry_set_default_path (GnomeFileEntry *fentry,
                                   const char *path);

gnome_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.

Parameters

fentry

The GnomeFileEntry widget to work with.

 

path

A path string.

 

gnome_file_entry_set_directory_entry ()

void
gnome_file_entry_set_directory_entry (GnomeFileEntry *fentry,
                                      gboolean directory_entry);

gnome_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 gnome_file_entry_get_full_path will check for the file being a directory, and the browse dialog will have the file list disabled.

Parameters

fentry

The GnomeFileEntry widget to work with.

 

directory_entry

boolean

 

gnome_file_entry_get_directory_entry ()

gboolean
gnome_file_entry_get_directory_entry (GnomeFileEntry *fentry);

gnome_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 gnome_file_entry_set_directory_entry.

Parameters

fentry

The GnomeFileEntry widget to work with.

 

Returns

A boolean.


gnome_file_entry_get_full_path ()

char *
gnome_file_entry_get_full_path (GnomeFileEntry *fentry,
                                gboolean file_must_exist);

gnome_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 gnome_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.

Parameters

fentry

The GnomeFileEntry widget to work with.

 

file_must_exist

boolean

 

Returns

a newly allocated string with the path or NULL if something went wrong


gnome_file_entry_set_filename ()

void
gnome_file_entry_set_filename (GnomeFileEntry *fentry,
                               const char *filename);

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

Sets the internal entry to this string.

Parameters

fentry

The GnomeFileEntry widget to work with.

 

gnome_file_entry_set_modal ()

void
gnome_file_entry_set_modal (GnomeFileEntry *fentry,
                            gboolean is_modal);

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

Sets the modality of the browse dialog.

Parameters

fentry

The GnomeFileEntry widget to work with.

 

is_modal

true if the window is to be modal, false otherwise.

 

gnome_file_entry_get_modal ()

gboolean
gnome_file_entry_get_modal (GnomeFileEntry *fentry);

gnome_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

Parameters

fentry

The GnomeFileEntry widget to work with.

 

Returns

A boolean.


gnome_file_entry_set_directory ()

void
gnome_file_entry_set_directory (GnomeFileEntry *fentry,
                                gboolean directory_entry);

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

Deprecated, use gnome_file_entry_set_directory_entry

Parameters

fentry

The GnomeFileEntry widget to work with.

 

directory_entry

boolean

 

Types and Values

struct GnomeFileEntry

struct GnomeFileEntry;

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

Property Details

The “browse-dialog-title” property

  “browse-dialog-title”      gchar *

Title for the Browse file dialog.

Flags: Read / Write

Default value: NULL


The “default-path” property

  “default-path”             gchar *

Default path for the Browse file window.

Flags: Read / Write

Default value: NULL


The “directory-entry” property

  “directory-entry”          gboolean

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

Flags: Read / Write

Default value: FALSE


The “filechooser-action” property

  “filechooser-action”       GtkFileChooserAction

The type of operation that the file selector is performing.

Flags: Read / Write

Default value: GTK_FILE_CHOOSER_ACTION_OPEN


The “filename” property

  “filename”                 gchar *

Filename that should be displayed in the file entry.

Flags: Read / Write

Default value: NULL


The “gnome-entry” property

  “gnome-entry”              GnomeEntry *

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

Flags: Read


The “gtk-entry” property

  “gtk-entry”                GtkEntry *

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.

Flags: Read


The “history-id” property

  “history-id”               gchar *

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

Flags: Read / Write

Default value: NULL


The “modal” property

  “modal”                    gboolean

Whether the Browse file window should be modal.

Flags: Read / Write

Default value: FALSE


The “use-filechooser” property

  “use-filechooser”          gboolean

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

Flags: Read / Write

Default value: FALSE

Signal Details

The “activate” signal

void
user_function (GnomeFileEntry *fileentry,
               gpointer        user_data)

Flags: Run Last


The “browse-clicked” signal

void
user_function (GnomeFileEntry *fileentry,
               gpointer        user_data)

Flags: Run Last