[gnome-boxes] libvirt-machine-props: Warn on immutable max disk



commit 16e6426e4f700adcc081d3551da28741f2b1ec70
Author: Fabiano Fidêncio <fidencio redhat com>
Date:   Fri Aug 15 14:13:07 2014 +0200

    libvirt-machine-props: Warn on immutable max disk
    
    Warn the users that there is not enough space on theirs machine to
    inscrease the maximum disk size.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726066

 src/libvirt-machine-properties.vala |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 97ca6fb..f00d30e 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -478,6 +478,22 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
                 add_string_property (ref list,
                                      _("Maximum Disk Size"),
                                      "%s".printf (format_size (volume_info.capacity, 
FormatSizeFlags.DEFAULT)));
+
+                var infobar = new Gtk.InfoBar ();
+                infobar.message_type = Gtk.MessageType.WARNING;
+
+                var content = infobar.get_content_area ();
+
+                var image = new Gtk.Image ();
+                image.icon_name = "dialog-warning";
+                image.icon_size = 3;
+                content.add (image);
+
+                var msg = _("There is not enough space on your machine to increase the maximum disk size.");
+                var label = new Gtk.Label (msg);
+                content.add (label);
+
+                add_property (ref list, null, infobar);
                 return null;
             }
 


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