HildonFileChooserDialog

HildonFileChooserDialog

Synopsis

                    HildonFileChooserDialog;
GtkWidget*          hildon_file_chooser_dialog_new      (GtkWindow *parent,
                                                         GtkFileChooserAction action);
GtkWidget*          hildon_file_chooser_dialog_new_with_properties
                                                        (GtkWindow *parent,
                                                         const gchar *first_property,
                                                         ...);
void                hildon_file_chooser_dialog_focus_to_input
                                                        (HildonFileChooserDialog *d);
void                hildon_file_chooser_dialog_set_safe_folder
                                                        (HildonFileChooserDialog *self,
                                                         const gchar *local_path);
void                hildon_file_chooser_dialog_set_safe_folder_uri
                                                        (HildonFileChooserDialog *self,
                                                         const gchar *uri);
gchar*              hildon_file_chooser_dialog_get_safe_folder
                                                        (HildonFileChooserDialog *self);
gchar*              hildon_file_chooser_dialog_get_safe_folder_uri
                                                        (HildonFileChooserDialog *self);
void                hildon_file_chooser_dialog_set_show_upnp
                                                        (HildonFileChooserDialog *self,
                                                         gboolean value);
gboolean            hildon_file_chooser_dialog_get_show_upnp
                                                        (HildonFileChooserDialog *self);
void                hildon_file_chooser_dialog_add_extra
                                                        (HildonFileChooserDialog *self,
                                                         GtkWidget *widget);
GtkWidget*          hildon_file_chooser_dialog_add_extensions_combo
                                                        (HildonFileChooserDialog *self,
                                                         char **extensions,
                                                         char **ext_names);
gchar*              hildon_file_chooser_dialog_get_extension
                                                        (HildonFileChooserDialog *self);
void                hildon_file_chooser_dialog_set_extension
                                                        (HildonFileChooserDialog *self,
                                                         gchar *extension);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkDialog
                                             +----HildonFileChooserDialog

Implemented Interfaces

HildonFileChooserDialog implements AtkImplementorIface, GtkBuildable and GtkFileChooser.

Properties

  "autonaming"               gboolean              : Read / Write
  "empty-text"               gchar*                : Read / Write
  "file-system-model"        HildonFileSystemModel*  : Read / Write / Construct Only
  "max-full-path-length"     gint                  : Read / Write / Construct
  "max-name-length"          gint                  : Read / Write / Construct
  "open-button-text"         gchar*                : Read / Write
  "save-multiple"            gchar*                : Read / Write
  "selection-mode"           HildonFileChooserDialogSelectionMode  : Read / Write
  "show-folder-button"       gboolean              : Read / Write
  "show-location"            gboolean              : Read / Write

Description

Details

HildonFileChooserDialog

typedef struct _HildonFileChooserDialog HildonFileChooserDialog;


hildon_file_chooser_dialog_new ()

GtkWidget*          hildon_file_chooser_dialog_new      (GtkWindow *parent,
                                                         GtkFileChooserAction action);

Creates a new HildonFileChooserDialog using the given action.

parent : Transient parent window for dialog.
action : Action to perform (open file/save file/select folder/new folder).
Returns : a new HildonFileChooserDialog.

hildon_file_chooser_dialog_new_with_properties ()

GtkWidget*          hildon_file_chooser_dialog_new_with_properties
                                                        (GtkWindow *parent,
                                                         const gchar *first_property,
                                                         ...);

Creates new HildonFileChooserDialog. This constructor is handy if you need to pass several options.

parent : Transient parent window for dialog.
first_property : First option to pass to dialog.
... : arguments
Returns : New HildonFileChooserDialog object.

hildon_file_chooser_dialog_focus_to_input ()

void                hildon_file_chooser_dialog_focus_to_input
                                                        (HildonFileChooserDialog *d);

d :

hildon_file_chooser_dialog_set_safe_folder ()

void                hildon_file_chooser_dialog_set_safe_folder
                                                        (HildonFileChooserDialog *self,
                                                         const gchar *local_path);

Sets a safe folder that is used as a fallback in a case that automatic location change fails.

self : a HildonFileChooserDialog widget.
local_path : a path to safe folder.

hildon_file_chooser_dialog_set_safe_folder_uri ()

void                hildon_file_chooser_dialog_set_safe_folder_uri
                                                        (HildonFileChooserDialog *self,
                                                         const gchar *uri);

See hildon_file_chooser_dialog_set_safe_folder.

self : a HildonFileChooserDialog widget.
uri : an uri to safe folder.

hildon_file_chooser_dialog_get_safe_folder ()

