[gnome-boxes] libvirt-machine-properties: Add get_resources_properties()



commit 0878743af98835bc321d770bdfc0e56a2482fe66
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Sun Dec 7 17:02:02 2014 +0000

    libvirt-machine-properties: Add get_resources_properties()
    
    Refactor the code that adds system resources (RAM and storage) into a
    seperate method. We are declaring it as public API cause we'll be using
    it from outside LibvirtMachineProperties in a following patch.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=741046

 src/libvirt-machine-properties.vala |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 8a03b06..1ce6272 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -143,9 +143,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
 
             add_system_props_buttons (ref list);
 
-            var ram_property = add_ram_property (ref list);
-            var storage_property = add_storage_property (ref list);
-            mark_recommended_resources.begin (ram_property, storage_property);
+            get_resources_properties (ref list);
 
             break;
 
@@ -237,6 +235,12 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
         return list;
     }
 
+    public void get_resources_properties (ref List<Boxes.Property> list) {
+        var ram_property = add_ram_property (ref list);
+        var storage_property = add_storage_property (ref list);
+        mark_recommended_resources.begin (ram_property, storage_property);
+    }
+
     private void add_cdrom_property (GVirConfig.DomainDisk disk_config, ref List<Boxes.Property> list) {
         var grid = new Gtk.Grid ();
         grid.set_orientation (Gtk.Orientation.HORIZONTAL);


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