[gnome-boxes] libvirt-machine-props, wizard: Hide storage volume when importing



commit 148428b9672a4be2311ece808a730b5c90724ba5
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Jun 6 03:02:27 2013 +0300

    libvirt-machine-props,wizard: Hide storage volume when importing
    
    When machine is in the process of being imported, hide its storage
    volume from UI because the actual storage capacity will only be
    known after import is finished.
    
    This actually make me wonder if we should import the media during
    wizard's 'preparation' step instead, keeping in mind that that we intend
    to do downloading of medias in there as well.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690757

 src/libvirt-machine-properties.vala |    2 +-
 src/wizard.vala                     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 82d0a87..cc5645f 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -526,7 +526,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
     }
 
     private SizeProperty? add_storage_property (ref List<Boxes.Property> list) {
-        if (machine.storage_volume == null)
+        if (machine.importing || machine.storage_volume == null)
             return null;
 
         try {
diff --git a/src/wizard.vala b/src/wizard.vala
index e117ad5..8597e23 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -443,7 +443,7 @@ private class Boxes.Wizard: Boxes.UI {
                 warning ("Failed to get configuration for machine '%s': %s", libvirt_machine.name, 
error.message);
             }
 
-            if (libvirt_machine.storage_volume != null) {
+            if (!libvirt_machine.importing && libvirt_machine.storage_volume != null) {
                 try {
                     var volume_info = libvirt_machine.storage_volume.get_info ();
                     var capacity = format_size (volume_info.capacity);


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