GnomeFileEntry

Name

GnomeFileEntry — one line description goes here.

Synopsis


#include <gnome.h>


struct      GnomeFileEntry
GtkWidget*  gnome_file_entry_new            (char *history_id,
                                             char *browse_dialog_title);
GtkWidget*  gnome_file_entry_gnome_entry    (GnomeFileEntry *fentry);
GtkWidget*  gnome_file_entry_gtk_entry      (GnomeFileEntry *fentry);
void        gnome_file_entry_set_title      (GnomeFileEntry *fentry,
                                             char *browse_dialog_title);
void        gnome_file_entry_set_default_path
                                            (GnomeFileEntry *fentry,
                                             char *path);
void        gnome_file_entry_set_directory  (GnomeFileEntry *fentry,
                                             int directory_entry);
char*       gnome_file_entry_get_full_path  (GnomeFileEntry *fentry,
                                             int file_must_exist);
void        gnome_file_entry_set_modal      (GnomeFileEntry *fentry,
                                             int is_modal);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GtkContainer
               +----GtkBox
                     +----GtkHBox
                           +----GnomeFileEntry

Signal Prototypes


'browse-clicked'
            void        user_function      (GnomeFileEntry *fileentry,
                                            gpointer user_data);

Description

Details


GnomeFileEntry

struct GnomeFileEntry;


gnome_file_entry_new()

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

Creates a new file entry widget

history_id : the id given to gnome_entry_newbrowse_dialog_title : title of the browse dialogReturns : Returns the new object


gnome_file_entry_gnome_entry()

GtkWidget*  gnome_file_entry_gnome_entry    (GnomeFileEntry *fentry);

Get the GnomeEntry widget that's part of the entry

fentry : the GnomeFileEntry to work withReturns : Returns GnomeEntry widget


gnome_file_entry_gtk_entry()

GtkWidget*  gnome_file_entry_gtk_entry      (GnomeFileEntry *fentry);

Get the GtkEntry widget that's part of the entry

fentry : the GnomeFileEntry to work withReturns : Returns GtkEntry widget


gnome_file_entry_set_title()

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

Set the title of the browse dialog to browse_dialog_title, this will go into effect the next time the browse button is pressed

fentry : the GnomeFileEntry to work withbrowse_dialog_title : the title


gnome_file_entry_set_default_path()

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

Set the default path of browse dialog to path. The default path is only used if the entry is empty or if the contents of the entry is not a full absolute path, in that case the default path is prepended to it before the dialog is started

fentry : the GnomeFileEntry to work withpath : path string


gnome_file_entry_set_directory()

void        gnome_file_entry_set_directory  (GnomeFileEntry *fentry,
                                             int directory_entry);

Sets wheather 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

fentry : the GnomeFileEntry to work withdirectory_entry : boolean


gnome_file_entry_get_full_path()

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

Gets the full absolute path of the file from the entry, 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), 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. This only happens if file_must_exist is true, if it's false, nothing is tested, it's just returned.

fentry : the GnomeFileEntry to work withfile_must_exist : booleanReturns : a newly allocated string with the path or NULL if something went wrong


gnome_file_entry_set_modal()

void        gnome_file_entry_set_modal      (GnomeFileEntry *fentry,
                                             int is_modal);

Sets the modality of the browse dialog

fentry : the GnomeFileEntry to work withis_modal : boolean

Signals


The 'browse-clicked' signal

void        user_function                  (GnomeFileEntry *fileentry,
                                            gpointer user_data);

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