2004-08-17 16:21:46 +00:00
|
|
|
<!-- ##### SECTION Title ##### -->
|
|
|
|
GtkFileChooserButton
|
|
|
|
|
|
|
|
<!-- ##### SECTION Short_Description ##### -->
|
2004-10-11 20:15:30 +00:00
|
|
|
A button to launch a file selection dialog
|
2004-08-17 16:21:46 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION Long_Description ##### -->
|
|
|
|
<para>
|
2004-10-24 07:05:00 +00:00
|
|
|
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;
|
|
|
|
|
2005-01-06 06:25:30 +00:00
|
|
|
button = gtk_file_chooser_button_new (_("Select a file"),
|
|
|
|
GTK_FILE_CHOOSER_ACTION_OPEN);
|
2004-10-24 07:05:00 +00:00
|
|
|
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
|
|
|
|
"/etc");
|
|
|
|
}
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
|
|
|
|
<para>
|
2004-11-07 04:57:04 +00:00
|
|
|
The #GtkFileChooserButton supports the #GtkFileChooserAction<!--
|
|
|
|
-->s %GTK_FILE_CHOOSER_ACTION_OPEN and %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
|
2004-10-24 07:05:00 +00:00
|
|
|
</para>
|
2004-08-17 16:21:46 +00:00
|
|
|
|
2004-10-24 07:05:00 +00:00
|
|
|
<important>
|
|
|
|
<para>
|
2004-11-07 04:57:04 +00:00
|
|
|
The #GtkFileChooserButton will ellipsize the label,
|
Rework of GtkFileChooserButton, some cleanups. Fixes #154388, #154390,
2004-10-25 James M. Cape <jcape@ignore-your.tv>
Rework of GtkFileChooserButton, some cleanups. Fixes #154388,
#154390, #154390, #156272.
* docs/reference/gtk/gtk-docs.sgml: Moved GtkFileChooserButton
below GtkFileChooser.
* docs/reference/gtk/gtk-sections.txt: Added
gtk_file_chooser_button_get_width_chars(),
gtk_file_chooser_button_set_width_chars(),
gtk_label_set_width_chars(), gtk_label_get_width_chars().
* docs/reference/gtk/gtk.types: Added
gtk_cell_renderer_combo_get_type,
gtk_cell_view_get_type,
gtk_text_iter_get_type.
* docs/reference/gtk/tmpl/gtkaboutdialog.sgml: Add
"logo-icon-name" property.
* docs/reference/gtk/tmpl/gtkcellview.sgml: Updates for
properties
(b/c of get_type() inclusion above).
* docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml:
* docs/reference/gtk/tmpl/gtklabel.sgml: Add "width-chars"
property,
getters/setters.
* docs/reference/gtk/tmpl/gtkcellrenderercombo.sgml: Added.
* gtk/gtkentrycompletion.c:
(_gtk_entry_completion_popdown): Don't show if the entry isn't
mapped.
* gtk/gtkfilechooserbutton.[c,h]: (*): About 45%
rewritten, adds "width-chars" property, icons, working save
modes, volume/Home/Desktop friendly-naming support.
* gtk/gtklabel.[c,h]:
(gtk_label_class_init), (gtk_label_init),
(gtk_label_get_property), (gtk_label_set_property),
(gtk_label_get_width_chars), (gtk_label_set_width_chars),
(gtk_label_size_request): Add "width-chars" property.
* tests/testfilechooserbutton.c: Update, use 4 different buttons
for the different ACTIONs.
* gtk/.cvsignore: Ignore gtk-update-icon-cache.
* tests/.cvsignore: Ignore testimage.
2004-10-26 04:29:56 +00:00
|
|
|
and thus will thus request little horizontal space. To give the button
|
2010-10-03 01:41:44 +00:00
|
|
|
more space, you should call gtk_widget_get_preferred_size(),
|
2004-11-01 20:25:34 +00:00
|
|
|
gtk_file_chooser_button_set_width_chars(), or pack the button in
|
2004-10-24 07:05:00 +00:00
|
|
|
such a way that other interface elements give space to the widget.
|
2004-08-17 16:21:46 +00:00
|
|
|
</para>
|
2004-10-24 07:05:00 +00:00
|
|
|
</important>
|
2004-08-17 16:21:46 +00:00
|
|
|
|
|
|
|
<!-- ##### SECTION See_Also ##### -->
|
|
|
|
<para>
|
2004-10-24 07:05:00 +00:00
|
|
|
#GtkFileChooserDialog
|
2004-08-17 16:21:46 +00:00
|
|
|
</para>
|
|
|
|
|
2005-06-20 22:06:27 +00:00
|
|
|
<!-- ##### SECTION Stability_Level ##### -->
|
|
|
|
|
|
|
|
|
2010-05-08 05:18:53 +00:00
|
|
|
<!-- ##### SECTION Image ##### -->
|
|
|
|
|
|
|
|
|
2004-08-17 16:21:46 +00:00
|
|
|
<!-- ##### STRUCT GtkFileChooserButton ##### -->
|
|
|
|
<para>
|
2004-11-01 20:25:34 +00:00
|
|
|
This should not be accessed directly. Use the accessor functions below.
|
2004-10-24 07:05:00 +00:00
|
|
|
</para>
|
|
|
|
|
|
|
|
|
2007-05-24 05:51:56 +00:00
|
|
|
<!-- ##### SIGNAL GtkFileChooserButton::file-set ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@filechooserbutton: the object which received the signal.
|
|
|
|
|
2004-10-24 07:05:00 +00:00
|
|
|
<!-- ##### ARG GtkFileChooserButton:dialog ##### -->
|
|
|
|
<para>
|
2004-11-01 20:25:34 +00:00
|
|
|
|
2004-08-17 16:21:46 +00:00
|
|
|
</para>
|
|
|
|
|
2005-12-20 05:47:43 +00:00
|
|
|
<!-- ##### ARG GtkFileChooserButton:focus-on-click ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2004-10-24 07:05:00 +00:00
|
|
|
<!-- ##### ARG GtkFileChooserButton:title ##### -->
|
|
|
|
<para>
|
2004-11-01 20:25:34 +00:00
|
|
|
|
2004-10-24 07:05:00 +00:00
|
|
|
</para>
|
2004-08-17 16:21:46 +00:00
|
|
|
|
Rework of GtkFileChooserButton, some cleanups. Fixes #154388, #154390,
2004-10-25 James M. Cape <jcape@ignore-your.tv>
Rework of GtkFileChooserButton, some cleanups. Fixes #154388,
#154390, #154390, #156272.
* docs/reference/gtk/gtk-docs.sgml: Moved GtkFileChooserButton
below GtkFileChooser.
* docs/reference/gtk/gtk-sections.txt: Added
gtk_file_chooser_button_get_width_chars(),
gtk_file_chooser_button_set_width_chars(),
gtk_label_set_width_chars(), gtk_label_get_width_chars().
* docs/reference/gtk/gtk.types: Added
gtk_cell_renderer_combo_get_type,
gtk_cell_view_get_type,
gtk_text_iter_get_type.
* docs/reference/gtk/tmpl/gtkaboutdialog.sgml: Add
"logo-icon-name" property.
* docs/reference/gtk/tmpl/gtkcellview.sgml: Updates for
properties
(b/c of get_type() inclusion above).
* docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml:
* docs/reference/gtk/tmpl/gtklabel.sgml: Add "width-chars"
property,
getters/setters.
* docs/reference/gtk/tmpl/gtkcellrenderercombo.sgml: Added.
* gtk/gtkentrycompletion.c:
(_gtk_entry_completion_popdown): Don't show if the entry isn't
mapped.
* gtk/gtkfilechooserbutton.[c,h]: (*): About 45%
rewritten, adds "width-chars" property, icons, working save
modes, volume/Home/Desktop friendly-naming support.
* gtk/gtklabel.[c,h]:
(gtk_label_class_init), (gtk_label_init),
(gtk_label_get_property), (gtk_label_set_property),
(gtk_label_get_width_chars), (gtk_label_set_width_chars),
(gtk_label_size_request): Add "width-chars" property.
* tests/testfilechooserbutton.c: Update, use 4 different buttons
for the different ACTIONs.
* gtk/.cvsignore: Ignore gtk-update-icon-cache.
* tests/.cvsignore: Ignore testimage.
2004-10-26 04:29:56 +00:00
|
|
|
<!-- ##### ARG GtkFileChooserButton:width-chars ##### -->
|
|
|
|
<para>
|
2004-11-01 20:25:34 +00:00
|
|
|
|
Rework of GtkFileChooserButton, some cleanups. Fixes #154388, #154390,
2004-10-25 James M. Cape <jcape@ignore-your.tv>
Rework of GtkFileChooserButton, some cleanups. Fixes #154388,
#154390, #154390, #156272.
* docs/reference/gtk/gtk-docs.sgml: Moved GtkFileChooserButton
below GtkFileChooser.
* docs/reference/gtk/gtk-sections.txt: Added
gtk_file_chooser_button_get_width_chars(),
gtk_file_chooser_button_set_width_chars(),
gtk_label_set_width_chars(), gtk_label_get_width_chars().
* docs/reference/gtk/gtk.types: Added
gtk_cell_renderer_combo_get_type,
gtk_cell_view_get_type,
gtk_text_iter_get_type.
* docs/reference/gtk/tmpl/gtkaboutdialog.sgml: Add
"logo-icon-name" property.
* docs/reference/gtk/tmpl/gtkcellview.sgml: Updates for
properties
(b/c of get_type() inclusion above).
* docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml:
* docs/reference/gtk/tmpl/gtklabel.sgml: Add "width-chars"
property,
getters/setters.
* docs/reference/gtk/tmpl/gtkcellrenderercombo.sgml: Added.
* gtk/gtkentrycompletion.c:
(_gtk_entry_completion_popdown): Don't show if the entry isn't
mapped.
* gtk/gtkfilechooserbutton.[c,h]: (*): About 45%
rewritten, adds "width-chars" property, icons, working save
modes, volume/Home/Desktop friendly-naming support.
* gtk/gtklabel.[c,h]:
(gtk_label_class_init), (gtk_label_init),
(gtk_label_get_property), (gtk_label_set_property),
(gtk_label_get_width_chars), (gtk_label_set_width_chars),
(gtk_label_size_request): Add "width-chars" property.
* tests/testfilechooserbutton.c: Update, use 4 different buttons
for the different ACTIONs.
* gtk/.cvsignore: Ignore gtk-update-icon-cache.
* tests/.cvsignore: Ignore testimage.
2004-10-26 04:29:56 +00:00
|
|
|
</para>
|
|
|
|
|
2004-08-17 16:21:46 +00:00
|
|
|
<!-- ##### FUNCTION gtk_file_chooser_button_new ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@title:
|
2004-12-15 14:58:39 +00:00
|
|
|
@action:
|
2004-08-17 16:21:46 +00:00
|
|
|
@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:
|
|
|
|
|
|
|
|
|
Rework of GtkFileChooserButton, some cleanups. Fixes #154388, #154390,
2004-10-25 James M. Cape <jcape@ignore-your.tv>
Rework of GtkFileChooserButton, some cleanups. Fixes #154388,
#154390, #154390, #156272.
* docs/reference/gtk/gtk-docs.sgml: Moved GtkFileChooserButton
below GtkFileChooser.
* docs/reference/gtk/gtk-sections.txt: Added
gtk_file_chooser_button_get_width_chars(),
gtk_file_chooser_button_set_width_chars(),
gtk_label_set_width_chars(), gtk_label_get_width_chars().
* docs/reference/gtk/gtk.types: Added
gtk_cell_renderer_combo_get_type,
gtk_cell_view_get_type,
gtk_text_iter_get_type.
* docs/reference/gtk/tmpl/gtkaboutdialog.sgml: Add
"logo-icon-name" property.
* docs/reference/gtk/tmpl/gtkcellview.sgml: Updates for
properties
(b/c of get_type() inclusion above).
* docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml:
* docs/reference/gtk/tmpl/gtklabel.sgml: Add "width-chars"
property,
getters/setters.
* docs/reference/gtk/tmpl/gtkcellrenderercombo.sgml: Added.
* gtk/gtkentrycompletion.c:
(_gtk_entry_completion_popdown): Don't show if the entry isn't
mapped.
* gtk/gtkfilechooserbutton.[c,h]: (*): About 45%
rewritten, adds "width-chars" property, icons, working save
modes, volume/Home/Desktop friendly-naming support.
* gtk/gtklabel.[c,h]:
(gtk_label_class_init), (gtk_label_init),
(gtk_label_get_property), (gtk_label_set_property),
(gtk_label_get_width_chars), (gtk_label_set_width_chars),
(gtk_label_size_request): Add "width-chars" property.
* tests/testfilechooserbutton.c: Update, use 4 different buttons
for the different ACTIONs.
* gtk/.cvsignore: Ignore gtk-update-icon-cache.
* tests/.cvsignore: Ignore testimage.
2004-10-26 04:29:56 +00:00
|
|
|
<!-- ##### 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:
|
|
|
|
|
|
|
|
|
2005-12-20 05:47:43 +00:00
|
|
|
<!-- ##### FUNCTION gtk_file_chooser_button_get_focus_on_click ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button:
|
|
|
|
@Returns:
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ##### FUNCTION gtk_file_chooser_button_set_focus_on_click ##### -->
|
|
|
|
<para>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
@button:
|
|
|
|
@focus_on_click:
|
|
|
|
|
|
|
|
|