[gnome-boxes/wip/image-import: 7/7] libvirt-machine-props, wizard: Hide storage volume when importing
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/image-import: 7/7] libvirt-machine-props, wizard: Hide storage volume when importing
- Date: Thu, 6 Jun 2013 00:10:52 +0000 (UTC)
commit 4798f16fcf4b2540ecf08586c31ff0bfddc8bf62
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.
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 1b7a02a..c6ccf1d 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]