diff options
author | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2012-07-04 23:29:27 +0300 |
---|---|---|
committer | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2012-07-11 20:04:34 +0300 |
commit | 93afdd04a69474b82582d8e491dc375164a6133e (patch) | |
tree | 3d60c244a401787163fa46893b275bcdb19aa43a | |
parent | d7f06463034735c3d4452da752d5782d51a52ccb (diff) |
wizard: Simplify setup page skipping logic a bit
This also fixes the regression of 'SETUP' not being skipped for live
medias when going backwords in wizard.
https://bugzilla.gnome.org/show_bug.cgi?id=678849
-rw-r--r-- | src/wizard.vala | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/wizard.vala b/src/wizard.vala index 6e017df..ec2fb99 100644 --- a/src/wizard.vala +++ b/src/wizard.vala @@ -391,15 +391,17 @@ private class Boxes.Wizard: Boxes.UI { page == Boxes.WizardPage.PREPARATION) skip_to = page - 1; - if (vm_creator != null) { - if (forwards && page == Boxes.WizardPage.SETUP && vm_creator.install_media.live) - // No setup required for live media and also skip review if told to do so - skip_to = skip_review_for_live ? WizardPage.LAST : WizardPage.REVIEW; + if (vm_creator != null && page == Boxes.WizardPage.SETUP) { + var live = vm_creator.install_media.live; - // always skip SETUP page if not unattended installer - if (page == Boxes.WizardPage.SETUP && - !(vm_creator.install_media is UnattendedInstaller)) + // No setup required by live media and unattended installers + if (live || !(vm_creator.install_media is UnattendedInstaller)) { 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) + skip_to += 1; + } } if (skip_to != page) { |