From 982a6d14b66c9cfad057afb2cc8c170ee11c16ae Mon Sep 17 00:00:00 2001 From: cartoone Date: Tue, 4 Jun 2024 21:38:52 +0200 Subject: [PATCH 01/14] add bgcolor to turtul module --- python/port/genhdr/qstrdefs.in.h | 1 + python/port/mod/turtle/modturtle.cpp | 33 ++++++++++++++++++++++++ python/port/mod/turtle/modturtle.h | 1 + python/port/mod/turtle/modturtle_table.c | 2 ++ python/port/mod/turtle/turtle.cpp | 17 +++++++++++- python/port/mod/turtle/turtle.h | 11 ++++++++ 6 files changed, 64 insertions(+), 1 deletion(-) diff --git a/python/port/genhdr/qstrdefs.in.h b/python/port/genhdr/qstrdefs.in.h index 78cfdb182c8..c390f4ad084 100644 --- a/python/port/genhdr/qstrdefs.in.h +++ b/python/port/genhdr/qstrdefs.in.h @@ -520,6 +520,7 @@ Q(pensize) Q(width) Q(isdown) Q(pencolor) +Q(bgcolor) Q(reset) Q(showturtle) Q(st) diff --git a/python/port/mod/turtle/modturtle.cpp b/python/port/mod/turtle/modturtle.cpp index e08aa4dbd1f..440d696aa75 100644 --- a/python/port/mod/turtle/modturtle.cpp +++ b/python/port/mod/turtle/modturtle.cpp @@ -20,6 +20,7 @@ void modturtle_view_did_disappear() { mp_obj_t modturtle___init__() { sTurtle = Turtle(); + sTurtle.drawBg(); /* Note: we don't even bother writing a destructor for Turtle because this * init function is called once, and only once, per MicroPython init cycle. * When the previous Turtle object is destroyed, its VM is long gone. */ @@ -165,6 +166,38 @@ mp_obj_t modturtle_pencolor(size_t n_args, const mp_obj_t *args) { return mp_const_none; } +mp_obj_t modturtle_bgcolor(size_t n_args, const mp_obj_t *args) { + if (n_args == 0) { + // bgcolor() + KDColor c = sTurtle.colorBg(); + mp_obj_t mp_col[3]; + if(sTurtle.colorMode() == MicroPython::Color::Mode::MaxIntensity255){ + mp_col[0] = mp_obj_new_int_from_uint(c.red()); + mp_col[1] = mp_obj_new_int_from_uint(c.green()); + mp_col[2] = mp_obj_new_int_from_uint(c.blue()); + } else { + mp_col[0] = mp_obj_new_float(uint8tColorToDouble(c.red())); + mp_col[1] = mp_obj_new_float(uint8tColorToDouble(c.green())); + mp_col[2] = mp_obj_new_float(uint8tColorToDouble(c.blue())); + } + return mp_obj_new_tuple(3, mp_col); + } + if (n_args == 2) { + mp_raise_TypeError("bgcolor() takes 0, 1 or 3 arguments"); + return mp_const_none; + } + mp_obj_t color; + if (n_args == 1) { + color = args[0]; + } else { + assert(n_args == 3); + color = mp_obj_new_tuple(n_args, args); + } + sTurtle.setColorBg(MicroPython::Color::Parse(color, sTurtle.colorMode())); + sTurtle.drawBg(); + return mp_const_none; +} + mp_obj_t modturtle_colormode(size_t n_args, const mp_obj_t *args) { if(n_args == 0){ return mp_obj_new_int_from_uint(static_cast(sTurtle.colorMode())); diff --git a/python/port/mod/turtle/modturtle.h b/python/port/mod/turtle/modturtle.h index 363a6a47d11..e7a3378e79a 100644 --- a/python/port/mod/turtle/modturtle.h +++ b/python/port/mod/turtle/modturtle.h @@ -26,6 +26,7 @@ mp_obj_t modturtle_isvisible(); mp_obj_t modturtle_write(mp_obj_t s); mp_obj_t modturtle_pencolor(size_t n_args, const mp_obj_t *args); +mp_obj_t modturtle_bgcolor(size_t n_args, const mp_obj_t *args); mp_obj_t modturtle_colormode(size_t n_args, const mp_obj_t *args); mp_obj_t modturtle_showturtle(); diff --git a/python/port/mod/turtle/modturtle_table.c b/python/port/mod/turtle/modturtle_table.c index ccadb1de171..96a9ea2e853 100644 --- a/python/port/mod/turtle/modturtle_table.c +++ b/python/port/mod/turtle/modturtle_table.c @@ -18,6 +18,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(modturtle_pensize_obj, 0, 1, modturtl STATIC MP_DEFINE_CONST_FUN_OBJ_0(modturtle_isdown_obj, modturtle_isdown); STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(modturtle_pencolor_obj, 0, 3, modturtle_pencolor); +STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(modturtle_bgcolor_obj, 0, 3, modturtle_bgcolor); STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(modturtle_colormode_obj, 0, 1, modturtle_colormode); STATIC MP_DEFINE_CONST_FUN_OBJ_0(modturtle_reset_obj, modturtle_reset); @@ -66,6 +67,7 @@ STATIC const mp_rom_map_elem_t modturtle_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_color), (mp_obj_t)&modturtle_pencolor_obj }, { MP_ROM_QSTR(MP_QSTR_pencolor), (mp_obj_t)&modturtle_pencolor_obj }, + { MP_ROM_QSTR(MP_QSTR_bgcolor), (mp_obj_t)&modturtle_bgcolor_obj }, { MP_ROM_QSTR(MP_QSTR_colormode), (mp_obj_t)&modturtle_colormode_obj }, { MP_ROM_QSTR(MP_QSTR_reset), (mp_obj_t)&modturtle_reset_obj }, diff --git a/python/port/mod/turtle/turtle.cpp b/python/port/mod/turtle/turtle.cpp index abba04f4605..1935252888c 100644 --- a/python/port/mod/turtle/turtle.cpp +++ b/python/port/mod/turtle/turtle.cpp @@ -33,6 +33,7 @@ void Turtle::reset() { m_y = 0; m_heading = 0; m_color = k_defaultColor; + m_bgcolor = k_defaultColorBG; m_penDown = true; m_visible = true; m_speed = k_defaultSpeed; @@ -40,6 +41,7 @@ void Turtle::reset() { m_mileage = 0; // Draw the turtle + drawBg(); draw(true); } @@ -202,6 +204,19 @@ bool Turtle::isOutOfBounds() const { return absF(x()) > k_maxPosition || absF(y()) > k_maxPosition; }; +void Turtle::drawBg() { + MicroPython::ExecutionEnvironment::currentExecutionEnvironment()->displaySandbox(); + + KDContext * ctx = KDIonContext::sharedContext(); + + KDRect bg = KDRect( + 0, + 0, + 320, + 229); + ctx->fillRect(bg, m_bgcolor); +} + // Private functions void Turtle::setHeadingPrivate(mp_float_t angle) { @@ -406,4 +421,4 @@ void Turtle::erase() { KDContext * ctx = KDIonContext::sharedContext(); ctx->fillRectWithPixels(iconRect(), m_underneathPixelBuffer, nullptr); m_drawn = false; -} +} \ No newline at end of file diff --git a/python/port/mod/turtle/turtle.h b/python/port/mod/turtle/turtle.h index e6480839607..780972c30d0 100644 --- a/python/port/mod/turtle/turtle.h +++ b/python/port/mod/turtle/turtle.h @@ -30,6 +30,7 @@ class Turtle { m_y(0), m_heading(0), m_color(k_defaultColor), + m_bgcolor(k_defaultColorBG), m_colorMode(MicroPython::Color::Mode::MaxIntensity255), m_penDown(true), m_visible(true), @@ -67,11 +68,18 @@ class Turtle { void setVisible(bool visible); KDColor color() const { return m_color; } + KDColor colorBg() const { return m_bgcolor; } void setColor(KDColor c) { m_color = c; } void setColor(uint8_t r, uint8_t g, uint8_t b) { m_color = KDColor::RGB888(r, g, b); + } + void setColorBg(KDColor c) { + m_bgcolor = c; + } + void setColorBg(uint8_t r, uint8_t g, uint8_t b) { + m_bgcolor = KDColor::RGB888(r, g, b); } MicroPython::Color::Mode colorMode() const {return m_colorMode; } void setColorMode(MicroPython::Color::Mode colorMode){ @@ -88,6 +96,7 @@ class Turtle { * when out of bound, and can prevent text that would have been visible to be * drawn. We use very large bounds to temper these effects. */ bool isOutOfBounds() const; + void drawBg(); private: static constexpr mp_float_t k_headingScale = M_PI / 180; @@ -99,6 +108,7 @@ class Turtle { static constexpr uint8_t k_defaultSpeed = 8; static constexpr uint8_t k_maxSpeed = 10; static constexpr KDColor k_defaultColor = KDColorBlack; + static constexpr KDColor k_defaultColorBG = KDColorYellow; static constexpr uint8_t k_defaultPenSize = 1; static constexpr const KDFont * k_font = KDFont::LargeFont; static constexpr mp_float_t k_maxPosition = KDCOORDINATE_MAX * 0.75f; @@ -152,6 +162,7 @@ class Turtle { mp_float_t m_heading; KDColor m_color; + KDColor m_bgcolor; MicroPython::Color::Mode m_colorMode; bool m_penDown; bool m_visible; From 9967c0f5b94f3772b574a8a7d54eec994b9dd387 Mon Sep 17 00:00:00 2001 From: cartoone Date: Wed, 5 Jun 2024 20:02:58 +0200 Subject: [PATCH 02/14] add bgcolor to toolbox and a minor fix --- apps/code/catalog.de.i18n | 1 + apps/code/catalog.en.i18n | 1 + apps/code/catalog.es.i18n | 1 + apps/code/catalog.fr.i18n | 1 + apps/code/catalog.hu.i18n | 1 + apps/code/catalog.it.i18n | 1 + apps/code/catalog.nl.i18n | 1 + apps/code/catalog.pt.i18n | 1 + apps/code/catalog.universal.i18n | 1 + apps/code/python_toolbox.cpp | 2 ++ python/port/mod/turtle/turtle.h | 2 +- 11 files changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/code/catalog.de.i18n b/apps/code/catalog.de.i18n index b5a22857c9e..1cac8628fdb 100644 --- a/apps/code/catalog.de.i18n +++ b/apps/code/catalog.de.i18n @@ -262,3 +262,4 @@ PythonFileReadable = "Kann Datei gelesen werden?" PythonFileWritable = "Kann Datei geschrieben werden?" PythonImportUtils = "Importieren von ulab.utils" PythonUtilsFunction = "Funktionspräfix des utils-Moduls" +PythonTurtleBgcolor = "Ändern Sie die Hintergrundfarbe" diff --git a/apps/code/catalog.en.i18n b/apps/code/catalog.en.i18n index dd3936409d8..00bc6311e9b 100644 --- a/apps/code/catalog.en.i18n +++ b/apps/code/catalog.en.i18n @@ -262,3 +262,4 @@ PythonFileReadable = "Tells if read can be used on a file" PythonFileWritable = "Tells if write can be used on a file" PythonImportUtils = "Importing ulab.utils" PythonUtilsFunction = "utils module function prefix" +PythonTurtleBgcolor = "Change the background color" diff --git a/apps/code/catalog.es.i18n b/apps/code/catalog.es.i18n index 62d5bf2c991..80145d28bb5 100644 --- a/apps/code/catalog.es.i18n +++ b/apps/code/catalog.es.i18n @@ -262,3 +262,4 @@ PythonFileReadable = "Tells if read can be used on a file" PythonFileWritable = "Tells if write can be used on a file" PythonImportUtils = "Importando ulab.utils" PythonUtilsFunction = "prefijo de función del módulo utils" +PythonTurtleBgcolor = "Cambiar el color de fondo" diff --git a/apps/code/catalog.fr.i18n b/apps/code/catalog.fr.i18n index 3185c5ce5a8..29d2620bd23 100644 --- a/apps/code/catalog.fr.i18n +++ b/apps/code/catalog.fr.i18n @@ -212,6 +212,7 @@ PythonTurtleBackward = "Recule de x pixels" PythonTurtleCircle = "Cercle de rayon r pixels" PythonTurtleColor = "Modifie la couleur du tracé" PythonTurtleColorMode = "Met le mode de couleur à 1.0 ou 255" +PythonTurtleBgcolor = "Modifie la couleur du fond" PythonTurtleForward = "Avance de x pixels" PythonTurtleFunction = "Préfixe fonction du module turtle" PythonTurtleGoto = "Va au point de coordonnées (x,y)" diff --git a/apps/code/catalog.hu.i18n b/apps/code/catalog.hu.i18n index 7dd162659e9..e13a9788601 100644 --- a/apps/code/catalog.hu.i18n +++ b/apps/code/catalog.hu.i18n @@ -262,3 +262,4 @@ PythonKeyAns = "ANS kulcs" PythonKeyExe = "EXE kulcs" PythonImportUtils = "Az ulab.utils importálása" PythonUtilsFunction = "utils modul függvény előtagja" +PythonTurtleBgcolor = "Módosítsa a háttérszínt" diff --git a/apps/code/catalog.it.i18n b/apps/code/catalog.it.i18n index d839de5418a..db2f8bbed09 100644 --- a/apps/code/catalog.it.i18n +++ b/apps/code/catalog.it.i18n @@ -262,3 +262,4 @@ PythonFileReadable = "Dice se si può leggere sul file" PythonFileWritable = "Dice se si può scrivere sul file" PythonImportUtils = "Importazione di ulab.utils" PythonUtilsFunction = "Prefisso funzione del modulo utils" +PythonTurtleBgcolor = "Cambia il colore dello sfondo" diff --git a/apps/code/catalog.nl.i18n b/apps/code/catalog.nl.i18n index 4ba8d9906c5..91fe3b6b39f 100644 --- a/apps/code/catalog.nl.i18n +++ b/apps/code/catalog.nl.i18n @@ -263,3 +263,4 @@ PythonFileReadable = "Tells if read can be used on a file" PythonFileWritable = "Tells if write can be used on a file" PythonImportUtils = "Ulab.utils importeren" PythonUtilsFunction = "utils module functie prefix" +PythonTurtleBgcolor = "Verander de achtergrondkleur" diff --git a/apps/code/catalog.pt.i18n b/apps/code/catalog.pt.i18n index bc740acdf7f..aef378835fe 100644 --- a/apps/code/catalog.pt.i18n +++ b/apps/code/catalog.pt.i18n @@ -262,3 +262,4 @@ PythonFileReadable = "Tells if read can be used on a file" PythonFileWritable = "Tells if write can be used on a file" PythonImportUtils = "Importando ulab.utils" PythonUtilsFunction = "prefixo de função do módulo utils" +PythonTurtleBgcolor = "Alterar a cor de fundo" diff --git a/apps/code/catalog.universal.i18n b/apps/code/catalog.universal.i18n index 09d292f7c25..d1878d9def6 100644 --- a/apps/code/catalog.universal.i18n +++ b/apps/code/catalog.universal.i18n @@ -404,6 +404,7 @@ PythonTurtleCommandBackward = "backward(x)" PythonTurtleCommandCircle = "circle(r)" PythonTurtleCommandColor = "color('c')" PythonTurtleCommandColorMode = "colormode(x)" +PythonTurtleCommandBgcolor = "bgcolor('c')" PythonTurtleCommandForward = "forward(x)" PythonTurtleCommandGoto = "goto(x,y)" PythonTurtleCommandHeading = "heading()" diff --git a/apps/code/python_toolbox.cpp b/apps/code/python_toolbox.cpp index f8a74902223..9affd7a6f62 100644 --- a/apps/code/python_toolbox.cpp +++ b/apps/code/python_toolbox.cpp @@ -338,6 +338,7 @@ const ToolboxMessageTree TurtleModuleChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandHideturtle, I18n::Message::PythonTurtleHideturtle, false), ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandColor, I18n::Message::PythonTurtleColor), ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandColorMode, I18n::Message::PythonTurtleColorMode), + ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandBgcolor, I18n::Message::PythonTurtleBgcolor), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColorBlue, I18n::Message::PythonColorBlue, false), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColorRed, I18n::Message::PythonColorRed, false), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColorGreen, I18n::Message::PythonColorGreen, false), @@ -542,6 +543,7 @@ const ToolboxMessageTree catalogChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCmathFunction, I18n::Message::PythonCmathFunction, false, I18n::Message::PythonCommandCmathFunctionWithoutArg), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandColor, I18n::Message::PythonColor), ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandColorMode, I18n::Message::PythonTurtleColorMode), + ToolboxMessageTree::Leaf(I18n::Message::PythonTurtleCommandBgcolor, I18n::Message::PythonTurtleBgcolor), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandComplex, I18n::Message::PythonComplex), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCopySign, I18n::Message::PythonCopySign), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandCos, I18n::Message::PythonCos), diff --git a/python/port/mod/turtle/turtle.h b/python/port/mod/turtle/turtle.h index 780972c30d0..e1d2cf34eaa 100644 --- a/python/port/mod/turtle/turtle.h +++ b/python/port/mod/turtle/turtle.h @@ -108,7 +108,7 @@ class Turtle { static constexpr uint8_t k_defaultSpeed = 8; static constexpr uint8_t k_maxSpeed = 10; static constexpr KDColor k_defaultColor = KDColorBlack; - static constexpr KDColor k_defaultColorBG = KDColorYellow; + static constexpr KDColor k_defaultColorBG = KDColorWhite; static constexpr uint8_t k_defaultPenSize = 1; static constexpr const KDFont * k_font = KDFont::LargeFont; static constexpr mp_float_t k_maxPosition = KDCOORDINATE_MAX * 0.75f; From 2bf41a2bbe088be31820eb22471e3caa7b9ce840 Mon Sep 17 00:00:00 2001 From: cartoone Date: Thu, 6 Jun 2024 23:19:26 +0200 Subject: [PATCH 03/14] ok is ok now i hope however --- python/port/mod/turtle/turtle.h | 3 ++- themes/themes/git/Omega-Kawaii-Theme | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 160000 themes/themes/git/Omega-Kawaii-Theme diff --git a/python/port/mod/turtle/turtle.h b/python/port/mod/turtle/turtle.h index e1d2cf34eaa..fdac0a5f551 100644 --- a/python/port/mod/turtle/turtle.h +++ b/python/port/mod/turtle/turtle.h @@ -9,6 +9,7 @@ extern "C" { #include #include #include +#include /* We check for keyboard interruptions using micropython_port_vm_hook_loop and * micropython_port_interruptible_msleep, but even if we catch an interruption, @@ -108,7 +109,7 @@ class Turtle { static constexpr uint8_t k_defaultSpeed = 8; static constexpr uint8_t k_maxSpeed = 10; static constexpr KDColor k_defaultColor = KDColorBlack; - static constexpr KDColor k_defaultColorBG = KDColorWhite; + static constexpr KDColor k_defaultColorBG = Palette::CodeBackground; static constexpr uint8_t k_defaultPenSize = 1; static constexpr const KDFont * k_font = KDFont::LargeFont; static constexpr mp_float_t k_maxPosition = KDCOORDINATE_MAX * 0.75f; diff --git a/themes/themes/git/Omega-Kawaii-Theme b/themes/themes/git/Omega-Kawaii-Theme new file mode 160000 index 00000000000..d1a1dc828ce --- /dev/null +++ b/themes/themes/git/Omega-Kawaii-Theme @@ -0,0 +1 @@ +Subproject commit d1a1dc828ce25e4a1d79c93fa555fc168e648115 From 120651111fbe176f4c3b5442d7676d638c1f2428 Mon Sep 17 00:00:00 2001 From: cartoone Date: Fri, 7 Jun 2024 21:28:34 +0200 Subject: [PATCH 04/14] Submodule Omega-Kawaii-Theme remove --- themes/themes/git/Omega-Kawaii-Theme | 1 - 1 file changed, 1 deletion(-) delete mode 160000 themes/themes/git/Omega-Kawaii-Theme diff --git a/themes/themes/git/Omega-Kawaii-Theme b/themes/themes/git/Omega-Kawaii-Theme deleted file mode 160000 index d1a1dc828ce..00000000000 --- a/themes/themes/git/Omega-Kawaii-Theme +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d1a1dc828ce25e4a1d79c93fa555fc168e648115 From 15225a08b6ab8eba99151b5ffd8294416708630c Mon Sep 17 00:00:00 2001 From: cartoone Date: Mon, 10 Jun 2024 14:21:20 +0200 Subject: [PATCH 05/14] this featurs https://github.com/UpsilonNumworks/Upsilon/issues/285 --- apps/global_preferences.h | 4 ++++ apps/settings/base.de.i18n | 1 + apps/settings/base.en.i18n | 1 + apps/settings/base.es.i18n | 1 + apps/settings/base.fr.i18n | 1 + apps/settings/base.hu.i18n | 1 + apps/settings/base.it.i18n | 1 + apps/settings/base.nl.i18n | 1 + apps/settings/base.pt.i18n | 1 + apps/settings/main_controller.cpp | 2 +- apps/settings/main_controller.h | 2 +- apps/settings/sub_menu/code_options_controller.cpp | 14 +++++++++++++- apps/settings/sub_menu/code_options_controller.h | 3 ++- escher/src/text_area.cpp | 13 ++++++++----- 14 files changed, 37 insertions(+), 9 deletions(-) diff --git a/apps/global_preferences.h b/apps/global_preferences.h index 3077b93fee2..dc87d74abbf 100644 --- a/apps/global_preferences.h +++ b/apps/global_preferences.h @@ -36,6 +36,8 @@ class GlobalPreferences { void setAutocomplete(bool autocomple) { m_autoComplete = autocomple; } bool syntaxhighlighting() const { return m_syntaxhighlighting; } void setSyntaxhighlighting(bool syntaxhighlight) { m_syntaxhighlighting = syntaxhighlight; } + bool clearalphalockshift() const { return m_clearalphalockshift; } + void setclearalphalockshift(bool clearalphalockshift) { m_clearalphalockshift = clearalphalockshift; } int brightnessLevel() const { return m_brightnessLevel; } void setBrightnessLevel(int brightnessLevel); const KDFont * font() const { return m_font; } @@ -63,6 +65,7 @@ class GlobalPreferences { m_dfuUnlocked(false), m_autoComplete(true), m_syntaxhighlighting(true), + m_clearalphalockshift(true), m_brightnessLevel(Ion::Backlight::MaxBrightness), m_idleBeforeSuspendSeconds(55), m_idleBeforeDimmingSeconds(45), @@ -80,6 +83,7 @@ class GlobalPreferences { bool m_dfuUnlocked; bool m_autoComplete; bool m_syntaxhighlighting; + bool m_clearalphalockshift; int m_brightnessLevel; int m_idleBeforeSuspendSeconds; int m_idleBeforeDimmingSeconds; diff --git a/apps/settings/base.de.i18n b/apps/settings/base.de.i18n index 8f8cd5898b2..b3e191f5bfa 100644 --- a/apps/settings/base.de.i18n +++ b/apps/settings/base.de.i18n @@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "Standardmäßig externe Anwendungen" ExtAppWriteExplanation2 = "kann nicht in den Speicher schreiben" ExtAppWriteExplanation3 = "Flash (dauerhaft) Ihres Rechners." ExtAppEnabled = "Aufstecken" +Clearshiftlock = "Tastenkombination Umschalt + Löschen" diff --git a/apps/settings/base.en.i18n b/apps/settings/base.en.i18n index 56f15205480..eaa65d61f0a 100644 --- a/apps/settings/base.en.i18n +++ b/apps/settings/base.en.i18n @@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "By default, external applications" ExtAppWriteExplanation2 = "cannot write to memory" ExtAppWriteExplanation3 = "flash (persistent) of your calculator." ExtAppEnabled = "Pin up" +Clearshiftlock = "shortcut shift + clear" diff --git a/apps/settings/base.es.i18n b/apps/settings/base.es.i18n index 42ce777f24e..142c1ea3ca7 100644 --- a/apps/settings/base.es.i18n +++ b/apps/settings/base.es.i18n @@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "Por defecto, las aplicaciones externas" ExtAppWriteExplanation2 = "no se puede escribir en la memoria" ExtAppWriteExplanation3 = "flash (persistente) de su calculadora." ExtAppEnabled = "Fijar" +Clearshiftlock = "atajo mayús + borrar" diff --git a/apps/settings/base.fr.i18n b/apps/settings/base.fr.i18n index 676e64687ca..fef87700fba 100644 --- a/apps/settings/base.fr.i18n +++ b/apps/settings/base.fr.i18n @@ -72,6 +72,7 @@ Time = "Heure" RTCWarning1 = "Activer l'horloge décharge la batterie plus" RTCWarning2 = "vite quand la calculatrice est éteinte." SyntaxHighlighting = "Coloration syntaxique" +Clearshiftlock = "raccourci shift + clear" Normal = "Normale" IdleTimeBeforeDimming = "Assombrir après (s)" IdleTimeBeforeSuspend = "Éteindre après (s)" diff --git a/apps/settings/base.hu.i18n b/apps/settings/base.hu.i18n index a46e8cddaa0..aae6091beb6 100644 --- a/apps/settings/base.hu.i18n +++ b/apps/settings/base.hu.i18n @@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "Alapértelmezés szerint külső alkalmazások" ExtAppWriteExplanation2 = "nem tud a memóriába írni" ExtAppWriteExplanation3 = "villog (tartósan) a számológép." ExtAppEnabled = "Feltűz" +Clearshiftlock = "gyorsbillentyű shift + törlés" diff --git a/apps/settings/base.it.i18n b/apps/settings/base.it.i18n index 76b7090850f..bbb73536202 100644 --- a/apps/settings/base.it.i18n +++ b/apps/settings/base.it.i18n @@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "Per impostazione predefinita, le app esterne" ExtAppWriteExplanation2 = "non possono scrivere in memoria flash" ExtAppWriteExplanation3 = "(persistente) della calcolatrice." ExtAppEnabled = "Affiggere" +Clearshiftlock = "scorciatoia Maiusc + Cancella" diff --git a/apps/settings/base.nl.i18n b/apps/settings/base.nl.i18n index f26e546c402..4dbc86e94a7 100644 --- a/apps/settings/base.nl.i18n +++ b/apps/settings/base.nl.i18n @@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "Standaard zijn externe toepassingen" ExtAppWriteExplanation2 = "kan niet naar het geheugen schrijven" ExtAppWriteExplanation3 = "flash (aanhoudend) van uw rekenmachine." ExtAppEnabled = "Vastpinnen" +Clearshiftlock = "sneltoets shift + wissen" diff --git a/apps/settings/base.pt.i18n b/apps/settings/base.pt.i18n index 950bc992718..0eb29b898bb 100644 --- a/apps/settings/base.pt.i18n +++ b/apps/settings/base.pt.i18n @@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "Por padrão, aplicativos externos" ExtAppWriteExplanation2 = "não pode gravar na memória" ExtAppWriteExplanation3 = "flash (persistente) de sua calculadora." ExtAppEnabled = "Pôster" +Clearshiftlock = "atalho shift + limpar" diff --git a/apps/settings/main_controller.cpp b/apps/settings/main_controller.cpp index 7e71771f93a..36c79d98e5c 100644 --- a/apps/settings/main_controller.cpp +++ b/apps/settings/main_controller.cpp @@ -24,7 +24,7 @@ constexpr SettingsMessageTree s_contributorsChildren[18] = {SettingsMessageTree( // Code Settings #ifdef HAS_CODE -constexpr SettingsMessageTree s_codeChildren[3] = {SettingsMessageTree(I18n::Message::FontSizes, s_modelFontChildren), SettingsMessageTree(I18n::Message::Autocomplete), SettingsMessageTree(I18n::Message::SyntaxHighlighting)}; +constexpr SettingsMessageTree s_codeChildren[4] = {SettingsMessageTree(I18n::Message::FontSizes, s_modelFontChildren), SettingsMessageTree(I18n::Message::Autocomplete), SettingsMessageTree(I18n::Message::SyntaxHighlighting), SettingsMessageTree(I18n::Message::Clearshiftlock)}; #endif constexpr SettingsMessageTree s_modelFontChildren[2] = {SettingsMessageTree(I18n::Message::LargeFont), SettingsMessageTree(I18n::Message::SmallFont)}; diff --git a/apps/settings/main_controller.h b/apps/settings/main_controller.h index e78aff9a243..3e1c5ba82d2 100644 --- a/apps/settings/main_controller.h +++ b/apps/settings/main_controller.h @@ -25,7 +25,7 @@ extern const Shared::SettingsMessageTree s_symbolChildren[4]; extern const Shared::SettingsMessageTree s_symbolFunctionChildren[3]; extern const Shared::SettingsMessageTree s_modelMathOptionsChildren[6]; extern const Shared::SettingsMessageTree s_modelFontChildren[2]; -extern const Shared::SettingsMessageTree s_codeChildren[3]; +extern const Shared::SettingsMessageTree s_codeChildren[4]; extern const Shared::SettingsMessageTree s_modelDateTimeChildren[3]; extern const Shared::SettingsMessageTree s_accessibilityChildren[6]; extern const Shared::SettingsMessageTree s_contributorsChildren[18]; diff --git a/apps/settings/sub_menu/code_options_controller.cpp b/apps/settings/sub_menu/code_options_controller.cpp index ae7d5bbc2a2..4195e9625fb 100644 --- a/apps/settings/sub_menu/code_options_controller.cpp +++ b/apps/settings/sub_menu/code_options_controller.cpp @@ -13,6 +13,7 @@ CodeOptionsController::CodeOptionsController(Responder * parentResponder) : m_chevronCellFontSize.setMessageFont(KDFont::LargeFont); m_switchCellAutoCompletion.setMessageFont(KDFont::LargeFont); m_switchCellSyntaxHighlighting.setMessageFont(KDFont::LargeFont); + m_switchCellClearshiftlock.setMessageFont(KDFont::LargeFont); } bool CodeOptionsController::handleEvent(Ion::Events::Event event) { @@ -26,6 +27,10 @@ bool CodeOptionsController::handleEvent(Ion::Events::Event event) { GlobalPreferences::sharedGlobalPreferences()->setSyntaxhighlighting(!GlobalPreferences::sharedGlobalPreferences()->syntaxhighlighting()); m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow()); break; + case 3: + GlobalPreferences::sharedGlobalPreferences()->setclearalphalockshift(!GlobalPreferences::sharedGlobalPreferences()->clearalphalockshift()); + m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow()); + break; default: GenericSubController * subController = nullptr; subController = &m_preferencesController; @@ -48,8 +53,10 @@ HighlightCell * CodeOptionsController::reusableCell(int index, int type) { } else if (index == 1) { return &m_switchCellAutoCompletion; + }else if (index == 2){ + return &m_switchCellSyntaxHighlighting; } - return &m_switchCellSyntaxHighlighting; + return &m_switchCellClearshiftlock; } int CodeOptionsController::reusableCellCount(int type) { @@ -79,6 +86,11 @@ void CodeOptionsController::willDisplayCellForIndex(HighlightCell * cell, int in SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView(); mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->syntaxhighlighting()); } + else if (thisLabel == I18n::Message::Clearshiftlock) { + MessageTableCellWithSwitch * mySwitchCell = (MessageTableCellWithSwitch *)cell; + SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView(); + mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->clearalphalockshift()); + } #endif } diff --git a/apps/settings/sub_menu/code_options_controller.h b/apps/settings/sub_menu/code_options_controller.h index 5f9b6acea22..32c5adc0ad5 100644 --- a/apps/settings/sub_menu/code_options_controller.h +++ b/apps/settings/sub_menu/code_options_controller.h @@ -14,11 +14,12 @@ class CodeOptionsController : public GenericSubController { int reusableCellCount(int type) override; void willDisplayCellForIndex(HighlightCell * cell, int index) override; private: - constexpr static int k_totalNumberOfCell = 4; + constexpr static int k_totalNumberOfCell = 5; PreferencesController m_preferencesController; MessageTableCellWithChevronAndMessage m_chevronCellFontSize; MessageTableCellWithSwitch m_switchCellAutoCompletion; MessageTableCellWithSwitch m_switchCellSyntaxHighlighting; + MessageTableCellWithSwitch m_switchCellClearshiftlock; }; } diff --git a/escher/src/text_area.cpp b/escher/src/text_area.cpp index 5427ed5b652..68805ab0352 100644 --- a/escher/src/text_area.cpp +++ b/escher/src/text_area.cpp @@ -4,6 +4,7 @@ #include #include #include +#include <../../apps/global_preferences.h> #include #include @@ -249,11 +250,13 @@ bool TextArea::handleEvent(Ion::Events::Event event) { contentView()->resetSelection(); contentView()->moveCursorGeo(0, event == Ion::Events::Up ? -step : step); } else if (event == Ion::Events::Clear) { - if (!contentView()->selectionIsEmpty()) { - deleteSelection(); - return true; - } else if (!contentView()->removeEndOfLine()) { - contentView()->removeStartOfLine(); + if (GlobalPreferences::sharedGlobalPreferences()->clearalphalockshift()){ + if (!contentView()->selectionIsEmpty()) { + deleteSelection(); + return true; + } else if (!contentView()->removeEndOfLine()) { + contentView()->removeStartOfLine(); + } } } else if (event == Ion::Events::Paste) { return handleEventWithText(Clipboard::sharedClipboard()->storedText()); From 40808245eb78b0c6c77ef6c56b22834b81ef8603 Mon Sep 17 00:00:00 2001 From: cartoone222 <69402484+cartoone222@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:29:48 +0200 Subject: [PATCH 06/14] Update escher/src/text_area.cpp casse coresction Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> --- escher/src/text_area.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escher/src/text_area.cpp b/escher/src/text_area.cpp index 68805ab0352..00aa549bc6b 100644 --- a/escher/src/text_area.cpp +++ b/escher/src/text_area.cpp @@ -250,7 +250,7 @@ bool TextArea::handleEvent(Ion::Events::Event event) { contentView()->resetSelection(); contentView()->moveCursorGeo(0, event == Ion::Events::Up ? -step : step); } else if (event == Ion::Events::Clear) { - if (GlobalPreferences::sharedGlobalPreferences()->clearalphalockshift()){ + if (GlobalPreferences::sharedGlobalPreferences()->clearalphalockshift()) { if (!contentView()->selectionIsEmpty()) { deleteSelection(); return true; From 10be4b1132439738ed0ea54a91e082feb8ced32a Mon Sep 17 00:00:00 2001 From: cartoone Date: Tue, 18 Jun 2024 15:45:09 +0200 Subject: [PATCH 07/14] change name of function beacause code to late in night is bad idee --- apps/global_preferences.h | 4 ++-- apps/settings/sub_menu/code_options_controller.cpp | 4 ++-- escher/src/text_area.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/global_preferences.h b/apps/global_preferences.h index dc87d74abbf..d7ec32cd748 100644 --- a/apps/global_preferences.h +++ b/apps/global_preferences.h @@ -36,8 +36,8 @@ class GlobalPreferences { void setAutocomplete(bool autocomple) { m_autoComplete = autocomple; } bool syntaxhighlighting() const { return m_syntaxhighlighting; } void setSyntaxhighlighting(bool syntaxhighlight) { m_syntaxhighlighting = syntaxhighlight; } - bool clearalphalockshift() const { return m_clearalphalockshift; } - void setclearalphalockshift(bool clearalphalockshift) { m_clearalphalockshift = clearalphalockshift; } + bool clearshift() const { return m_clearalphalockshift; } + void setclearshift(bool clearalphalockshift) { m_clearalphalockshift = clearalphalockshift; } int brightnessLevel() const { return m_brightnessLevel; } void setBrightnessLevel(int brightnessLevel); const KDFont * font() const { return m_font; } diff --git a/apps/settings/sub_menu/code_options_controller.cpp b/apps/settings/sub_menu/code_options_controller.cpp index 4195e9625fb..db595213a6d 100644 --- a/apps/settings/sub_menu/code_options_controller.cpp +++ b/apps/settings/sub_menu/code_options_controller.cpp @@ -28,7 +28,7 @@ bool CodeOptionsController::handleEvent(Ion::Events::Event event) { m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow()); break; case 3: - GlobalPreferences::sharedGlobalPreferences()->setclearalphalockshift(!GlobalPreferences::sharedGlobalPreferences()->clearalphalockshift()); + GlobalPreferences::sharedGlobalPreferences()->setclearshift(!GlobalPreferences::sharedGlobalPreferences()->clearshift()); m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow()); break; default: @@ -89,7 +89,7 @@ void CodeOptionsController::willDisplayCellForIndex(HighlightCell * cell, int in else if (thisLabel == I18n::Message::Clearshiftlock) { MessageTableCellWithSwitch * mySwitchCell = (MessageTableCellWithSwitch *)cell; SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView(); - mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->clearalphalockshift()); + mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->clearshift()); } #endif } diff --git a/escher/src/text_area.cpp b/escher/src/text_area.cpp index 00aa549bc6b..1223b4ce95f 100644 --- a/escher/src/text_area.cpp +++ b/escher/src/text_area.cpp @@ -250,7 +250,7 @@ bool TextArea::handleEvent(Ion::Events::Event event) { contentView()->resetSelection(); contentView()->moveCursorGeo(0, event == Ion::Events::Up ? -step : step); } else if (event == Ion::Events::Clear) { - if (GlobalPreferences::sharedGlobalPreferences()->clearalphalockshift()) { + if (GlobalPreferences::sharedGlobalPreferences()->clearshift()){ if (!contentView()->selectionIsEmpty()) { deleteSelection(); return true; From 7604142bc763fef19bc4508e01aa7f7a951d1109 Mon Sep 17 00:00:00 2001 From: cartoone Date: Tue, 18 Jun 2024 16:19:51 +0200 Subject: [PATCH 08/14] invation of capital letter --- apps/settings/base.en.i18n | 2 +- apps/settings/base.es.i18n | 2 +- apps/settings/base.fr.i18n | 2 +- apps/settings/base.hu.i18n | 2 +- apps/settings/base.it.i18n | 2 +- apps/settings/base.nl.i18n | 2 +- apps/settings/base.pt.i18n | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/settings/base.en.i18n b/apps/settings/base.en.i18n index eaa65d61f0a..4b4527141bc 100644 --- a/apps/settings/base.en.i18n +++ b/apps/settings/base.en.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "By default, external applications" ExtAppWriteExplanation2 = "cannot write to memory" ExtAppWriteExplanation3 = "flash (persistent) of your calculator." ExtAppEnabled = "Pin up" -Clearshiftlock = "shortcut shift + clear" +Clearshiftlock = "Shortcut shift + clear" diff --git a/apps/settings/base.es.i18n b/apps/settings/base.es.i18n index 142c1ea3ca7..6e9a1be8c14 100644 --- a/apps/settings/base.es.i18n +++ b/apps/settings/base.es.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "Por defecto, las aplicaciones externas" ExtAppWriteExplanation2 = "no se puede escribir en la memoria" ExtAppWriteExplanation3 = "flash (persistente) de su calculadora." ExtAppEnabled = "Fijar" -Clearshiftlock = "atajo mayús + borrar" +Clearshiftlock = "Atajo de cambio + borrar" diff --git a/apps/settings/base.fr.i18n b/apps/settings/base.fr.i18n index fef87700fba..e73292464c7 100644 --- a/apps/settings/base.fr.i18n +++ b/apps/settings/base.fr.i18n @@ -72,7 +72,7 @@ Time = "Heure" RTCWarning1 = "Activer l'horloge décharge la batterie plus" RTCWarning2 = "vite quand la calculatrice est éteinte." SyntaxHighlighting = "Coloration syntaxique" -Clearshiftlock = "raccourci shift + clear" +Clearshiftlock = "Raccourci shift + clear" Normal = "Normale" IdleTimeBeforeDimming = "Assombrir après (s)" IdleTimeBeforeSuspend = "Éteindre après (s)" diff --git a/apps/settings/base.hu.i18n b/apps/settings/base.hu.i18n index aae6091beb6..5764ed65e49 100644 --- a/apps/settings/base.hu.i18n +++ b/apps/settings/base.hu.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "Alapértelmezés szerint külső alkalmazások" ExtAppWriteExplanation2 = "nem tud a memóriába írni" ExtAppWriteExplanation3 = "villog (tartósan) a számológép." ExtAppEnabled = "Feltűz" -Clearshiftlock = "gyorsbillentyű shift + törlés" +Clearshiftlock = "Gyorsbillentyű eltolás + törlés" diff --git a/apps/settings/base.it.i18n b/apps/settings/base.it.i18n index bbb73536202..49fe44d0b59 100644 --- a/apps/settings/base.it.i18n +++ b/apps/settings/base.it.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "Per impostazione predefinita, le app esterne" ExtAppWriteExplanation2 = "non possono scrivere in memoria flash" ExtAppWriteExplanation3 = "(persistente) della calcolatrice." ExtAppEnabled = "Affiggere" -Clearshiftlock = "scorciatoia Maiusc + Cancella" +Clearshiftlock = "Scorciatoia Maiusc + Cancella" diff --git a/apps/settings/base.nl.i18n b/apps/settings/base.nl.i18n index 4dbc86e94a7..959b32831a8 100644 --- a/apps/settings/base.nl.i18n +++ b/apps/settings/base.nl.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "Standaard zijn externe toepassingen" ExtAppWriteExplanation2 = "kan niet naar het geheugen schrijven" ExtAppWriteExplanation3 = "flash (aanhoudend) van uw rekenmachine." ExtAppEnabled = "Vastpinnen" -Clearshiftlock = "sneltoets shift + wissen" +Clearshiftlock = "Sneltoets shift + wissen" diff --git a/apps/settings/base.pt.i18n b/apps/settings/base.pt.i18n index 0eb29b898bb..368e395abd0 100644 --- a/apps/settings/base.pt.i18n +++ b/apps/settings/base.pt.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "Por padrão, aplicativos externos" ExtAppWriteExplanation2 = "não pode gravar na memória" ExtAppWriteExplanation3 = "flash (persistente) de sua calculadora." ExtAppEnabled = "Pôster" -Clearshiftlock = "atalho shift + limpar" +Clearshiftlock = "Shift de atalho + limpar" From c95c3e2ad921182143a6bc1e3fe64d74c0d4541d Mon Sep 17 00:00:00 2001 From: cartoone222 <69402484+cartoone222@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:52:43 +0200 Subject: [PATCH 09/14] Update apps/settings/sub_menu/code_options_controller.cpp Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> --- apps/settings/sub_menu/code_options_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/settings/sub_menu/code_options_controller.cpp b/apps/settings/sub_menu/code_options_controller.cpp index db595213a6d..654ff103b6f 100644 --- a/apps/settings/sub_menu/code_options_controller.cpp +++ b/apps/settings/sub_menu/code_options_controller.cpp @@ -53,7 +53,7 @@ HighlightCell * CodeOptionsController::reusableCell(int index, int type) { } else if (index == 1) { return &m_switchCellAutoCompletion; - }else if (index == 2){ + }else if (index == 2) { return &m_switchCellSyntaxHighlighting; } return &m_switchCellClearshiftlock; From cb347d75b3c69b8a365f75565db5e27818900b1b Mon Sep 17 00:00:00 2001 From: cartoone222 <69402484+cartoone222@users.noreply.github.com> Date: Tue, 18 Jun 2024 18:52:53 +0200 Subject: [PATCH 10/14] Update escher/src/text_area.cpp Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> --- escher/src/text_area.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escher/src/text_area.cpp b/escher/src/text_area.cpp index 1223b4ce95f..143ce26784f 100644 --- a/escher/src/text_area.cpp +++ b/escher/src/text_area.cpp @@ -250,7 +250,7 @@ bool TextArea::handleEvent(Ion::Events::Event event) { contentView()->resetSelection(); contentView()->moveCursorGeo(0, event == Ion::Events::Up ? -step : step); } else if (event == Ion::Events::Clear) { - if (GlobalPreferences::sharedGlobalPreferences()->clearshift()){ + if (GlobalPreferences::sharedGlobalPreferences()->clearshift()) { if (!contentView()->selectionIsEmpty()) { deleteSelection(); return true; From 1f14054fb8bc3322c2b5001f68794c9dd164bcdc Mon Sep 17 00:00:00 2001 From: cartoone Date: Tue, 18 Jun 2024 19:00:10 +0200 Subject: [PATCH 11/14] im not shure all is done --- apps/global_preferences.h | 8 ++++---- apps/settings/base.de.i18n | 2 +- apps/settings/base.en.i18n | 2 +- apps/settings/base.es.i18n | 2 +- apps/settings/base.fr.i18n | 2 +- apps/settings/base.hu.i18n | 2 +- apps/settings/base.it.i18n | 2 +- apps/settings/base.nl.i18n | 2 +- apps/settings/base.pt.i18n | 2 +- apps/settings/main_controller.cpp | 2 +- apps/settings/sub_menu/code_options_controller.cpp | 6 +++--- apps/settings/sub_menu/code_options_controller.h | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apps/global_preferences.h b/apps/global_preferences.h index d7ec32cd748..855c37f724c 100644 --- a/apps/global_preferences.h +++ b/apps/global_preferences.h @@ -36,8 +36,8 @@ class GlobalPreferences { void setAutocomplete(bool autocomple) { m_autoComplete = autocomple; } bool syntaxhighlighting() const { return m_syntaxhighlighting; } void setSyntaxhighlighting(bool syntaxhighlight) { m_syntaxhighlighting = syntaxhighlight; } - bool clearshift() const { return m_clearalphalockshift; } - void setclearshift(bool clearalphalockshift) { m_clearalphalockshift = clearalphalockshift; } + bool clearshift() const { return m_clearkshift; } + void setclearshift(bool clearalphalockshift) { m_clearkshift = clearalphalockshift; } int brightnessLevel() const { return m_brightnessLevel; } void setBrightnessLevel(int brightnessLevel); const KDFont * font() const { return m_font; } @@ -65,7 +65,7 @@ class GlobalPreferences { m_dfuUnlocked(false), m_autoComplete(true), m_syntaxhighlighting(true), - m_clearalphalockshift(true), + m_clearkshift(true), m_brightnessLevel(Ion::Backlight::MaxBrightness), m_idleBeforeSuspendSeconds(55), m_idleBeforeDimmingSeconds(45), @@ -83,7 +83,7 @@ class GlobalPreferences { bool m_dfuUnlocked; bool m_autoComplete; bool m_syntaxhighlighting; - bool m_clearalphalockshift; + bool m_clearkshift; int m_brightnessLevel; int m_idleBeforeSuspendSeconds; int m_idleBeforeDimmingSeconds; diff --git a/apps/settings/base.de.i18n b/apps/settings/base.de.i18n index b3e191f5bfa..b8f9e3f37f1 100644 --- a/apps/settings/base.de.i18n +++ b/apps/settings/base.de.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "Standardmäßig externe Anwendungen" ExtAppWriteExplanation2 = "kann nicht in den Speicher schreiben" ExtAppWriteExplanation3 = "Flash (dauerhaft) Ihres Rechners." ExtAppEnabled = "Aufstecken" -Clearshiftlock = "Tastenkombination Umschalt + Löschen" +Clearshift = "Tastenkombination Umschalt + Löschen" diff --git a/apps/settings/base.en.i18n b/apps/settings/base.en.i18n index 4b4527141bc..70864bbfff5 100644 --- a/apps/settings/base.en.i18n +++ b/apps/settings/base.en.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "By default, external applications" ExtAppWriteExplanation2 = "cannot write to memory" ExtAppWriteExplanation3 = "flash (persistent) of your calculator." ExtAppEnabled = "Pin up" -Clearshiftlock = "Shortcut shift + clear" +Clearshift = "Shortcut shift + clear" diff --git a/apps/settings/base.es.i18n b/apps/settings/base.es.i18n index 6e9a1be8c14..2c69189d920 100644 --- a/apps/settings/base.es.i18n +++ b/apps/settings/base.es.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "Por defecto, las aplicaciones externas" ExtAppWriteExplanation2 = "no se puede escribir en la memoria" ExtAppWriteExplanation3 = "flash (persistente) de su calculadora." ExtAppEnabled = "Fijar" -Clearshiftlock = "Atajo de cambio + borrar" +Clearshift = "Atajo de cambio + borrar" diff --git a/apps/settings/base.fr.i18n b/apps/settings/base.fr.i18n index e73292464c7..67c8f6cce36 100644 --- a/apps/settings/base.fr.i18n +++ b/apps/settings/base.fr.i18n @@ -72,7 +72,7 @@ Time = "Heure" RTCWarning1 = "Activer l'horloge décharge la batterie plus" RTCWarning2 = "vite quand la calculatrice est éteinte." SyntaxHighlighting = "Coloration syntaxique" -Clearshiftlock = "Raccourci shift + clear" +Clearshift = "Raccourci shift + clear" Normal = "Normale" IdleTimeBeforeDimming = "Assombrir après (s)" IdleTimeBeforeSuspend = "Éteindre après (s)" diff --git a/apps/settings/base.hu.i18n b/apps/settings/base.hu.i18n index 5764ed65e49..26d314cc97f 100644 --- a/apps/settings/base.hu.i18n +++ b/apps/settings/base.hu.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "Alapértelmezés szerint külső alkalmazások" ExtAppWriteExplanation2 = "nem tud a memóriába írni" ExtAppWriteExplanation3 = "villog (tartósan) a számológép." ExtAppEnabled = "Feltűz" -Clearshiftlock = "Gyorsbillentyű eltolás + törlés" +Clearshift = "Gyorsbillentyű eltolás + törlés" diff --git a/apps/settings/base.it.i18n b/apps/settings/base.it.i18n index 49fe44d0b59..59d4c98dc86 100644 --- a/apps/settings/base.it.i18n +++ b/apps/settings/base.it.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "Per impostazione predefinita, le app esterne" ExtAppWriteExplanation2 = "non possono scrivere in memoria flash" ExtAppWriteExplanation3 = "(persistente) della calcolatrice." ExtAppEnabled = "Affiggere" -Clearshiftlock = "Scorciatoia Maiusc + Cancella" +Clearshift = "Scorciatoia Maiusc + Cancella" diff --git a/apps/settings/base.nl.i18n b/apps/settings/base.nl.i18n index 959b32831a8..66842924b6a 100644 --- a/apps/settings/base.nl.i18n +++ b/apps/settings/base.nl.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "Standaard zijn externe toepassingen" ExtAppWriteExplanation2 = "kan niet naar het geheugen schrijven" ExtAppWriteExplanation3 = "flash (aanhoudend) van uw rekenmachine." ExtAppEnabled = "Vastpinnen" -Clearshiftlock = "Sneltoets shift + wissen" +Clearshift = "Sneltoets shift + wissen" diff --git a/apps/settings/base.pt.i18n b/apps/settings/base.pt.i18n index 368e395abd0..d79d837e776 100644 --- a/apps/settings/base.pt.i18n +++ b/apps/settings/base.pt.i18n @@ -81,4 +81,4 @@ ExtAppWriteExplanation1 = "Por padrão, aplicativos externos" ExtAppWriteExplanation2 = "não pode gravar na memória" ExtAppWriteExplanation3 = "flash (persistente) de sua calculadora." ExtAppEnabled = "Pôster" -Clearshiftlock = "Shift de atalho + limpar" +Clearshift = "Shift de atalho + limpar" diff --git a/apps/settings/main_controller.cpp b/apps/settings/main_controller.cpp index 36c79d98e5c..347ead0d59e 100644 --- a/apps/settings/main_controller.cpp +++ b/apps/settings/main_controller.cpp @@ -24,7 +24,7 @@ constexpr SettingsMessageTree s_contributorsChildren[18] = {SettingsMessageTree( // Code Settings #ifdef HAS_CODE -constexpr SettingsMessageTree s_codeChildren[4] = {SettingsMessageTree(I18n::Message::FontSizes, s_modelFontChildren), SettingsMessageTree(I18n::Message::Autocomplete), SettingsMessageTree(I18n::Message::SyntaxHighlighting), SettingsMessageTree(I18n::Message::Clearshiftlock)}; +constexpr SettingsMessageTree s_codeChildren[4] = {SettingsMessageTree(I18n::Message::FontSizes, s_modelFontChildren), SettingsMessageTree(I18n::Message::Autocomplete), SettingsMessageTree(I18n::Message::SyntaxHighlighting), SettingsMessageTree(I18n::Message::Clearshift)}; #endif constexpr SettingsMessageTree s_modelFontChildren[2] = {SettingsMessageTree(I18n::Message::LargeFont), SettingsMessageTree(I18n::Message::SmallFont)}; diff --git a/apps/settings/sub_menu/code_options_controller.cpp b/apps/settings/sub_menu/code_options_controller.cpp index 654ff103b6f..55f86fbcc3a 100644 --- a/apps/settings/sub_menu/code_options_controller.cpp +++ b/apps/settings/sub_menu/code_options_controller.cpp @@ -13,7 +13,7 @@ CodeOptionsController::CodeOptionsController(Responder * parentResponder) : m_chevronCellFontSize.setMessageFont(KDFont::LargeFont); m_switchCellAutoCompletion.setMessageFont(KDFont::LargeFont); m_switchCellSyntaxHighlighting.setMessageFont(KDFont::LargeFont); - m_switchCellClearshiftlock.setMessageFont(KDFont::LargeFont); + m_switchCellClearshift.setMessageFont(KDFont::LargeFont); } bool CodeOptionsController::handleEvent(Ion::Events::Event event) { @@ -56,7 +56,7 @@ HighlightCell * CodeOptionsController::reusableCell(int index, int type) { }else if (index == 2) { return &m_switchCellSyntaxHighlighting; } - return &m_switchCellClearshiftlock; + return &m_switchCellClearshift; } int CodeOptionsController::reusableCellCount(int type) { @@ -86,7 +86,7 @@ void CodeOptionsController::willDisplayCellForIndex(HighlightCell * cell, int in SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView(); mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->syntaxhighlighting()); } - else if (thisLabel == I18n::Message::Clearshiftlock) { + else if (thisLabel == I18n::Message::Clearshift) { MessageTableCellWithSwitch * mySwitchCell = (MessageTableCellWithSwitch *)cell; SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView(); mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->clearshift()); diff --git a/apps/settings/sub_menu/code_options_controller.h b/apps/settings/sub_menu/code_options_controller.h index 32c5adc0ad5..e8d1f0149e8 100644 --- a/apps/settings/sub_menu/code_options_controller.h +++ b/apps/settings/sub_menu/code_options_controller.h @@ -19,7 +19,7 @@ class CodeOptionsController : public GenericSubController { MessageTableCellWithChevronAndMessage m_chevronCellFontSize; MessageTableCellWithSwitch m_switchCellAutoCompletion; MessageTableCellWithSwitch m_switchCellSyntaxHighlighting; - MessageTableCellWithSwitch m_switchCellClearshiftlock; + MessageTableCellWithSwitch m_switchCellClearshift; }; } From 4300c42e99f60a30655393a82e1cbaaa25145261 Mon Sep 17 00:00:00 2001 From: cartoone Date: Tue, 18 Jun 2024 19:03:34 +0200 Subject: [PATCH 12/14] the last hiden locke --- apps/global_preferences.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/global_preferences.h b/apps/global_preferences.h index 855c37f724c..8fa942c098d 100644 --- a/apps/global_preferences.h +++ b/apps/global_preferences.h @@ -37,7 +37,7 @@ class GlobalPreferences { bool syntaxhighlighting() const { return m_syntaxhighlighting; } void setSyntaxhighlighting(bool syntaxhighlight) { m_syntaxhighlighting = syntaxhighlight; } bool clearshift() const { return m_clearkshift; } - void setclearshift(bool clearalphalockshift) { m_clearkshift = clearalphalockshift; } + void setclearshift(bool clearalphashift) { m_clearkshift = clearalphashift; } int brightnessLevel() const { return m_brightnessLevel; } void setBrightnessLevel(int brightnessLevel); const KDFont * font() const { return m_font; } From ff4a80104939b64a2a3047f91a4db1bad17cced1 Mon Sep 17 00:00:00 2001 From: cartoone Date: Sat, 21 Sep 2024 21:57:59 +0200 Subject: [PATCH 13/14] fix https://github.com/UpsilonNumworks/Upsilon/issues/271 --- python/port/mod/os/modos.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/port/mod/os/modos.cpp b/python/port/mod/os/modos.cpp index a8333006d33..a2c7a861532 100644 --- a/python/port/mod/os/modos.cpp +++ b/python/port/mod/os/modos.cpp @@ -18,11 +18,14 @@ extern "C" { #error This file expects EPSILON_VERSION to be defined #endif +#ifndef UPSILON_VERSION +#error This file expects UPSILON_VERSION to be defined +#endif STATIC const MP_DEFINE_STR_OBJ(modos_uname_info_sysname_obj, "NumWorks"); STATIC const MP_DEFINE_STR_OBJ(modos_uname_info_nodename_obj, ""); -STATIC const MP_DEFINE_STR_OBJ(modos_uname_info_release_obj, "O" MP_STRINGIFY(OMEGA_VERSION) "E-" MP_STRINGIFY(EPSILON_VERSION)); +STATIC const MP_DEFINE_STR_OBJ(modos_uname_info_release_obj, "O" MP_STRINGIFY(OMEGA_VERSION) "E-" MP_STRINGIFY(EPSILON_VERSION) "U-" MP_STRINGIFY(UPSILON_VERSION)); STATIC const MP_DEFINE_STR_OBJ(modos_uname_info_version_obj, MICROPY_VERSION_STRING); #if defined(DEVICE_N0110) From 1cd61ee15a5cd06c2fce840a1226b777f4618eeb Mon Sep 17 00:00:00 2001 From: cartoone222 <69402484+cartoone222@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:44:46 +0200 Subject: [PATCH 14/14] Update apps/global_preferences.h Co-authored-by: Quentin --- apps/global_preferences.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/global_preferences.h b/apps/global_preferences.h index 8fa942c098d..124476430e4 100644 --- a/apps/global_preferences.h +++ b/apps/global_preferences.h @@ -65,7 +65,7 @@ class GlobalPreferences { m_dfuUnlocked(false), m_autoComplete(true), m_syntaxhighlighting(true), - m_clearkshift(true), + m_clearkshift(true), m_brightnessLevel(Ion::Backlight::MaxBrightness), m_idleBeforeSuspendSeconds(55), m_idleBeforeDimmingSeconds(45),