[gnome-boxes] Revert "libvirt-machine-props: Fix max value of max disk"



commit 8d3181472087f248b9459a693795e4c2bf213b43
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Jul 1 14:41:09 2014 +0100

    Revert "libvirt-machine-props: Fix max value of max disk"
    
    This reverts commit d9f30a0b746b4045987c1602bff8d3037c91d7ff.
    
    Actually this was wrong and introduced many criticals when going to
    properties view for existing machines at least:
    
    (gnome-boxes:9848): Gtk-CRITICAL **: gtk_scale_new_with_range: assertion
    'min < max' failed
    
    The existing code before this patch was correct as it took into account
    the existing capacity. E.g if disk image capacity is 2G and remaining
    space on volume is 1G, we'll putting 1G as max while 2G is min. You see
    the huge issue with that? :)
    
    Conflicts:
        src/libvirt-machine-properties.vala
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726066

 src/libvirt-machine-properties.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 8b365b6..16c7cf0 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -471,12 +471,13 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
             var volume_info = machine.storage_volume.get_info ();
             var pool = get_storage_pool (machine.connection);
             var pool_info = pool.get_info ();
+            var max_storage = volume_info.capacity + pool_info.available;
 
             var property = add_size_property (ref list,
                                               _("Maximum Disk Size"),
                                               volume_info.capacity,
                                               get_minimum_disk_size (),
-                                              pool_info.available,
+                                              max_storage,
                                               256 * MEGABYTES);
             // Disable 'save on timeout' all together since that could lead us to very bad user experience:
             // You accidently increase the capacity to too high value and if you are not quick enough to 
change


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