[on-boarding] Delete specialize PopUpController

This commit is contained in:
Émilie Feral
2018-10-12 14:01:45 +02:00
committed by LeaNumworks
parent 0ee0e87637
commit c8d7ee46d9
4 changed files with 24 additions and 36 deletions

View File

@@ -10,6 +10,26 @@ extern "C" {
using namespace Shared;
#if EPSILON_SOFTWARE_UPDATE_PROMPT
static I18n::Message sOnBoardingMessages[] = {
I18n::Message::UpdateAvailable,
I18n::Message::UpdateMessage1,
I18n::Message::UpdateMessage2,
I18n::Message::BlankMessage,
I18n::Message::UpdateMessage3,
I18n::Message::UpdateMessage4};
static KDColor sOnBoardingColors[] = {
KDColorBlack,
KDColorBlack,
KDColorBlack,
KDColorWhite,
KDColorBlack,
Palette::YellowDark};
#endif
AppsContainer::AppsContainer() :
Container(),
m_window(),
@@ -18,7 +38,7 @@ AppsContainer::AppsContainer() :
m_variableBoxController(&m_globalContext),
m_examPopUpController(this),
#if EPSILON_SOFTWARE_UPDATE_PROMPT
m_updateController(),
m_updateController(sOnBoardingMessages, sOnBoardingColors, 6),
#endif
m_batteryTimer(BatteryTimer(this)),
m_suspendTimer(SuspendTimer(this)),
@@ -228,7 +248,7 @@ bool AppsContainer::updateAlphaLock() {
}
#if EPSILON_SOFTWARE_UPDATE_PROMPT
OnBoarding::UpdateController * AppsContainer::updatePopUpController() {
OnBoarding::PopUpController * AppsContainer::updatePopUpController() {
return &m_updateController;
}
#endif

View File

@@ -49,7 +49,7 @@ public:
void shutdownDueToLowBattery();
void setShiftAlphaStatus(Ion::Events::ShiftAlphaStatus newStatus);
#if EPSILON_SOFTWARE_UPDATE_PROMPT
OnBoarding::UpdateController * updatePopUpController();
OnBoarding::PopUpController * updatePopUpController();
#endif
void redrawWindow();
// Exam pop-up controller delegate
@@ -74,7 +74,7 @@ private:
VariableBoxController m_variableBoxController;
ExamPopUpController m_examPopUpController;
#if EPSILON_SOFTWARE_UPDATE_PROMPT
OnBoarding::UpdateController m_updateController;
OnBoarding::PopUpController m_updateController;
#endif
BatteryTimer m_batteryTimer;
SuspendTimer m_suspendTimer;

View File

@@ -64,27 +64,4 @@ bool PopUpController::handleEvent(Ion::Events::Event event) {
#endif
#if EPSILON_SOFTWARE_UPDATE_PROMPT
static I18n::Message sOnBoardingMessages[] = {
I18n::Message::UpdateAvailable,
I18n::Message::UpdateMessage1,
I18n::Message::UpdateMessage2,
I18n::Message::BlankMessage,
I18n::Message::UpdateMessage3,
I18n::Message::UpdateMessage4};
static KDColor sOnBoardingColors[] = {
KDColorBlack,
KDColorBlack,
KDColorBlack,
KDColorWhite,
KDColorBlack,
Palette::YellowDark};
UpdateController::UpdateController() :
PopUpController(sOnBoardingMessages, sOnBoardingColors, 6) {}
#endif
}

View File

@@ -35,15 +35,6 @@ private:
#endif
#if EPSILON_SOFTWARE_UPDATE_PROMPT
class UpdateController : public PopUpController {
public:
UpdateController();
};
#endif
}
#endif