gchar*              hildon_file_chooser_dialog_get_safe_folder
                                                        (HildonFileChooserDialog *self);

Gets safe folder location as local path.

self : a HildonFileChooserDialog widget.
Returns : a local path. Free this with g_free.

hildon_file_chooser_dialog_get_safe_folder_uri ()

gchar*              hildon_file_chooser_dialog_get_safe_folder_uri
                                                        (HildonFileChooserDialog *self);

Gets safe folder location as uri.

self : a HildonFileChooserDialog widget.
Returns : an uri. Free this with g_free.

hildon_file_chooser_dialog_set_show_upnp ()

void                hildon_file_chooser_dialog_set_show_upnp
                                                        (HildonFileChooserDialog *self,
                                                         gboolean value);

Set whether the dialog shows UPNP locations.

self : a HildonFileChooserDialog widget.
value : a gboolean value to be set.

hildon_file_chooser_dialog_get_show_upnp ()

gboolean            hildon_file_chooser_dialog_get_show_upnp
                                                        (HildonFileChooserDialog *self);

Gets whether the dialog shows UPNP locations.

self : a HildonFileChooserDialog widget.
Returns : gboolean value..

hildon_file_chooser_dialog_add_extra ()

void                hildon_file_chooser_dialog_add_extra
                                                        (HildonFileChooserDialog *self,
                                                         GtkWidget *widget);

Add widget to the dialog, below the "Name" and "Location" fields. When widget is a HildonCaption, care is taken that the labels line up with existing HildonCaptions.

self : dialog widget
widget : widget to add

hildon_file_chooser_dialog_add_extensions_combo ()

GtkWidget*          hildon_file_chooser_dialog_add_extensions_combo
                                                        (HildonFileChooserDialog *self,
                                                         char **extensions,
                                                         char **ext_names);

Create and add a combo box widget with a list of file extensions. This combobox will track and modify the extension of the current filename; it is not a filter.

extensions should be a vector of strings, terminated by NULL. The strings in it are the extensions, without a leading '.'.

ext_names, when non-NULL, is a vector parallel to extensions that determines the names of the extensions to use in the UI. When ext_names is NULL, the extensions themselves are used as the names.

self : dialog widget
extensions : extensions to offer
ext_names : names of the extensions to show in the UI
Returns :

hildon_file_chooser_dialog_get_extension ()

gchar*              hildon_file_chooser_dialog_get_extension
                                                        (HildonFileChooserDialog *self);

Return the extension of the current filename.

self : dialog widget
Returns : the current extension as a newly allocated string

hildon_file_chooser_dialog_set_extension ()

void                hildon_file_chooser_dialog_set_extension
                                                        (HildonFileChooserDialog *self,
                                                         gchar *extension);

Set the extension of the current filename.

self : dialog widget
extension : the new extension

Property Details

The "autonaming" property

  "autonaming"               gboolean              : Read / Write

Whether the text set to name entry should be automatically appended by a counter when the given name already exists.

Default value: TRUE


The "empty-text" property

  "empty-text"               gchar*                : Read / Write

String to use when selected folder is empty.

Default value: NULL


The "file-system-model" property

  "file-system-model"        HildonFileSystemModel*  : Read / Write / Construct Only

Tell the file chooser to use existing model instead of creating a new one.


The "max-full-path-length" property

  "max-full-path-length"     gint                  : Read / Write / Construct

Maximum length of the whole path of an individual file/folder name when entered by user. Use -1 for no limit or 0 to look the value from MAX_FILENAME_LENGTH environment variable.

Allowed values: >= -1

Default value: 0


The "max-name-length" property

  "max-name-length"          gint                  : Read / Write / Construct

Maximum length of an individual file/folder name when entered by user. Note that the actual limit can be smaller, if the maximum full path length kicks in. Use -1 for no limit.

Allowed values: >= -1

Default value: -1


The "open-button-text" property

  "open-button-text"         gchar*                : Read / Write

String to use in leftmost (=open) button.

Default value: NULL


The "save-multiple" property

  "save-multiple"            gchar*                : Read / Write

Text to be displayed in items field when saving multiple files.

Default value: NULL


The "selection-mode" property

  "selection-mode"           HildonFileChooserDialogSelectionMode  : Read / Write

View mode used for hildon file selection widget.

Default value: 1


The "show-folder-button" property

  "show-folder-button"       gboolean              : Read / Write

Whether the folder button should be visible (if it's possible).

Default value: TRUE


The "show-location" property

  "show-location"            gboolean              : Read / Write

Whether the location information should be visible (if it's possible).

Default value: TRUE