summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>2012-07-11 10:53:00 +0300
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>2012-07-14 00:20:26 +0300
commita902f815a94233970422351f19ebed32c10c52d2 (patch)
tree7e804dc80a0e21a902d377086b661ff91a32befc
parentb84e77958ab1413fba8e12c3be12ca381fb5eb88 (diff)
InstallerMedia tells if setup is needed
No need to use 'is UnattendedInstaller' check for this now. https://bugzilla.gnome.org/show_bug.cgi?id=679706
-rw-r--r--src/installer-media.vala5
-rw-r--r--src/unattended-installer.vala6
-rw-r--r--src/wizard.vala11
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;