[gnome-boxes 1/2] Skip 'Preparation' & 'Setup' when going backwards
- From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>
- To: gnome-boxes-list gnome org
- Subject: [gnome-boxes 1/2] Skip 'Preparation' & 'Setup' when going backwards
- Date: Thu, 3 Nov 2011 18:25:00 +0200
From: "Zeeshan Ali (Khattak)" <zeeshanak gnome org>
Skip 'Preparation' and 'Setup' pages when going backwards in the wizard.
---
src/wizard.vala | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/wizard.vala b/src/wizard.vala
index 6bae45c..8ceb21d 100644
--- a/src/wizard.vala
+++ b/src/wizard.vala
@@ -47,7 +47,8 @@ private class Boxes.Wizard: Boxes.UI {
case WizardPage.PREPARATION:
try {
- prepare ();
+ if (value > page)
+ prepare ();
} catch (GLib.Error error) {
warning ("Fixme: %s".printf (error.message));
return;
@@ -250,10 +251,15 @@ private class Boxes.Wizard: Boxes.UI {
private bool skip_page (Boxes.WizardPage page) {
// remote-display case
- if (page > Boxes.WizardPage.SOURCE &&
+ if (page > this.page &&
+ page > Boxes.WizardPage.SOURCE &&
page < Boxes.WizardPage.REVIEW &&
this.source != null)
return true;
+ else if (page < this.page &&
+ page == Boxes.WizardPage.PREPARATION ||
+ page == Boxes.WizardPage.SETUP)
+ return true;
// FIXME: other cases here
--
1.7.7
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]