mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
filesystemmodel: Add more GtkFileSystemItem getters
They'll help us further remove GtkTreeModel code.
This commit is contained in:
parent
d5b31a30fd
commit
1f2561b08e
@ -1912,3 +1912,25 @@ _gtk_file_system_item_get_file_info (GtkFileSystemItem *item)
|
||||
{
|
||||
return item->node->info;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_gtk_file_system_item_is_visible (GtkFileSystemItem *item)
|
||||
{
|
||||
return item->node->visible;
|
||||
}
|
||||
|
||||
GtkFileSystemItem *
|
||||
_gtk_file_system_model_get_item_for_file(GtkFileSystemModel *model,
|
||||
GFile *file)
|
||||
{
|
||||
FileModelNode *node;
|
||||
guint i;
|
||||
|
||||
i = node_get_for_file (model, file);
|
||||
|
||||
if (i == 0)
|
||||
return NULL;
|
||||
|
||||
node = get_node (model, i);
|
||||
return node->item;
|
||||
}
|
||||
|
@ -104,6 +104,11 @@ GFile * _gtk_file_system_item_get_file (GtkFileSystemItem
|
||||
|
||||
GFileInfo * _gtk_file_system_item_get_file_info (GtkFileSystemItem *item);
|
||||
|
||||
gboolean _gtk_file_system_item_is_visible (GtkFileSystemItem *item);
|
||||
|
||||
GtkFileSystemItem * _gtk_file_system_model_get_item_for_file(GtkFileSystemModel *model,
|
||||
GFile *file);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_FILE_SYSTEM_MODEL_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user