[gnome-boxes] wizard: Simplify setup page skipping logic a bit
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] wizard: Simplify setup page skipping logic a bit
- Date: Wed, 11 Jul 2012 17:31:28 +0000 (UTC)
commit 93afdd04a69474b82582d8e491dc375164a6133e
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed Jul 4 23:29:27 2012 +0300
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
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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]