+
+
+/**
+ * _gtk_file_chooser_entry_set_action:
+ * @chooser_entry: a #GtkFileChooserEntry
+ * @action: the action which is performed by the file selector using this entry
+ *
+ * Sets action which is performed by the file selector using this entry.
+ * The #GtkFileChooserEntry will use different completion strategies for
+ * different actions.
+ **/
+void
+_gtk_file_chooser_entry_set_action (GtkFileChooserEntry *chooser_entry,
+ GtkFileChooserAction action)
+{
+ g_return_if_fail (GTK_IS_FILE_CHOOSER_ENTRY (chooser_entry));
+
+ if (chooser_entry->action != action)
+ {
+ GtkEntryCompletion *comp;
+
+ chooser_entry->action = action;
+
+ comp = gtk_entry_get_completion (GTK_ENTRY (chooser_entry));
+
+ switch (action)
+ {
+ case GTK_FILE_CHOOSER_ACTION_OPEN:
+ case GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER:
+ gtk_entry_completion_set_popup_single_match (comp, FALSE);
+ break;
+ case GTK_FILE_CHOOSER_ACTION_SAVE:
+ case GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER:
+ gtk_entry_completion_set_popup_single_match (comp, TRUE);
+ break;
+ }
+ }
+}
+
+
+/**
+ * _gtk_file_chooser_entry_get_action:
+ * @chooser_entry: a #GtkFileChooserEntry
+ *
+ * Gets the action for this entry.
+ *
+ * Returns: the action
+ **/
+GtkFileChooserAction
+_gtk_file_chooser_entry_get_action (GtkFileChooserEntry *chooser_entry)
+{
+ g_return_val_if_fail (GTK_IS_FILE_CHOOSER_ENTRY (chooser_entry),
+ GTK_FILE_CHOOSER_ACTION_OPEN);
+
+ return chooser_entry->action;
+}
+
+gboolean
+_gtk_file_chooser_entry_get_is_folder (GtkFileChooserEntry *chooser_entry,
+ const GtkFilePath *path)
+{
+ gboolean retval = FALSE;
+
+ if (chooser_entry->current_folder)
+ {
+ GtkFileInfo *file_info;
+
+ file_info = gtk_file_folder_get_info (chooser_entry->current_folder,
+ path, NULL);
+ if (file_info)
+ {
+ retval = gtk_file_info_get_is_folder (file_info);
+ gtk_file_info_free (file_info);
+ }
+ }
+
+ return retval;
+}
+
+#define __GTK_FILE_CHOOSER_ENTRY_C__
+#include "gtkaliasdef.c"