From 0ee0e876373df7901c1e434c945f9d4c361712df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 12 Oct 2018 13:58:51 +0200 Subject: [PATCH] [apps] GlobalPreferences: change name showUpdatePopUp --> showPopUp --- apps/apps_container.cpp | 2 +- apps/global_preferences.cpp | 12 ++++++------ apps/global_preferences.h | 6 +++--- apps/settings/main_controller.cpp | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/apps_container.cpp b/apps/apps_container.cpp index 489541dc2..ac4c9e745 100644 --- a/apps/apps_container.cpp +++ b/apps/apps_container.cpp @@ -71,7 +71,7 @@ VariableBoxController * AppsContainer::variableBoxController() { void AppsContainer::suspend(bool checkIfPowerKeyReleased) { resetShiftAlphaStatus(); #if EPSILON_SOFTWARE_UPDATE_PROMPT - if (activeApp()->snapshot()!= onBoardingAppSnapshot() && activeApp()->snapshot() != hardwareTestAppSnapshot() && GlobalPreferences::sharedGlobalPreferences()->showUpdatePopUp()) { + if (activeApp()->snapshot()!= onBoardingAppSnapshot() && activeApp()->snapshot() != hardwareTestAppSnapshot() && GlobalPreferences::sharedGlobalPreferences()->showPopUp()) { activeApp()->displayModalViewController(&m_updateController, 0.f, 0.f); } #endif diff --git a/apps/global_preferences.cpp b/apps/global_preferences.cpp index 6e5340426..16def2b11 100644 --- a/apps/global_preferences.cpp +++ b/apps/global_preferences.cpp @@ -4,7 +4,7 @@ GlobalPreferences::GlobalPreferences() : m_language(I18n::Language::EN), m_examMode(ExamMode::Desactivate), #if EPSILON_SOFTWARE_UPDATE_PROMPT - m_showUpdatePopUp(true), + m_showPopUp(true), #endif m_brightnessLevel(Ion::Backlight::MaxBrightness) { @@ -36,13 +36,13 @@ void GlobalPreferences::setExamMode(ExamMode examMode) { } #if EPSILON_SOFTWARE_UPDATE_PROMPT -bool GlobalPreferences::showUpdatePopUp() const { - return m_showUpdatePopUp; +bool GlobalPreferences::showPopUp() const { + return m_showPopUp; } -void GlobalPreferences::setShowUpdatePopUp(bool showUpdatePopUp) { - if (showUpdatePopUp != m_showUpdatePopUp) { - m_showUpdatePopUp = showUpdatePopUp; +void GlobalPreferences::setShowPopUp(bool showPopUp) { + if (showPopUp != m_showPopUp) { + m_showPopUp = showPopUp; } } #endif diff --git a/apps/global_preferences.h b/apps/global_preferences.h index 134fb0540..d971a53bf 100644 --- a/apps/global_preferences.h +++ b/apps/global_preferences.h @@ -16,8 +16,8 @@ public: ExamMode examMode() const; void setExamMode(ExamMode examMode); #if EPSILON_SOFTWARE_UPDATE_PROMPT - bool showUpdatePopUp() const; - void setShowUpdatePopUp(bool showUpdatePopUp); + bool showPopUp() const; + void setShowPopUp(bool showPopUp); #endif int brightnessLevel() const; void setBrightnessLevel(int brightnessLevel); @@ -26,7 +26,7 @@ private: I18n::Language m_language; ExamMode m_examMode; #if EPSILON_SOFTWARE_UPDATE_PROMPT - bool m_showUpdatePopUp; + bool m_showPopUp; #endif int m_brightnessLevel; }; diff --git a/apps/settings/main_controller.cpp b/apps/settings/main_controller.cpp index 120365aff..817313f37 100644 --- a/apps/settings/main_controller.cpp +++ b/apps/settings/main_controller.cpp @@ -71,7 +71,7 @@ bool MainController::handleEvent(Ion::Events::Event event) { #if EPSILON_SOFTWARE_UPDATE_PROMPT if (m_messageTreeModel->children(selectedRow())->label() == I18n::Message::UpdatePopUp) { if (event == Ion::Events::OK || event == Ion::Events::EXE) { - GlobalPreferences::sharedGlobalPreferences()->setShowUpdatePopUp(!GlobalPreferences::sharedGlobalPreferences()->showUpdatePopUp()); + GlobalPreferences::sharedGlobalPreferences()->setShowPopUp(!GlobalPreferences::sharedGlobalPreferences()->showPopUp()); m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow()); return true; } @@ -195,7 +195,7 @@ void MainController::willDisplayCellForIndex(HighlightCell * cell, int index) { if (index == 7) { MessageTableCellWithSwitch * mySwitchCell = (MessageTableCellWithSwitch *)cell; SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView(); - mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->showUpdatePopUp()); + mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->showPopUp()); return; } #endif