[gnome-boxes] Make use of Osinfo.Os.get_devices_by_property()



commit 32045340cd6a232ff55de600f1de9db8d92bf2e4
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Jan 19 02:37:54 2012 +0200

    Make use of Osinfo.Os.get_devices_by_property()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668229

 configure.ac  |    2 +-
 src/util.vala |    5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 550340c..bf08f98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,7 +50,7 @@ LIBVIRT_GCONFIG_MIN_VERSION=0.0.4
 LIBXML2_MIN_VERSION=2.7.8
 SPICE_GTK_MIN_VERSION=0.7.98
 GUDEV_MIN_VERSION=147
-OSINFO_MIN_VERSION=0.0.5
+OSINFO_MIN_VERSION=0.0.6
 
 PKG_CHECK_MODULES(BOXES, [
   clutter-gtk-1.0 >= $CLUTTER_GTK_MIN_VERSION
diff --git a/src/util.vala b/src/util.vala
index e3311ce..e4fe160 100644
--- a/src/util.vala
+++ b/src/util.vala
@@ -265,9 +265,8 @@ namespace Boxes {
         if (os == null)
             return null;
 
-        var filter = new Osinfo.Filter ();
-        filter.add_constraint (prop_name, prop_value);
-        var devices = os.get_all_devices (null).new_filtered (filter);
+        var devices = os.get_devices_by_property (prop_name, prop_value, true);
+
         return (devices.get_length () > 0) ? devices.get_nth (0) as Osinfo.Device : null;
     }
 



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