gtk2/docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml
James M. Cape b418bf3aa4 Use a GtkComboBox in SELECT_FOLDER mode (#157726).
2004-12-15  James M. Cape  <jcape@ignore-your.tv>

        * gtk/gtkfilechooserbutton.c (struct _GtkFileChooserButtonPrivate)
        (gtk_file_chooser_button_init)
        (gtk_file_chooser_button_file_chooser_iface_init)
        (gtk_file_chooser_button_add_shortcut_folder)
        (gtk_file_chooser_button_remove_shortcut_folder)
        (gtk_file_chooser_button_constructor)
        (gtk_file_chooser_button_set_property)
        (gtk_file_chooser_button_destroy)
        (gtk_file_chooser_button_finalize)
        (get_icon_theme) (get_display_name_for_path) (model_get_type_position)
        (model_free_row_data) (model_add_special) (model_add_other)
        (model_add_volumes) (model_add_bookmarks)
        (model_update_current_folder) (model_remove_rows)
        (filter_model_visible_func) (combo_box_row_separator_func)
        (name_cell_data_func) (update_combo_box) (fs_volumes_changed_cb)
        (fs_bookmarks_changed_cb) (combo_box_changed_cb)
        (change_icon_size): Use a GtkComboBox in SELECT_FOLDER mode (#157726).

        * gtk/gtkfilechooserbutton.c:
        * gtk/gtkfilechooserbutton.h (gtk_file_chooser_button_new)
        (gtk_file_chooser_button_new_with_backend): Add @action to constructors
        to match other GtkFileChooser impls. API CHANGE.

        * docs/tools/widgets.c (create_file_button):
        * tests/testfilechooserbutton.c (main): Update callers.

        * docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml: Reflect API
        change.

        * tests/testfilechooserbutton.c: Add LGPL license.
        (main): Added GOption parser for --backend and --right-to-left cmd line
        args.
        (add_pwds_parent_as_shortcut_clicked_cb)
        (del_pwds_parent_as_shortcut_clicked_cb) (tests_button_clicked_cb):
        Add shortcut_folders test.
        (chooser_current_folder_changed_cb) (chooser_selection_changed_cb)
        (chooser_file_activated_cb) (chooser_update_preview_cb): Print URIS,
        not filenames.
2004-12-15 14:58:39 +00:00

137 lines
2.6 KiB
Plaintext

<!-- ##### SECTION Title ##### -->
GtkFileChooserButton
<!-- ##### SECTION Short_Description ##### -->
A button to launch a file selection dialog
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkFileChooserButton is a widget that lets the user select a
file. It implements the #GtkFileChooser interface. Visually, it is a
file name with a button to bring up a #GtkFileChooserDialog.
The user can then use that dialog to change the file associated with
that button. This widget does not support setting the "select-multiple"
property to %TRUE.
</para>
<example>
<title>Create a button to let the user select a file in /etc</title>
<programlisting>
{
GtkWidget *button;
button = gtk_file_chooser_button_new (_("Select a file"));
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
"/etc");
}
</programlisting>
</example>
<para>
The #GtkFileChooserButton supports the #GtkFileChooserAction<!--
-->s %GTK_FILE_CHOOSER_ACTION_OPEN and %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
</para>
<important>
<para>
The #GtkFileChooserButton will ellipsize the label,
and thus will thus request little horizontal space. To give the button
more space, you should call gtk_widget_size_request(),
gtk_file_chooser_button_set_width_chars(), or pack the button in
such a way that other interface elements give space to the widget.
</para>
</important>
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkFileChooserDialog
</para>
<!-- ##### STRUCT GtkFileChooserButton ##### -->
<para>
This should not be accessed directly. Use the accessor functions below.
</para>
<!-- ##### ARG GtkFileChooserButton:dialog ##### -->
<para>
</para>
<!-- ##### ARG GtkFileChooserButton:title ##### -->
<para>
</para>
<!-- ##### ARG GtkFileChooserButton:width-chars ##### -->
<para>
</para>
<!-- ##### FUNCTION gtk_file_chooser_button_new ##### -->
<para>
</para>
@title:
@action:
@Returns:
<!-- ##### FUNCTION gtk_file_chooser_button_new_with_backend ##### -->
<para>
</para>
@title:
@action:
@backend:
@Returns:
<!-- ##### FUNCTION gtk_file_chooser_button_new_with_dialog ##### -->
<para>
</para>
@dialog:
@Returns:
<!-- ##### FUNCTION gtk_file_chooser_button_get_title ##### -->
<para>
</para>
@button:
@Returns:
<!-- ##### FUNCTION gtk_file_chooser_button_set_title ##### -->
<para>
</para>
@button:
@title:
<!-- ##### FUNCTION gtk_file_chooser_button_get_width_chars ##### -->
<para>
</para>
@button:
@Returns:
<!-- ##### FUNCTION gtk_file_chooser_button_set_width_chars ##### -->
<para>
</para>
@button:
@n_chars: