[PATCH 2/3] Fix multipath filtering.

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

 



First, a gtk.ComboBoxEntry doesn't have a get_text() method.  It has a
child that has a get_text() method.  Second, filter-as-you-type works more
like you would expect if the filters use "contains" instead of "is".
---
 iw/filter_gui.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index ac1bdb8..0d02dd5 100644
--- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -220,10 +220,12 @@ class MPathCallbacks(FilteredCallbacks):
             self.interconnectEntry.append_text(i)
 
     def _visible_by_vendor(self, model, iter, view):
-        return model.get_value(iter, VENDOR_COL) == self.vendorEntry.get_text()
+        entered = self.vendorEntry.get_text()
+        return model.get_value(iter, VENDOR_COL).find(entered) != -1
 
     def _visible_by_interconnect(self, model, iter, view):
-        return model.get_value(iter, INTERCONNECT_COL) == self.interconnectEntry.get_text()
+        entered = self.interconnectEntry.get_child().get_text()
+        return model.get_value(iter, INTERCONNECT_COL).find(entered) != -1
 
     def _visible_by_wwid(self, model, iter, view):
         # FIXME:  make this support globs, etc.
-- 
1.6.5.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux