[gnome-boxes] libvirt-machine-props: Be less strict about ejection of CDROM



commit f29819ee2c3501f4cf0c5efbe45cac08cf6f969f
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Mar 21 17:57:14 2014 +0000

    libvirt-machine-props: Be less strict about ejection of CDROM
    
    Instead of not allowing ejection of installer media during all live and
    installations sessions, let's only disallow it for the cases where we are
    very sure user will not need to eject the media: live media and express
    installation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726753

 src/libvirt-machine-properties.vala |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 7e697cf..15d9291 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -281,11 +281,16 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
         else
             label.set_text (get_utf8_basename (source));
 
-        if (VMConfigurator.is_install_config (machine.domain_config) ||
-            VMConfigurator.is_live_config (machine.domain_config)) {
-            add_property (ref list, _("CD/DVD"), grid);
+        if (machine.vm_creator != null) {
+            var media = machine.vm_creator.install_media;
 
-            return;
+            if ((media is UnattendedInstaller && (media as UnattendedInstaller).setup_box.express_install) ||
+                (media.os_media != null && media.os_media.live)) {
+                // Don't let user eject installer media if its an express installation or a live media
+                add_property (ref list, _("CD/DVD"), grid);
+
+                return;
+            }
         }
 
         var button_label = new Gtk.Label ("");


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