[gnome-boxes] vm-creator: Add 'expess_install' property
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] vm-creator: Add 'expess_install' property
- Date: Wed, 12 Nov 2014 14:46:33 +0000 (UTC)
commit 2621d593b9b9de643c753cf6219775e9c34000e7
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Nov 12 13:08:45 2014 +0000
vm-creator: Add 'expess_install' property
Add a convenient property to find out if vm-creator is doing (or going
to do) an express installation.
https://bugzilla.gnome.org/show_bug.cgi?id=694931
src/libvirt-machine-properties.vala | 3 +--
src/vm-creator.vala | 9 +++++++--
2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 9b1c1e4..5718da2 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -313,8 +313,7 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
if (machine.vm_creator != null) {
var media = machine.vm_creator.install_media;
- if ((media is UnattendedInstaller && (media as UnattendedInstaller).setup_box.express_install) ||
- (media.os_media != null && media.os_media.live)) {
+ if (machine.vm_creator.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);
diff --git a/src/vm-creator.vala b/src/vm-creator.vala
index 3d3d2e5..a540141 100644
--- a/src/vm-creator.vala
+++ b/src/vm-creator.vala
@@ -9,6 +9,12 @@ private class Boxes.VMCreator {
private const int INSTALL_COMPLETE_PERCENT = 99;
public InstallerMedia? install_media { get; protected set; }
+ public bool express_install {
+ get {
+ return ((install_media is UnattendedInstaller) &&
+ (install_media as UnattendedInstaller).setup_box.express_install);
+ }
+ }
private Connection? connection { owned get { return App.app.default_connection; } }
private ulong state_changed_id;
@@ -57,8 +63,7 @@ private class Boxes.VMCreator {
}
public virtual void launch_vm (LibvirtMachine machine) throws GLib.Error {
- if (!(install_media is UnattendedInstaller) ||
- !(install_media as UnattendedInstaller).setup_box.express_install) {
+ if (!express_install) {
ulong signal_id = 0;
var window = App.app.main_window;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]