From 171248ad4f9d58fdfe5b2d1d9d6651467ad509db Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Thu, 29 Jan 2015 20:24:09 +0100 Subject: [PATCH] Add isBackEnabled checks to all ViewSteps. --- src/libcalamaresui/InstallationViewStep.cpp | 14 +++++++++++--- src/libcalamaresui/InstallationViewStep.h | 3 ++- src/libcalamaresui/viewpages/ViewStep.h | 3 ++- src/modules/greeting/GreetingViewStep.cpp | 9 ++++++++- src/modules/greeting/GreetingViewStep.h | 3 ++- src/modules/keyboard/KeyboardViewStep.cpp | 9 ++++++++- src/modules/keyboard/KeyboardViewStep.h | 3 ++- src/modules/locale/LocaleViewStep.cpp | 9 ++++++++- src/modules/locale/LocaleViewStep.h | 3 ++- src/modules/partition/gui/PartitionViewStep.cpp | 9 ++++++++- src/modules/partition/gui/PartitionViewStep.h | 3 ++- src/modules/prepare/PrepareViewStep.cpp | 9 ++++++++- src/modules/prepare/PrepareViewStep.h | 3 ++- src/modules/summary/SummaryViewStep.cpp | 9 ++++++++- src/modules/summary/SummaryViewStep.h | 3 ++- src/modules/users/UsersViewStep.cpp | 9 ++++++++- src/modules/users/UsersViewStep.h | 3 ++- 17 files changed, 85 insertions(+), 19 deletions(-) diff --git a/src/libcalamaresui/InstallationViewStep.cpp b/src/libcalamaresui/InstallationViewStep.cpp index 242f35a77..50c57964b 100644 --- a/src/libcalamaresui/InstallationViewStep.cpp +++ b/src/libcalamaresui/InstallationViewStep.cpp @@ -1,7 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -98,16 +98,24 @@ InstallationViewStep::isNextEnabled() const return false; } + +bool +InstallationViewStep::isBackEnabled() const +{ + return false; +} + + bool InstallationViewStep::isAtBeginning() const { - return false; + return true; } bool InstallationViewStep::isAtEnd() const { - return false; + return true; } QList< Calamares::job_ptr > diff --git a/src/libcalamaresui/InstallationViewStep.h b/src/libcalamaresui/InstallationViewStep.h index 2e2085ab4..7a434a640 100644 --- a/src/libcalamaresui/InstallationViewStep.h +++ b/src/libcalamaresui/InstallationViewStep.h @@ -1,7 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014, Aurélien Gâteau - * Copyright 2015, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,6 +43,7 @@ public: void back() override; bool isNextEnabled() const override; + bool isBackEnabled() const override; bool isAtBeginning() const override; bool isAtEnd() const override; diff --git a/src/libcalamaresui/viewpages/ViewStep.h b/src/libcalamaresui/viewpages/ViewStep.h index 8da845ee0..be29aa65f 100644 --- a/src/libcalamaresui/viewpages/ViewStep.h +++ b/src/libcalamaresui/viewpages/ViewStep.h @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -50,6 +50,7 @@ public: virtual void back() = 0; virtual bool isNextEnabled() const = 0; + virtual bool isBackEnabled() const = 0; virtual bool isAtBeginning() const = 0; virtual bool isAtEnd() const = 0; diff --git a/src/modules/greeting/GreetingViewStep.cpp b/src/modules/greeting/GreetingViewStep.cpp index 58961b6f6..269ed2ca0 100644 --- a/src/modules/greeting/GreetingViewStep.cpp +++ b/src/modules/greeting/GreetingViewStep.cpp @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -68,6 +68,13 @@ GreetingViewStep::isNextEnabled() const } +bool +GreetingViewStep::isBackEnabled() const +{ + return false; +} + + bool GreetingViewStep::isAtBeginning() const { diff --git a/src/modules/greeting/GreetingViewStep.h b/src/modules/greeting/GreetingViewStep.h index bde4077b8..bb6f194f6 100644 --- a/src/modules/greeting/GreetingViewStep.h +++ b/src/modules/greeting/GreetingViewStep.h @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,6 +45,7 @@ public: void back() override; bool isNextEnabled() const override; + bool isBackEnabled() const override; bool isAtBeginning() const override; bool isAtEnd() const override; diff --git a/src/modules/keyboard/KeyboardViewStep.cpp b/src/modules/keyboard/KeyboardViewStep.cpp index a7a1196e0..dbc4a312b 100644 --- a/src/modules/keyboard/KeyboardViewStep.cpp +++ b/src/modules/keyboard/KeyboardViewStep.cpp @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -83,6 +83,13 @@ KeyboardViewStep::isNextEnabled() const } +bool +KeyboardViewStep::isBackEnabled() const +{ + return true; +} + + bool KeyboardViewStep::isAtBeginning() const { diff --git a/src/modules/keyboard/KeyboardViewStep.h b/src/modules/keyboard/KeyboardViewStep.h index 2a79c495f..e83921258 100644 --- a/src/modules/keyboard/KeyboardViewStep.h +++ b/src/modules/keyboard/KeyboardViewStep.h @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -46,6 +46,7 @@ public: void back() override; bool isNextEnabled() const override; + bool isBackEnabled() const override; bool isAtBeginning() const override; bool isAtEnd() const override; diff --git a/src/modules/locale/LocaleViewStep.cpp b/src/modules/locale/LocaleViewStep.cpp index 60228b738..6d951c070 100644 --- a/src/modules/locale/LocaleViewStep.cpp +++ b/src/modules/locale/LocaleViewStep.cpp @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -113,6 +113,13 @@ LocaleViewStep::isNextEnabled() const } +bool +LocaleViewStep::isBackEnabled() const +{ + return true; +} + + bool LocaleViewStep::isAtBeginning() const { diff --git a/src/modules/locale/LocaleViewStep.h b/src/modules/locale/LocaleViewStep.h index 74802360f..582c9a15d 100644 --- a/src/modules/locale/LocaleViewStep.h +++ b/src/modules/locale/LocaleViewStep.h @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -48,6 +48,7 @@ public: void back() override; bool isNextEnabled() const override; + bool isBackEnabled() const override; bool isAtBeginning() const override; bool isAtEnd() const override; diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 4c084afb1..26241b902 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -1,7 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014, Aurélien Gâteau - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -258,6 +258,13 @@ PartitionViewStep::isNextEnabled() const } +bool +PartitionViewStep::isBackEnabled() const +{ + return true; +} + + bool PartitionViewStep::isAtBeginning() const { diff --git a/src/modules/partition/gui/PartitionViewStep.h b/src/modules/partition/gui/PartitionViewStep.h index 93377a0ba..38a06887b 100644 --- a/src/modules/partition/gui/PartitionViewStep.h +++ b/src/modules/partition/gui/PartitionViewStep.h @@ -1,7 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014, Aurélien Gâteau - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -56,6 +56,7 @@ public: void back() override; bool isNextEnabled() const override; + bool isBackEnabled() const override; bool isAtBeginning() const override; bool isAtEnd() const override; diff --git a/src/modules/prepare/PrepareViewStep.cpp b/src/modules/prepare/PrepareViewStep.cpp index 58eb480f2..096e25cf3 100644 --- a/src/modules/prepare/PrepareViewStep.cpp +++ b/src/modules/prepare/PrepareViewStep.cpp @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -185,6 +185,13 @@ PrepareViewStep::isNextEnabled() const } +bool +PrepareViewStep::isBackEnabled() const +{ + return true; +} + + bool PrepareViewStep::isAtBeginning() const { diff --git a/src/modules/prepare/PrepareViewStep.h b/src/modules/prepare/PrepareViewStep.h index cf13a908b..fe4b73fea 100644 --- a/src/modules/prepare/PrepareViewStep.h +++ b/src/modules/prepare/PrepareViewStep.h @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -56,6 +56,7 @@ public: void back() override; bool isNextEnabled() const override; + bool isBackEnabled() const override; bool isAtBeginning() const override; bool isAtEnd() const override; diff --git a/src/modules/summary/SummaryViewStep.cpp b/src/modules/summary/SummaryViewStep.cpp index b70c2844d..10528bd28 100644 --- a/src/modules/summary/SummaryViewStep.cpp +++ b/src/modules/summary/SummaryViewStep.cpp @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -68,6 +68,13 @@ SummaryViewStep::isNextEnabled() const } +bool +SummaryViewStep::isBackEnabled() const +{ + return true; +} + + bool SummaryViewStep::isAtBeginning() const { diff --git a/src/modules/summary/SummaryViewStep.h b/src/modules/summary/SummaryViewStep.h index e175c15fc..4c7590bfa 100644 --- a/src/modules/summary/SummaryViewStep.h +++ b/src/modules/summary/SummaryViewStep.h @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,6 +45,7 @@ public: void back() override; bool isNextEnabled() const override; + bool isBackEnabled() const override; bool isAtBeginning() const override; bool isAtEnd() const override; diff --git a/src/modules/users/UsersViewStep.cpp b/src/modules/users/UsersViewStep.cpp index a75bd61e9..0f99e02dc 100644 --- a/src/modules/users/UsersViewStep.cpp +++ b/src/modules/users/UsersViewStep.cpp @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -73,6 +73,13 @@ UsersViewStep::isNextEnabled() const } +bool +UsersViewStep::isBackEnabled() const +{ + return true; +} + + bool UsersViewStep::isAtBeginning() const { diff --git a/src/modules/users/UsersViewStep.h b/src/modules/users/UsersViewStep.h index b7499b063..e59d2d09b 100644 --- a/src/modules/users/UsersViewStep.h +++ b/src/modules/users/UsersViewStep.h @@ -1,6 +1,6 @@ /* === This file is part of Calamares - === * - * Copyright 2014, Teo Mrnjavac + * Copyright 2014-2015, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -47,6 +47,7 @@ public: void back() override; bool isNextEnabled() const override; + bool isBackEnabled() const override; bool isAtBeginning() const override; bool isAtEnd() const override;