impl->browse_files_model =
_gtk_file_system_model_new_for_directory (impl->current_folder,
MODEL_ATTRIBUTES,
- NULL,
- NULL,
MODEL_COLUMN_TYPES);
_gtk_file_system_model_set_show_hidden (impl->browse_files_model, impl->show_hidden);
{
g_assert (impl->search_model == NULL);
- impl->search_model = _gtk_file_system_model_new (NULL,
- NULL,
- MODEL_COLUMN_TYPES);
+ impl->search_model = _gtk_file_system_model_new (MODEL_COLUMN_TYPES);
set_current_model (impl, G_LIST_MODEL (impl->search_model));
update_columns (impl, TRUE, _("Modified"));
/* Setup recent model */
g_assert (impl->recent_model == NULL);
- impl->recent_model = _gtk_file_system_model_new (NULL,
- NULL,
- MODEL_COLUMN_TYPES);
+ impl->recent_model = _gtk_file_system_model_new (MODEL_COLUMN_TYPES);
_gtk_file_system_model_set_filter (impl->recent_model, impl->current_filter);
guint n_columns; /* number of columns */
GType * column_types; /* types of each column */
- GtkFileSystemModelGetValue get_func; /* function to call to fill in values in columns */
- gpointer get_data; /* data to pass to get_func */
GtkFileFilter * filter; /* filter to use for deciding which nodes are visible */
}
static GtkFileSystemModel *
-_gtk_file_system_model_new_valist (GtkFileSystemModelGetValue get_func,
- gpointer get_data,
- guint n_columns,
+_gtk_file_system_model_new_valist (guint n_columns,
va_list args)
{
GtkFileSystemModel *model;
model = g_object_new (GTK_TYPE_FILE_SYSTEM_MODEL, NULL);
- model->get_func = get_func;
- model->get_data = get_data;
gtk_file_system_model_set_n_columns (model, n_columns, args);
/**
* _gtk_file_system_model_new:
- * @get_func: function to call for getting a value
- * @get_data: user data argument passed to @get_func
* @n_columns: number of columns
* @...: @n_columns `GType` types for the columns
*
* Returns: the newly created `GtkFileSystemModel`
**/
GtkFileSystemModel *
-_gtk_file_system_model_new (GtkFileSystemModelGetValue get_func,
- gpointer get_data,
- guint n_columns,
+_gtk_file_system_model_new (guint n_columns,
...)
{
GtkFileSystemModel *model;
g_return_val_if_fail (n_columns > 0, NULL);
va_start (args, n_columns);
- model = _gtk_file_system_model_new_valist (get_func, get_data, n_columns, args);
+ model = _gtk_file_system_model_new_valist (n_columns, args);
va_end (args);
return model;
* _gtk_file_system_model_new_for_directory:
* @directory: the directory to show.
* @attributes: (nullable): attributes to immediately load or %NULL for all
- * @get_func: function that the model should call to query data about a file
- * @get_data: user data to pass to the @get_func
* @n_columns: number of columns
* @...: @n_columns `GType` types for the columns
*
GtkFileSystemModel *
_gtk_file_system_model_new_for_directory (GFile * dir,
const char * attributes,
- GtkFileSystemModelGetValue get_func,
- gpointer get_data,
guint n_columns,
...)
{
g_return_val_if_fail (n_columns > 0, NULL);
va_start (args, n_columns);
- model = _gtk_file_system_model_new_valist (get_func, get_data, n_columns, args);
+ model = _gtk_file_system_model_new_valist (n_columns, args);
va_end (args);
gtk_file_system_model_set_directory (model, dir, attributes);
GType _gtk_file_system_model_get_type (void) G_GNUC_CONST;
-typedef gboolean (*GtkFileSystemModelGetValue) (GtkFileSystemModel *model,
- GFile *file,
- GFileInfo *info,
- int column,
- GValue *value,
- gpointer user_data);
-
-GtkFileSystemModel *_gtk_file_system_model_new (GtkFileSystemModelGetValue get_func,
- gpointer get_data,
- guint n_columns,
+GtkFileSystemModel *_gtk_file_system_model_new (guint n_columns,
...);
GtkFileSystemModel *_gtk_file_system_model_new_for_directory(GFile * dir,
const char * attributes,
- GtkFileSystemModelGetValue get_func,
- gpointer get_data,
guint n_columns,
...);
GFile * _gtk_file_system_model_get_directory (GtkFileSystemModel *model);