Commit 2c97a8f6 authored by Kristian Rietveld's avatar Kristian Rietveld Committed by Kristian Rietveld

Merge of the GTK+ asynchronous file chooser branch. Please see the

2006-05-01  Kristian Rietveld  <kris@imendio.com>

	Merge of the GTK+ asynchronous file chooser branch.  Please see
	the kris-asynch-branch for more detailed ChangeLog entries.

	* configure.in: increase binary version to 2.9.0.

	* gtk.symbols:
	* gtkfilechooser.c:
	* gtkfilechooserbutton.c:
	* gtkfilechooserdefault.c:
	* gtkfilechooserdialog.c:
	* gtkfilechooserembed.c:
	* gtkfilechooserembed.h:
	* gtkfilechooserentry.c:
	* gtkfilechooserentry.h:
	* gtkfilechooserprivate.h:
	* gtkfilesystem.c:
	* gtkfilesystem.h:
	* gtkfilesystemmodel.c:
	* gtkfilesystemmodel.h:
	* gtkfilesystemunix.c:
	* gtkpathbar.c:
	* gtkpathbar.h:
	Merge from kris-async-branch.
parent 46789c87
2006-05-01 Kristian Rietveld <kris@imendio.com>
Merge of the GTK+ asynchronous file chooser branch. Please see
the kris-asynch-branch for more detailed ChangeLog entries.
* configure.in: increase binary version to 2.9.0.
* gtk.symbols:
* gtkfilechooser.c:
* gtkfilechooserbutton.c:
* gtkfilechooserdefault.c:
* gtkfilechooserdialog.c:
* gtkfilechooserembed.c:
* gtkfilechooserembed.h:
* gtkfilechooserentry.c:
* gtkfilechooserentry.h:
* gtkfilechooserprivate.h:
* gtkfilesystem.c:
* gtkfilesystem.h:
* gtkfilesystemmodel.c:
* gtkfilesystemmodel.h:
* gtkfilesystemunix.c:
* gtkpathbar.c:
* gtkpathbar.h:
Merge from kris-async-branch.
2006-05-01 Matthias Clasen <mclasen@dhcp83-48.boston.redhat.com>
* NEWS: Updates
......
2006-05-01 Kristian Rietveld <kris@imendio.com>
Merge of the GTK+ asynchronous file chooser branch. Please see
the kris-asynch-branch for more detailed ChangeLog entries.
* configure.in: increase binary version to 2.9.0.
* gtk.symbols:
* gtkfilechooser.c:
* gtkfilechooserbutton.c:
* gtkfilechooserdefault.c:
* gtkfilechooserdialog.c:
* gtkfilechooserembed.c:
* gtkfilechooserembed.h:
* gtkfilechooserentry.c:
* gtkfilechooserentry.h:
* gtkfilechooserprivate.h:
* gtkfilesystem.c:
* gtkfilesystem.h:
* gtkfilesystemmodel.c:
* gtkfilesystemmodel.h:
* gtkfilesystemunix.c:
* gtkpathbar.c:
* gtkpathbar.h:
Merge from kris-async-branch.
2006-05-01 Matthias Clasen <mclasen@dhcp83-48.boston.redhat.com>
* NEWS: Updates
......
......@@ -28,7 +28,7 @@ m4_define([gtk_api_version], [2.0])
# for GTK+.
#
#GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
m4_define([gtk_binary_version], [2.4.0])
m4_define([gtk_binary_version], [2.9.0])
# required versions of other packages
m4_define([glib_required_version], [2.10.1])
......
......@@ -1392,6 +1392,7 @@ gtk_file_info_copy
gtk_file_info_free
gtk_file_info_get_display_key
gtk_file_info_get_display_name
gtk_file_info_get_icon_name
gtk_file_info_get_is_folder
gtk_file_info_get_is_hidden
gtk_file_info_get_mime_type
......@@ -1399,7 +1400,9 @@ gtk_file_info_get_modification_time
gtk_file_info_get_size
gtk_file_info_get_type G_GNUC_CONST
gtk_file_info_new
gtk_file_info_render_icon
gtk_file_info_set_display_name
gtk_file_info_set_icon_name
gtk_file_info_set_is_folder
gtk_file_info_set_is_hidden
gtk_file_info_set_mime_type
......@@ -1409,9 +1412,11 @@ gtk_file_path_get_type G_GNUC_CONST
gtk_file_paths_copy
gtk_file_paths_free
gtk_file_paths_sort
gtk_file_system_cancel_operation
gtk_file_system_create_folder
gtk_file_system_error_quark
gtk_file_system_filename_to_path
gtk_file_system_get_info
gtk_file_system_get_folder
gtk_file_system_get_parent
gtk_file_system_get_type G_GNUC_CONST
......@@ -1425,11 +1430,11 @@ gtk_file_system_path_is_local
gtk_file_system_path_to_filename
gtk_file_system_path_to_uri
gtk_file_system_remove_bookmark
gtk_file_system_render_icon
gtk_file_system_uri_to_path
gtk_file_system_volume_free
gtk_file_system_volume_get_base_path
gtk_file_system_volume_get_display_name
gtk_file_system_volume_get_icon_name
gtk_file_system_volume_get_is_mounted
gtk_file_system_volume_mount
gtk_file_system_volume_render_icon
......
......@@ -717,6 +717,9 @@ gtk_file_chooser_get_current_folder (GtkFileChooser *chooser)
file_system = _gtk_file_chooser_get_file_system (chooser);
path = _gtk_file_chooser_get_current_folder_path (chooser);
if (!path)
return NULL;
filename = gtk_file_system_path_to_filename (file_system, path);
gtk_file_path_free (path);
......
This diff is collapsed.
This diff is collapsed.
......@@ -129,6 +129,7 @@ gtk_file_chooser_dialog_init (GtkFileChooserDialog *dialog)
dialog->priv->default_height = -1;
dialog->priv->resize_horizontally = TRUE;
dialog->priv->resize_vertically = TRUE;
dialog->priv->response_requested = FALSE;
gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
......@@ -355,6 +356,39 @@ file_chooser_widget_default_size_changed (GtkWidget *widget,
else
file_chooser_widget_default_unrealized_size_changed (widget, dialog);
}
static void
file_chooser_widget_response_requested (GtkWidget *widget,
GtkFileChooserDialog *dialog)
{
GList *children, *l;
/* There probably isn't a default widget, so make things easier for the
* programmer by looking for a reasonable button on our own.
*/
children = gtk_container_get_children (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area));
for (l = children; l; l = l->next)
{
GtkWidget *widget;
int response_id;
widget = GTK_WIDGET (l->data);
response_id = gtk_dialog_get_response_for_widget (GTK_DIALOG (dialog), widget);
if (response_id == GTK_RESPONSE_ACCEPT
|| response_id == GTK_RESPONSE_OK
|| response_id == GTK_RESPONSE_YES
|| response_id == GTK_RESPONSE_APPLY)
{
dialog->priv->response_requested = TRUE;
gtk_widget_activate (widget); /* Should we gtk_dialog_response (dialog, response_id) instead? */
break;
}
}
g_list_free (children);
}
static GObject*
gtk_file_chooser_dialog_constructor (GType type,
......@@ -382,6 +416,8 @@ gtk_file_chooser_dialog_constructor (GType type,
G_CALLBACK (file_chooser_widget_file_activated), object);
g_signal_connect (priv->widget, "default-size-changed",
G_CALLBACK (file_chooser_widget_default_size_changed), object);
g_signal_connect (priv->widget, "response-requested",
G_CALLBACK (file_chooser_widget_response_requested), object);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (object)->vbox), priv->widget, TRUE, TRUE, 0);
......@@ -550,8 +586,11 @@ response_cb (GtkDialog *dialog,
|| response_id == GTK_RESPONSE_APPLY))
return;
if (!_gtk_file_chooser_embed_should_respond (GTK_FILE_CHOOSER_EMBED (priv->widget)))
g_signal_stop_emission_by_name (dialog, "response");
if (!priv->response_requested && !_gtk_file_chooser_embed_should_respond (GTK_FILE_CHOOSER_EMBED (priv->widget)))
{
g_signal_stop_emission_by_name (dialog, "response");
priv->response_requested = FALSE;
}
}
static GtkWidget *
......
......@@ -35,6 +35,8 @@ static gboolean delegate_should_respond (GtkFileChooserEmbed *chooser_embe
static void delegate_initial_focus (GtkFileChooserEmbed *chooser_embed);
static void delegate_default_size_changed (GtkFileChooserEmbed *chooser_embed,
gpointer data);
static void delegate_response_requested (GtkFileChooserEmbed *chooser_embed,
gpointer data);
static GtkFileChooserEmbed *
get_delegate (GtkFileChooserEmbed *receiver)
......@@ -81,6 +83,8 @@ _gtk_file_chooser_embed_set_delegate (GtkFileChooserEmbed *receiver,
g_signal_connect (delegate, "default_size_changed",
G_CALLBACK (delegate_default_size_changed), receiver);
g_signal_connect (delegate, "response_requested",
G_CALLBACK (delegate_response_requested), receiver);
}
......@@ -120,6 +124,13 @@ delegate_default_size_changed (GtkFileChooserEmbed *chooser_embed,
g_signal_emit_by_name (data, "default-size-changed");
}
static void
delegate_response_requested (GtkFileChooserEmbed *chooser_embed,
gpointer data)
{
g_signal_emit_by_name (data, "response-requested");
}
/* publicly callable functions */
......@@ -160,6 +171,13 @@ gtk_file_chooser_embed_class_init (gpointer g_iface)
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
g_signal_new (_("response-requested"),
iface_type,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GtkFileChooserEmbedIface, response_requested),
NULL, NULL,
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
void
......
......@@ -53,6 +53,7 @@ struct _GtkFileChooserEmbedIface
/* Signals
*/
void (*default_size_changed) (GtkFileChooserEmbed *chooser_embed);
void (*response_requested) (GtkFileChooserEmbed *chooser_embed);
};
GType _gtk_file_chooser_embed_get_type (void) G_GNUC_CONST;
......
......@@ -55,6 +55,7 @@ struct _GtkFileChooserEntry
GSource *load_directory_idle;
GtkFileFolder *current_folder;
GtkFileSystemHandle *load_folder_handle;
GtkListStore *completion_store;
......@@ -75,6 +76,7 @@ static void gtk_file_chooser_entry_iface_init (GtkEditableClass *iface);
static void gtk_file_chooser_entry_init (GtkFileChooserEntry *chooser_entry);
static void gtk_file_chooser_entry_finalize (GObject *object);
static void gtk_file_chooser_entry_dispose (GObject *object);
static gboolean gtk_file_chooser_entry_focus (GtkWidget *widget,
GtkDirectionType direction);
static void gtk_file_chooser_entry_activate (GtkEntry *entry);
......@@ -156,6 +158,7 @@ gtk_file_chooser_entry_class_init (GtkFileChooserEntryClass *class)
parent_class = g_type_class_peek_parent (class);
gobject_class->finalize = gtk_file_chooser_entry_finalize;
gobject_class->dispose = gtk_file_chooser_entry_dispose;
widget_class->focus = gtk_file_chooser_entry_focus;
......@@ -211,8 +214,29 @@ gtk_file_chooser_entry_finalize (GObject *object)
{
GtkFileChooserEntry *chooser_entry = GTK_FILE_CHOOSER_ENTRY (object);
gtk_file_path_free (chooser_entry->base_folder);
gtk_file_path_free (chooser_entry->current_folder_path);
g_free (chooser_entry->file_part);
parent_class->finalize (object);
}
static void
gtk_file_chooser_entry_dispose (GObject *object)
{
GtkFileChooserEntry *chooser_entry = GTK_FILE_CHOOSER_ENTRY (object);
if (chooser_entry->completion_store)
g_object_unref (chooser_entry->completion_store);
{
g_object_unref (chooser_entry->completion_store);
chooser_entry->completion_store = NULL;
}
if (chooser_entry->load_folder_handle)
{
gtk_file_system_cancel_operation (chooser_entry->load_folder_handle);
chooser_entry->load_folder_handle = NULL;
}
if (chooser_entry->current_folder)
{
......@@ -221,16 +245,16 @@ gtk_file_chooser_entry_finalize (GObject *object)
g_signal_handlers_disconnect_by_func (chooser_entry->current_folder,
G_CALLBACK (files_deleted_cb), chooser_entry);
g_object_unref (chooser_entry->current_folder);
chooser_entry->current_folder = NULL;
}
if (chooser_entry->file_system)
g_object_unref (chooser_entry->file_system);
gtk_file_path_free (chooser_entry->base_folder);
gtk_file_path_free (chooser_entry->current_folder_path);
g_free (chooser_entry->file_part);
{
g_object_unref (chooser_entry->file_system);
chooser_entry->file_system = NULL;
}
parent_class->finalize (object);
parent_class->dispose (object);
}
/* Match functions for the GtkEntryCompletion */
......@@ -601,6 +625,41 @@ files_deleted_cb (GtkFileSystem *file_system,
/* FIXME: gravy... */
}
static void
load_directory_get_folder_callback (GtkFileSystemHandle *handle,
GtkFileFolder *folder,
const GError *error,
gpointer data)
{
gboolean cancelled = handle->cancelled;
GtkFileChooserEntry *chooser_entry = data;
if (handle != chooser_entry->load_folder_handle)
goto out;
chooser_entry->load_folder_handle = NULL;
if (cancelled || error)
goto out;
chooser_entry->current_folder = folder;
g_signal_connect (chooser_entry->current_folder, "files-added",
G_CALLBACK (files_added_cb), chooser_entry);
g_signal_connect (chooser_entry->current_folder, "files-removed",
G_CALLBACK (files_deleted_cb), chooser_entry);
chooser_entry->completion_store = gtk_list_store_new (N_COLUMNS,
G_TYPE_STRING,
GTK_TYPE_FILE_PATH);
gtk_entry_completion_set_model (gtk_entry_get_completion (GTK_ENTRY (chooser_entry)),
GTK_TREE_MODEL (chooser_entry->completion_store));
out:
g_object_unref (chooser_entry);
g_object_unref (handle);
}
static gboolean
load_directory_callback (GtkFileChooserEntry *chooser_entry)
{
......@@ -623,38 +682,15 @@ load_directory_callback (GtkFileChooserEntry *chooser_entry)
g_assert (chooser_entry->completion_store == NULL);
/* Load the folder */
chooser_entry->current_folder = gtk_file_system_get_folder (chooser_entry->file_system,
chooser_entry->current_folder_path,
GTK_FILE_INFO_DISPLAY_NAME | GTK_FILE_INFO_IS_FOLDER,
NULL); /* NULL-GError */
/* There is no folder by that name */
if (!chooser_entry->current_folder)
goto done;
g_signal_connect (chooser_entry->current_folder, "files-added",
G_CALLBACK (files_added_cb), chooser_entry);
g_signal_connect (chooser_entry->current_folder, "files-removed",
G_CALLBACK (files_deleted_cb), chooser_entry);
chooser_entry->completion_store = gtk_list_store_new (N_COLUMNS,
G_TYPE_STRING,
GTK_TYPE_FILE_PATH);
if (chooser_entry->load_folder_handle)
gtk_file_system_cancel_operation (chooser_entry->load_folder_handle);
if (chooser_entry->file_part_pos != -1)
{
gtk_file_folder_list_children (chooser_entry->current_folder,
&child_paths,
NULL); /* NULL-GError */
if (child_paths)
{
update_current_folder_files (chooser_entry, child_paths);
add_completion_idle (chooser_entry);
gtk_file_paths_free (child_paths);
}
}
gtk_entry_completion_set_model (gtk_entry_get_completion (GTK_ENTRY (chooser_entry)),
GTK_TREE_MODEL (chooser_entry->completion_store));
chooser_entry->load_folder_handle =
gtk_file_system_get_folder (chooser_entry->file_system,
chooser_entry->current_folder_path,
GTK_FILE_INFO_DISPLAY_NAME | GTK_FILE_INFO_IS_FOLDER,
load_directory_get_folder_callback,
g_object_ref (chooser_entry));
done:
......@@ -1041,5 +1077,27 @@ _gtk_file_chooser_entry_get_action (GtkFileChooserEntry *chooser_entry)
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"
......@@ -46,6 +46,8 @@ void _gtk_file_chooser_entry_set_file_part (GtkFileChooserEnt
const gchar *file_part);
const GtkFilePath *_gtk_file_chooser_entry_get_current_folder (GtkFileChooserEntry *chooser_entry);
const gchar * _gtk_file_chooser_entry_get_file_part (GtkFileChooserEntry *chooser_entry);
gboolean _gtk_file_chooser_entry_get_is_folder (GtkFileChooserEntry *chooser_entry,
const GtkFilePath *path);
G_END_DECLS
......
......@@ -113,6 +113,7 @@ struct _GtkFileChooserDialogPrivate
gint default_height;
gboolean resize_horizontally;
gboolean resize_vertically;
gboolean response_requested;
};
......@@ -187,6 +188,17 @@ struct _GtkFileChooserDefault
GtkTreeModelSort *sort_model;
/* Handles */
GSList *loading_shortcuts;
GSList *reload_icon_handles;
GtkFileSystemHandle *file_list_drag_data_received_handle;
GtkFileSystemHandle *update_current_folder_handle;
GtkFileSystemHandle *show_and_select_paths_handle;
GtkFileSystemHandle *should_respond_get_info_handle;
GtkFileSystemHandle *update_from_entry_handle;
GtkFileSystemHandle *shortcuts_activate_iter_handle;
GSList *pending_handles;
LoadState load_state;
ReloadState reload_state;
guint load_timeout_id;
......@@ -267,9 +279,10 @@ struct _GtkFileSystemModel
GSList *idle_clears;
GSource *idle_clear_source;
GSource *idle_finished_loading_source;
gushort max_depth;
GSList *pending_handles;
guint show_hidden : 1;
guint show_folders : 1;
......@@ -300,6 +313,7 @@ struct _FileModelNode
guint is_visible : 1;
guint loaded : 1;
guint idle_clear : 1;
guint load_pending : 1;
};
......
......@@ -25,6 +25,7 @@
#include "gtkmodules.h"
#include "gtkintl.h"
#include "gtkalias.h"
#include "gtkstock.h"
#include <string.h>
......@@ -35,6 +36,7 @@ struct _GtkFileInfo
gchar *display_name;
gchar *display_key;
gchar *mime_type;
gchar *icon_name;
guint is_folder : 1;
guint is_hidden : 1;
};
......@@ -88,6 +90,10 @@ gtk_file_info_copy (GtkFileInfo *info)
new_info->display_key = g_strdup (new_info->display_key);
if (new_info->mime_type)
new_info->mime_type = g_strdup (new_info->mime_type);
if (new_info->icon_name)
new_info->icon_name = g_strdup (new_info->icon_name);
if (new_info->display_key)
new_info->display_key = g_strdup (new_info->display_key);
return new_info;
}
......@@ -103,6 +109,8 @@ gtk_file_info_free (GtkFileInfo *info)
g_free (info->mime_type);
if (info->display_key)
g_free (info->display_key);
if (info->icon_name)
g_free (info->icon_name);
g_free (info);
}
......@@ -250,6 +258,171 @@ gtk_file_info_set_size (GtkFileInfo *info,
info->size = size;
}
void
gtk_file_info_set_icon_name (GtkFileInfo *info,
const gchar *icon_name)
{
g_return_if_fail (info != NULL);
if (info->icon_name)
g_free (info->icon_name);
info->icon_name = g_strdup (icon_name);
}
G_CONST_RETURN gchar *
gtk_file_info_get_icon_name (const GtkFileInfo *info)
{
g_return_val_if_fail (info != NULL, NULL);
return info->icon_name;
}
GdkPixbuf *
gtk_file_info_render_icon (const GtkFileInfo *info,
GtkWidget *widget,
gint pixel_size,
GError **error)
{
GdkPixbuf *pixbuf = NULL;
g_return_val_if_fail (info != NULL, NULL);
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
if (info->icon_name)
{
if (g_path_is_absolute (info->icon_name))
pixbuf = gdk_pixbuf_new_from_file_at_size (info->icon_name,
pixel_size,
pixel_size,
NULL);
else
{
GtkIconTheme *icon_theme;
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (widget));
pixbuf = gtk_icon_theme_load_icon (icon_theme, info->icon_name,
pixel_size, 0, NULL);
}
}
if (!pixbuf)
{
/* load a fallback icon */
pixbuf = gtk_widget_render_icon (widget, GTK_STOCK_FILE, GTK_ICON_SIZE_SMALL_TOOLBAR, NULL);
if (!pixbuf && error)
g_set_error (error,
GTK_FILE_SYSTEM_ERROR,
GTK_FILE_SYSTEM_ERROR_FAILED,
_("Could not get a stock icon for %s\n"),
info->icon_name);
}
return pixbuf;
}
/*****************************************
* GtkFileSystemHandle *
*****************************************/
static void gtk_file_system_handle_init (GtkFileSystemHandle *handle);
static void gtk_file_system_handle_class_init (GtkFileSystemHandleClass *klass);
enum
{
PROP_0,
PROP_CANCELLED
};
GType
gtk_file_system_handle_get_type (void)
{
static GType file_system_handle_type = 0;
if (!file_system_handle_type)
{
static const GTypeInfo file_system_handle_info =
{
sizeof (GtkFileSystemHandleClass),
NULL,
NULL,
(GClassInitFunc) gtk_file_system_handle_class_init,
NULL,
NULL,
sizeof (GtkFileSystemHandle),
0,
(GInstanceInitFunc) gtk_file_system_handle_init,
};
file_system_handle_type = g_type_register_static (G_TYPE_OBJECT,
I_("GtkFileSystemHandle"),
&file_system_handle_info, 0);
}
return file_system_handle_type;
}
#if 0
GtkFileSystemHandle *
gtk_file_system_handle_new (void)
{
return g_object_new (GTK_TYPE_FILE_SYSTEM_HANDLE, NULL);
}
#endif
static void
gtk_file_system_handle_init (GtkFileSystemHandle *handle)
{
handle->file_system = NULL;
handle->cancelled = FALSE;
}
static void
gtk_file_system_handle_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
static void
gtk_file_system_handle_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkFileSystemHandle *handle = GTK_FILE_SYSTEM_HANDLE (object);
switch (prop_id)
{
case PROP_CANCELLED:
g_value_set_boolean (value, handle->cancelled);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_file_system_handle_class_init (GtkFileSystemHandleClass *klass)
{
GObjectClass *o_class;
o_class = (GObjectClass *)klass;
o_class->set_property = gtk_file_system_handle_set_property;
o_class->get_property = gtk_file_system_handle_get_property;
g_object_class_install_property (o_class,
PROP_CANCELLED,
g_param_spec_boolean ("cancelled",
P_("Cancelled"),
P_("Whether or not the operation has been successfully cancelled"),
FALSE,
G_PARAM_READABLE));
}
/*****************************************
* GtkFileSystem *
......@@ -314,29 +487,53 @@ gtk_file_system_list_volumes (GtkFileSystem *file_system)
return GTK_FILE_SYSTEM_GET_IFACE (file_system)->list_volumes (file_system);
}
GtkFileFolder *
gtk_file_system_get_folder (GtkFileSystem *file_system,
const GtkFilePath *path,
GtkFileInfoType types,
GError **error)
GtkFileSystemHandle *
gtk_file_system_get_folder (GtkFileSystem *file_system,
const GtkFilePath *path,
GtkFileInfoType types,
GtkFileSystemGetFolderCallback callback,
gpointer data)
{
g_return_val_if_fail (GTK_IS_FILE_SYSTEM (file_system), NULL);
g_return_val_if_fail (path != NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
g_return_val_if_fail (callback != NULL, NULL);
return GTK_FILE_SYSTEM_GET_IFACE (file_system)->get_folder (file_system, path, types, error);
return GTK_FILE_SYSTEM_GET_IFACE (file_system)->get_folder (file_system, path, types, callback, data);
}
gboolean
gtk_file_system_create_folder(GtkFileSystem *file_system,
const GtkFilePath *path,
GError **error)
GtkFileSystemHandle *
gtk_file_system_get_info (GtkFileSystem *file_system,
const GtkFilePath *path,
GtkFileInfoType types,
GtkFileSystemGetInfoCallback callback,
gpointer data)
{
g_return_val_if_fail (GTK_IS_FILE_SYSTEM (file_system), FALSE);
g_return_val_if_fail (path != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
g_return_val_if_fail (GTK_IS_FILE_SYSTEM (file_system), NULL);
g_return_val_if_fail (path != NULL, NULL);
g_return_val_if_fail (callback != NULL, NULL);
return GTK_FILE_SYSTEM_GET_IFACE (file_system)->get_info (file_system, path, types, callback, data);
}
GtkFileSystemHandle *
gtk_file_system_create_folder (GtkFileSystem *file_system,
const GtkFilePath *path,
GtkFileSystemCreateFolderCallback callback,