[gnome-boxes/wip/exalm/remove-switcher: 2/2] collection: Drop filter func



commit 1eac2a89a274d3d68c7a378c4af04ea6364f8b11
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue May 26 21:59:55 2020 +0500

    collection: Drop filter func
    
    It's not used anymore, since local and remote filteres have been removed.

 src/collection.vala | 15 ---------------
 src/icon-view.vala  |  3 ---
 src/list-view.vala  |  3 ---
 3 files changed, 21 deletions(-)
---
diff --git a/src/collection.vala b/src/collection.vala
index 2b073718..e239a27e 100644
--- a/src/collection.vala
+++ b/src/collection.vala
@@ -115,9 +115,6 @@ public void foreach_item (CollectionForeachFunc foreach_func) {
 }
 
 private class Boxes.CollectionFilter: GLib.Object {
-    // Need a signal cause delegate properties aren't real properties and hence are not notified.
-    public signal void filter_func_changed ();
-
     private string [] terms;
 
     private string _text;
@@ -131,15 +128,6 @@ public void foreach_item (CollectionForeachFunc foreach_func) {
         }
     }
 
-    private unowned Boxes.CollectionFilterFunc _filter_func = null;
-    public unowned Boxes.CollectionFilterFunc filter_func {
-        get { return _filter_func; }
-        set {
-            _filter_func = value;
-            filter_func_changed ();
-        }
-    }
-
     public bool filter (CollectionItem item) {
         var name = canonicalize_for_search (item.name);
         foreach (var term in terms) {
@@ -147,9 +135,6 @@ public bool filter (CollectionItem item) {
                 return false;
         }
 
-        if (filter_func != null)
-            return filter_func (item);
-
         return true;
     }
 }
diff --git a/src/icon-view.vala b/src/icon-view.vala
index e3673eda..5ab3e58c 100644
--- a/src/icon-view.vala
+++ b/src/icon-view.vala
@@ -35,9 +35,6 @@
         filter.notify["text"].connect (() => {
             flowbox.invalidate_filter ();
         });
-        filter.filter_func_changed.connect (() => {
-            flowbox.invalidate_filter ();
-        });
 
         setup_flowbox ();
 
diff --git a/src/list-view.vala b/src/list-view.vala
index 82577e3c..d1995657 100644
--- a/src/list-view.vala
+++ b/src/list-view.vala
@@ -60,9 +60,6 @@ public override void dispose () {
         filter.notify["text"].connect (() => {
             list_box.invalidate_filter ();
         });
-        filter.filter_func_changed.connect (() => {
-            list_box.invalidate_filter ();
-        });
         setup_list_box ();
 
         notify["ui-state"].connect (ui_state_changed);


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