diff options
-rw-r--r-- | src/installer-media.vala | 5 | ||||
-rw-r--r-- | src/unattended-installer.vala | 6 | ||||
-rw-r--r-- | src/wizard.vala | 11 |
3 files changed, 15 insertions, 7 deletions
diff --git a/src/installer-media.vala b/src/installer-media.vala index 06738cf..4bebb61 100644 --- a/src/installer-media.vala +++ b/src/installer-media.vala @@ -13,6 +13,11 @@ private class Boxes.InstallerMedia : GLib.Object { public string mount_point; public bool from_image; + public virtual bool need_user_input_for_vm_creation { + get { + return false; + } + } public bool live { get { return os_media == null || os_media.live; } } public InstallerMedia.from_iso_info (string path, diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala index e018263..6d9003e 100644 --- a/src/unattended-installer.vala +++ b/src/unattended-installer.vala @@ -7,6 +7,12 @@ public errordomain UnattendedInstallerError { } private abstract class Boxes.UnattendedInstaller: InstallerMedia { + public override bool need_user_input_for_vm_creation { + get { + return !live; // No setup required by live media (and unknown medias are not UnattendedInstaller instances) + } + } + public bool express_install { get { return express_toggle.active; } } diff --git a/src/wizard.vala b/src/wizard.vala index ec2fb99..122ab37 100644 --- a/src/wizard.vala +++ b/src/wizard.vala @@ -391,18 +391,15 @@ private class Boxes.Wizard: Boxes.UI { page == Boxes.WizardPage.PREPARATION) skip_to = page - 1; - if (vm_creator != null && page == Boxes.WizardPage.SETUP) { - var live = vm_creator.install_media.live; - - // No setup required by live media and unattended installers - if (live || !(vm_creator.install_media is UnattendedInstaller)) { + if (vm_creator != null && page == Boxes.WizardPage.SETUP) + // Skip SETUP page if installer media doesn't need it + if (!vm_creator.install_media.need_user_input_for_vm_creation) { skip_to = forwards ? page + 1 : page - 1; // Also skip review for live media if told to do so - if (live && forwards && skip_review_for_live) + if (vm_creator.install_media.live && forwards && skip_review_for_live) skip_to += 1; } - } if (skip_to != page) { this.page = skip_to; |