#include "gtkliststore.h"
#include "gtkstock.h"
#include "gtktreemodelfilter.h"
-#include "gtkvseparator.h"
+#include "gtkseparator.h"
#include "gtkfilechooserdialog.h"
#include "gtkfilechooserprivate.h"
#include "gtkfilechooserutils.h"
#include "gtkfilechooserbutton.h"
+#include "gtkorientable.h"
+
#include "gtktypebuiltins.h"
#include "gtkprivate.h"
+
+/**
+ * SECTION:gtkfilechooserbutton
+ * @Short_description: A button to launch a file selection dialog
+ * @Title: GtkFileChooserButton
+ * @See_also:#GtkFileChooserDialog
+ *
+ * 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
+ * #GtkFileChooser:select-multiple property to %TRUE.
+ *
+ * <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_ACTION_OPEN);
+ * gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
+ * "/etc");
+ * }
+ * </programlisting>
+ * </example>
+ *
+ * The #GtkFileChooserButton supports the #GtkFileChooserAction<!-- -->s
+ * %GTK_FILE_CHOOSER_ACTION_OPEN and %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
+ *
+ * <important>
+ * 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_get_preferred_size(),
+ * gtk_file_chooser_button_set_width_chars(), or pack the button in
+ * such a way that other interface elements give space to the widget.
+ * </important>
+ */
+
+
/* **************** *
* Private Macros *
* **************** */
* GType Declaration *
* ******************* */
-G_DEFINE_TYPE_WITH_CODE (GtkFileChooserButton, gtk_file_chooser_button, GTK_TYPE_HBOX, { \
+G_DEFINE_TYPE_WITH_CODE (GtkFileChooserButton, gtk_file_chooser_button, GTK_TYPE_BOX, { \
G_IMPLEMENT_INTERFACE (GTK_TYPE_FILE_CHOOSER, gtk_file_chooser_button_file_chooser_iface_init) \
})
priv->label = gtk_label_new (_(FALLBACK_DISPLAY_NAME));
gtk_label_set_ellipsize (GTK_LABEL (priv->label), PANGO_ELLIPSIZE_END);
- gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.5);
+ gtk_widget_set_halign (priv->label, GTK_ALIGN_START);
+ gtk_widget_set_valign (priv->label, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (box), priv->label, TRUE, TRUE, 0);
//gtk_container_add (GTK_CONTAINER (box), priv->label);
gtk_widget_show (priv->label);