From 40aab61b5de6926b3c92872036202c02f28bd15d Mon Sep 17 00:00:00 2001 From: BuildTools Date: Thu, 22 Aug 2019 19:25:32 -0400 Subject: [PATCH 1/4] Add I18n references --- apps/settings/base.de.i18n | 3 +++ apps/settings/base.en.i18n | 3 +++ apps/settings/base.es.i18n | 3 +++ apps/settings/base.fr.i18n | 3 +++ apps/settings/base.pt.i18n | 3 +++ 5 files changed, 15 insertions(+) diff --git a/apps/settings/base.de.i18n b/apps/settings/base.de.i18n index e8560fac1..71839de12 100644 --- a/apps/settings/base.de.i18n +++ b/apps/settings/base.de.i18n @@ -29,3 +29,6 @@ ColorWhite = "Wit " ColorBlue = "Blauw " ColorGreen = "Groen " ColorYellow = "Geel " +Contributors = "Medewerkers" +QuentinGuidee = "Quentin Guidee " +DannySimmons = "Danny Simmons " diff --git a/apps/settings/base.en.i18n b/apps/settings/base.en.i18n index 8a5c65370..7d4101c30 100644 --- a/apps/settings/base.en.i18n +++ b/apps/settings/base.en.i18n @@ -29,3 +29,6 @@ ColorWhite = "White " ColorBlue = "Blue " ColorGreen = "Green " ColorYellow = "Yellow " +Contributors = "Contributors" +QuentinGuidee = "Quentin Guidee " +DannySimmons = "Danny Simmons " diff --git a/apps/settings/base.es.i18n b/apps/settings/base.es.i18n index 30d7c421a..fe962e8c7 100644 --- a/apps/settings/base.es.i18n +++ b/apps/settings/base.es.i18n @@ -29,3 +29,6 @@ ColorWhite = "Blanco " ColorBlue = "Azul " ColorGreen = "Verde " ColorYellow = "Amarillo " +Contributors = "Contribuyentes" +QuentinGuidee = "Quentin Guidee " +DannySimmons = "Danny Simmons " diff --git a/apps/settings/base.fr.i18n b/apps/settings/base.fr.i18n index ef8ed0a5a..b7aee4654 100644 --- a/apps/settings/base.fr.i18n +++ b/apps/settings/base.fr.i18n @@ -29,3 +29,6 @@ ColorWhite = "Blanc " ColorBlue = "Bleu " ColorGreen = "Vert " ColorYellow = "Jaune " +Contributors = "Contributeurs" +QuentinGuidee = "Quentin Guidee " +DannySimmons = "Danny Simmons " diff --git a/apps/settings/base.pt.i18n b/apps/settings/base.pt.i18n index 92be26cde..ac6b951a2 100644 --- a/apps/settings/base.pt.i18n +++ b/apps/settings/base.pt.i18n @@ -29,3 +29,6 @@ ColorWhite = "Branco " ColorBlue = "Azul " ColorGreen = "Verde " ColorYellow = "Amarelo " +Contributors = "Contribuidores" +QuentinGuidee = "Quentin Guidee " +DannySimmons = "Danny Simmons " From 464ec5536df4428aa6ef0c7f1859846f8fd93d18 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Thu, 22 Aug 2019 19:26:05 -0400 Subject: [PATCH 2/4] Add makefile and contributors_controller files --- apps/settings/Makefile | 1 + .../sub_menu/contributors_controller.cpp | 35 +++++++++++++++++++ .../sub_menu/contributors_controller.h | 23 ++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 apps/settings/sub_menu/contributors_controller.cpp create mode 100644 apps/settings/sub_menu/contributors_controller.h diff --git a/apps/settings/Makefile b/apps/settings/Makefile index 7061f6951..dbbb802c7 100644 --- a/apps/settings/Makefile +++ b/apps/settings/Makefile @@ -12,6 +12,7 @@ app_src += $(addprefix apps/settings/,\ sub_menu/language_controller.cpp \ sub_menu/message_table_cell_with_editable_text_with_separator.cpp \ sub_menu/preferences_controller.cpp \ + sub_menu/contributors_controller.cpp \ ) i18n_files += $(addprefix apps/settings/,\ diff --git a/apps/settings/sub_menu/contributors_controller.cpp b/apps/settings/sub_menu/contributors_controller.cpp new file mode 100644 index 000000000..f2665f64f --- /dev/null +++ b/apps/settings/sub_menu/contributors_controller.cpp @@ -0,0 +1,35 @@ +#include "contributors_controller.h" +#include + +namespace Settings { + +ContributorsController::ContributorsController(Responder * parentResponder) : + GenericSubController(parentResponder) +{ + for (int i = 0; i < k_totalNumberOfCell; i++) { + m_cells[i].setMessageFont(KDFont::LargeFont); + m_cells[i].setAccessoryFont(KDFont::SmallFont); + m_cells[i].setAccessoryTextColor(Palette::GreyDark); + } +} + +bool ContributorsController::handleEvent(Ion::Events::Event event) { + return GenericSubController::handleEvent(event); +} + +HighlightCell * ContributorsController::reusableCell(int index, int type) { + assert(type == 0); + assert(index >= 0 && index < k_totalNumberOfCell); + return &m_cells[index]; +} + +int ContributorsController::reusableCellCount(int type) { + assert(type == 0); + return k_totalNumberOfCell; +} + +void ContributorsController::willDisplayCellForIndex(HighlightCell * cell, int index) { + GenericSubController::willDisplayCellForIndex(cell, index); +} + +} diff --git a/apps/settings/sub_menu/contributors_controller.h b/apps/settings/sub_menu/contributors_controller.h new file mode 100644 index 000000000..300b94d61 --- /dev/null +++ b/apps/settings/sub_menu/contributors_controller.h @@ -0,0 +1,23 @@ +#ifndef SETTINGS_CONTRIBUTORS_CONTROLLER_H +#define SETTINGS_CONTRIBUTORS_CONTROLLER_H + +#include "generic_sub_controller.h" +#include + +namespace Settings { + +class ContributorsController : public GenericSubController { +public: + ContributorsController(Responder * parentResponder); + bool handleEvent(Ion::Events::Event event) override; + HighlightCell * reusableCell(int index, int type) override; + int reusableCellCount(int type) override; + void willDisplayCellForIndex(HighlightCell * cell, int index) override; +private: + constexpr static int k_totalNumberOfCell = 2; + MessageTableCellWithBuffer m_cells[k_totalNumberOfCell]; +}; + +} + +#endif From 1ea8149498a1661087b9f21c64849a1f8f1d40d8 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Thu, 22 Aug 2019 19:26:32 -0400 Subject: [PATCH 3/4] Add contributors_controller to main_controller --- apps/settings/main_controller.cpp | 22 ++++++++++++++++------ apps/settings/main_controller.h | 8 +++++--- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/apps/settings/main_controller.cpp b/apps/settings/main_controller.cpp index 898536783..5b90d34b8 100644 --- a/apps/settings/main_controller.cpp +++ b/apps/settings/main_controller.cpp @@ -14,11 +14,12 @@ const SettingsMessageTree complexFormatChildren[3] = {SettingsMessageTree(I18n:: const SettingsMessageTree examChildren[1] = {SettingsMessageTree(I18n::Message::ActivateExamMode)}; const SettingsMessageTree ledColorChildren[4] = {SettingsMessageTree(I18n::Message::ColorWhite), SettingsMessageTree(I18n::Message::ColorGreen), SettingsMessageTree(I18n::Message::ColorBlue), SettingsMessageTree(I18n::Message::ColorYellow)}; const SettingsMessageTree aboutChildren[4] = {SettingsMessageTree(I18n::Message::SoftwareVersion), SettingsMessageTree(I18n::Message::CustomSoftwareVersion), SettingsMessageTree(I18n::Message::SerialNumber), SettingsMessageTree(I18n::Message::FccId)}; +const SettingsMessageTree contributorsChildren[2] = {SettingsMessageTree(I18n::Message::QuentinGuidee), SettingsMessageTree(I18n::Message::DannySimmons)}; #ifdef EPSILON_BOOT_PROMPT -const SettingsMessageTree menu[10] = +const SettingsMessageTree menu[11] = #else -const SettingsMessageTree menu[9] = +const SettingsMessageTree menu[10] = #endif {SettingsMessageTree(I18n::Message::AngleUnit, angleChildren, 2), SettingsMessageTree(I18n::Message::DisplayMode, floatDisplayModeChildren, 3), @@ -33,11 +34,12 @@ const SettingsMessageTree menu[9] = #elif EPSILON_BOOT_PROMPT == EPSILON_UPDATE_PROMPT SettingsMessageTree(I18n::Message::UpdatePopUp), #endif - SettingsMessageTree(I18n::Message::About, aboutChildren, 4)}; + SettingsMessageTree(I18n::Message::About, aboutChildren, 4), + SettingsMessageTree(I18n::Message::Contributors, contributorsChildren, 2)}; #ifdef EPSILON_BOOT_PROMPT -const SettingsMessageTree model = SettingsMessageTree(I18n::Message::SettingsApp, menu, 10); +const SettingsMessageTree model = SettingsMessageTree(I18n::Message::SettingsApp, menu, 11); #else -const SettingsMessageTree model = SettingsMessageTree(I18n::Message::SettingsApp, menu, 9); +const SettingsMessageTree model = SettingsMessageTree(I18n::Message::SettingsApp, menu, 10); #endif MainController::MainController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate) : @@ -52,7 +54,8 @@ MainController::MainController(Responder * parentResponder, InputEventHandlerDel m_displayModeController(this, inputEventHandlerDelegate), m_languageController(this, 13), m_examModeController(this), - m_aboutController(this) + m_aboutController(this), + m_contributorsController(this) { for (int i = 0; i < k_numberOfSimpleChevronCells; i++) { m_cells[i].setMessageFont(KDFont::LargeFont); @@ -117,6 +120,13 @@ bool MainController::handleEvent(Ion::Events::Event event) { case 6: subController = &m_examModeController; break; +#ifdef EPSILON_BOOT_PROMPT + case 10: +#else + case 9: +#endif + subController = &m_contributorsController; + break; #ifdef EPSILON_BOOT_PROMPT case 9: #else diff --git a/apps/settings/main_controller.h b/apps/settings/main_controller.h index 1f41e77a4..e0eb47ce9 100644 --- a/apps/settings/main_controller.h +++ b/apps/settings/main_controller.h @@ -8,6 +8,7 @@ #include "sub_menu/exam_mode_controller.h" #include "sub_menu/language_controller.h" #include "sub_menu/preferences_controller.h" +#include "sub_menu/contributors_controller.h" namespace Settings { @@ -29,12 +30,12 @@ public: private: StackViewController * stackController() const; #ifdef EPSILON_BOOT_PROMPT - constexpr static int k_totalNumberOfCell = 10; + constexpr static int k_totalNumberOfCell = 11; MessageTableCellWithSwitch m_popUpCell; #else - constexpr static int k_totalNumberOfCell = 9; + constexpr static int k_totalNumberOfCell = 10; #endif - constexpr static int k_numberOfSimpleChevronCells = 8; + constexpr static int k_numberOfSimpleChevronCells = 9; MessageTableCellWithChevronAndMessage m_cells[k_numberOfSimpleChevronCells]; MessageTableCellWithGauge m_brightnessCell; SelectableTableView m_selectableTableView; @@ -44,6 +45,7 @@ private: LanguageController m_languageController; ExamModeController m_examModeController; AboutController m_aboutController; + ContributorsController m_contributorsController; }; From 5b99d6c63abc7dad4f049e7974b446051fbaf5a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Guid=C3=A9e?= Date: Fri, 23 Aug 2019 07:55:26 +0200 Subject: [PATCH 4/4] [1.7] Add contributors to settings --- scripts/config.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/config.mak b/scripts/config.mak index 964ef8411..855930bae 100644 --- a/scripts/config.mak +++ b/scripts/config.mak @@ -4,7 +4,7 @@ PLATFORM ?= device DEBUG ?= 0 EPSILON_VERSION ?= 11.2.0 -EPSILON_CUSTOM_VERSION ?= 1.6 +EPSILON_CUSTOM_VERSION ?= 1.7 EPSILON_ONBOARDING_APP ?= 1 # Valid values are "none", "update", "beta" EPSILON_BOOT_PROMPT ?= none