[gtk/gbsneto/filechooser-column-view: 89/105] filesystemmodel: Make filtering info available




commit 3de9422b2ab0cc13f591052d5600d271536a0ebf
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Oct 10 22:19:40 2022 -0400

    filesystemmodel: Make filtering info available
    
    Provide the filtered-out and visible bits as a file attributes
    under the names filechooser::filtered-out and filechooser::visible,
    so that we can filter on it.

 gtk/gtkfilesystemmodel.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index c05d610abe..87cd5d4ca0 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -277,13 +277,17 @@ node_set_visible_and_filtered_out (GtkFileSystemModel *model, guint id, gboolean
 
   /* Filteredness */
 
+  g_file_info_set_attribute_boolean (node->info, "filechooser::filtered-out", filtered_out);
+
   if (node->filtered_out != filtered_out)
     {
       node->filtered_out = filtered_out;
     }
 
   /* Visibility */
-  
+
+  g_file_info_set_attribute_boolean (node->info, "filechooser::visible", visible);
+
   if (node->visible == visible ||
       node->frozen_add)
     return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]