mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
Add an option to disable shift + clear (#368)
* add bgcolor to turtul module * add bgcolor to toolbox and a minor fix * ok is ok now i hope however * Submodule Omega-Kawaii-Theme remove * this featurs https://github.com/UpsilonNumworks/Upsilon/issues/285 * Update escher/src/text_area.cpp casse coresction Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * change name of function beacause code to late in night is bad idee * invation of capital letter * Update apps/settings/sub_menu/code_options_controller.cpp Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update escher/src/text_area.cpp Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * im not shure all is done * the last hiden locke * fix https://github.com/UpsilonNumworks/Upsilon/issues/271 * Update apps/global_preferences.h Co-authored-by: Quentin <github@arra.red> * Update apps/settings/sub_menu/code_options_controller.cpp Co-authored-by: Quentin <git@quentinguidee.dev> * Update apps/global_preferences.h Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update apps/global_preferences.h Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * reformatting the code to meet the expected quality * Update apps/settings/base.pt.i18n Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update apps/settings/base.de.i18n Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update apps/settings/base.es.i18n Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update apps/settings/base.hu.i18n Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update apps/settings/base.it.i18n Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * Update apps/settings/base.nl.i18n Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> * fix nameing * Update apps/settings/base.en.i18n --------- Co-authored-by: Yaya-Cout <67095734+Yaya-Cout@users.noreply.github.com> Co-authored-by: Quentin <github@arra.red> Co-authored-by: Quentin <git@quentinguidee.dev>
This commit is contained in:
@@ -36,6 +36,8 @@ public:
|
|||||||
void setAutocomplete(bool autocomple) { m_autoComplete = autocomple; }
|
void setAutocomplete(bool autocomple) { m_autoComplete = autocomple; }
|
||||||
bool syntaxhighlighting() const { return m_syntaxhighlighting; }
|
bool syntaxhighlighting() const { return m_syntaxhighlighting; }
|
||||||
void setSyntaxhighlighting(bool syntaxhighlight) { m_syntaxhighlighting = syntaxhighlight; }
|
void setSyntaxhighlighting(bool syntaxhighlight) { m_syntaxhighlighting = syntaxhighlight; }
|
||||||
|
bool clearShift() const { return m_clearshift; }
|
||||||
|
void setClearShift(bool clearalphashift) { m_clearshift = clearalphashift; }
|
||||||
int brightnessLevel() const { return m_brightnessLevel; }
|
int brightnessLevel() const { return m_brightnessLevel; }
|
||||||
void setBrightnessLevel(int brightnessLevel);
|
void setBrightnessLevel(int brightnessLevel);
|
||||||
const KDFont * font() const { return m_font; }
|
const KDFont * font() const { return m_font; }
|
||||||
@@ -63,6 +65,7 @@ private:
|
|||||||
m_dfuUnlocked(false),
|
m_dfuUnlocked(false),
|
||||||
m_autoComplete(true),
|
m_autoComplete(true),
|
||||||
m_syntaxhighlighting(true),
|
m_syntaxhighlighting(true),
|
||||||
|
m_clearshift(true),
|
||||||
m_brightnessLevel(Ion::Backlight::MaxBrightness),
|
m_brightnessLevel(Ion::Backlight::MaxBrightness),
|
||||||
m_idleBeforeSuspendSeconds(55),
|
m_idleBeforeSuspendSeconds(55),
|
||||||
m_idleBeforeDimmingSeconds(45),
|
m_idleBeforeDimmingSeconds(45),
|
||||||
@@ -80,6 +83,7 @@ private:
|
|||||||
bool m_dfuUnlocked;
|
bool m_dfuUnlocked;
|
||||||
bool m_autoComplete;
|
bool m_autoComplete;
|
||||||
bool m_syntaxhighlighting;
|
bool m_syntaxhighlighting;
|
||||||
|
bool m_clearshift;
|
||||||
int m_brightnessLevel;
|
int m_brightnessLevel;
|
||||||
int m_idleBeforeSuspendSeconds;
|
int m_idleBeforeSuspendSeconds;
|
||||||
int m_idleBeforeDimmingSeconds;
|
int m_idleBeforeDimmingSeconds;
|
||||||
|
|||||||
@@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "Standardmäßig externe Anwendungen"
|
|||||||
ExtAppWriteExplanation2 = "kann nicht in den Speicher schreiben"
|
ExtAppWriteExplanation2 = "kann nicht in den Speicher schreiben"
|
||||||
ExtAppWriteExplanation3 = "Flash (dauerhaft) Ihres Rechners."
|
ExtAppWriteExplanation3 = "Flash (dauerhaft) Ihres Rechners."
|
||||||
ExtAppEnabled = "Aufstecken"
|
ExtAppEnabled = "Aufstecken"
|
||||||
|
ClearShift = "Tastenkombination shift + clear"
|
||||||
|
|||||||
@@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "By default, external applications"
|
|||||||
ExtAppWriteExplanation2 = "cannot write to memory"
|
ExtAppWriteExplanation2 = "cannot write to memory"
|
||||||
ExtAppWriteExplanation3 = "flash (persistent) of your calculator."
|
ExtAppWriteExplanation3 = "flash (persistent) of your calculator."
|
||||||
ExtAppEnabled = "Pin up"
|
ExtAppEnabled = "Pin up"
|
||||||
|
ClearShift = "Shift + clear shortcut"
|
||||||
|
|||||||
@@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "Por defecto, las aplicaciones externas"
|
|||||||
ExtAppWriteExplanation2 = "no se puede escribir en la memoria"
|
ExtAppWriteExplanation2 = "no se puede escribir en la memoria"
|
||||||
ExtAppWriteExplanation3 = "flash (persistente) de su calculadora."
|
ExtAppWriteExplanation3 = "flash (persistente) de su calculadora."
|
||||||
ExtAppEnabled = "Fijar"
|
ExtAppEnabled = "Fijar"
|
||||||
|
ClearShift = "Atajo de shift + clear"
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ Time = "Heure"
|
|||||||
RTCWarning1 = "Activer l'horloge décharge la batterie plus"
|
RTCWarning1 = "Activer l'horloge décharge la batterie plus"
|
||||||
RTCWarning2 = "vite quand la calculatrice est éteinte."
|
RTCWarning2 = "vite quand la calculatrice est éteinte."
|
||||||
SyntaxHighlighting = "Coloration syntaxique"
|
SyntaxHighlighting = "Coloration syntaxique"
|
||||||
|
ClearShift = "Raccourci shift + clear"
|
||||||
Normal = "Normale"
|
Normal = "Normale"
|
||||||
IdleTimeBeforeDimming = "Assombrir après (s)"
|
IdleTimeBeforeDimming = "Assombrir après (s)"
|
||||||
IdleTimeBeforeSuspend = "Éteindre après (s)"
|
IdleTimeBeforeSuspend = "Éteindre après (s)"
|
||||||
|
|||||||
@@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "Alapértelmezés szerint külső alkalmazások"
|
|||||||
ExtAppWriteExplanation2 = "nem tud a memóriába írni"
|
ExtAppWriteExplanation2 = "nem tud a memóriába írni"
|
||||||
ExtAppWriteExplanation3 = "villog (tartósan) a számológép."
|
ExtAppWriteExplanation3 = "villog (tartósan) a számológép."
|
||||||
ExtAppEnabled = "Feltűz"
|
ExtAppEnabled = "Feltűz"
|
||||||
|
ClearShift = "Gyorsbillentyű shift + clear"
|
||||||
|
|||||||
@@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "Per impostazione predefinita, le app esterne"
|
|||||||
ExtAppWriteExplanation2 = "non possono scrivere in memoria flash"
|
ExtAppWriteExplanation2 = "non possono scrivere in memoria flash"
|
||||||
ExtAppWriteExplanation3 = "(persistente) della calcolatrice."
|
ExtAppWriteExplanation3 = "(persistente) della calcolatrice."
|
||||||
ExtAppEnabled = "Affiggere"
|
ExtAppEnabled = "Affiggere"
|
||||||
|
ClearShift = "Scorciatoia shift + clear"
|
||||||
|
|||||||
@@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "Standaard zijn externe toepassingen"
|
|||||||
ExtAppWriteExplanation2 = "kan niet naar het geheugen schrijven"
|
ExtAppWriteExplanation2 = "kan niet naar het geheugen schrijven"
|
||||||
ExtAppWriteExplanation3 = "flash (aanhoudend) van uw rekenmachine."
|
ExtAppWriteExplanation3 = "flash (aanhoudend) van uw rekenmachine."
|
||||||
ExtAppEnabled = "Vastpinnen"
|
ExtAppEnabled = "Vastpinnen"
|
||||||
|
ClearShift = "Sneltoets shift + clear"
|
||||||
|
|||||||
@@ -81,3 +81,4 @@ ExtAppWriteExplanation1 = "Por padrão, aplicativos externos"
|
|||||||
ExtAppWriteExplanation2 = "não pode gravar na memória"
|
ExtAppWriteExplanation2 = "não pode gravar na memória"
|
||||||
ExtAppWriteExplanation3 = "flash (persistente) de sua calculadora."
|
ExtAppWriteExplanation3 = "flash (persistente) de sua calculadora."
|
||||||
ExtAppEnabled = "Pôster"
|
ExtAppEnabled = "Pôster"
|
||||||
|
ClearShift = "Shift de shift + clear"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ constexpr SettingsMessageTree s_contributorsChildren[18] = {SettingsMessageTree(
|
|||||||
|
|
||||||
// Code Settings
|
// Code Settings
|
||||||
#ifdef HAS_CODE
|
#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::ClearShift)};
|
||||||
#endif
|
#endif
|
||||||
constexpr SettingsMessageTree s_modelFontChildren[2] = {SettingsMessageTree(I18n::Message::LargeFont), SettingsMessageTree(I18n::Message::SmallFont)};
|
constexpr SettingsMessageTree s_modelFontChildren[2] = {SettingsMessageTree(I18n::Message::LargeFont), SettingsMessageTree(I18n::Message::SmallFont)};
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ extern const Shared::SettingsMessageTree s_symbolChildren[4];
|
|||||||
extern const Shared::SettingsMessageTree s_symbolFunctionChildren[3];
|
extern const Shared::SettingsMessageTree s_symbolFunctionChildren[3];
|
||||||
extern const Shared::SettingsMessageTree s_modelMathOptionsChildren[6];
|
extern const Shared::SettingsMessageTree s_modelMathOptionsChildren[6];
|
||||||
extern const Shared::SettingsMessageTree s_modelFontChildren[2];
|
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_modelDateTimeChildren[3];
|
||||||
extern const Shared::SettingsMessageTree s_accessibilityChildren[6];
|
extern const Shared::SettingsMessageTree s_accessibilityChildren[6];
|
||||||
extern const Shared::SettingsMessageTree s_contributorsChildren[18];
|
extern const Shared::SettingsMessageTree s_contributorsChildren[18];
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ CodeOptionsController::CodeOptionsController(Responder * parentResponder) :
|
|||||||
m_chevronCellFontSize.setMessageFont(KDFont::LargeFont);
|
m_chevronCellFontSize.setMessageFont(KDFont::LargeFont);
|
||||||
m_switchCellAutoCompletion.setMessageFont(KDFont::LargeFont);
|
m_switchCellAutoCompletion.setMessageFont(KDFont::LargeFont);
|
||||||
m_switchCellSyntaxHighlighting.setMessageFont(KDFont::LargeFont);
|
m_switchCellSyntaxHighlighting.setMessageFont(KDFont::LargeFont);
|
||||||
|
m_switchCellClearShift.setMessageFont(KDFont::LargeFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CodeOptionsController::handleEvent(Ion::Events::Event event) {
|
bool CodeOptionsController::handleEvent(Ion::Events::Event event) {
|
||||||
@@ -26,6 +27,10 @@ bool CodeOptionsController::handleEvent(Ion::Events::Event event) {
|
|||||||
GlobalPreferences::sharedGlobalPreferences()->setSyntaxhighlighting(!GlobalPreferences::sharedGlobalPreferences()->syntaxhighlighting());
|
GlobalPreferences::sharedGlobalPreferences()->setSyntaxhighlighting(!GlobalPreferences::sharedGlobalPreferences()->syntaxhighlighting());
|
||||||
m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow());
|
m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow());
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
GlobalPreferences::sharedGlobalPreferences()->setClearShift(!GlobalPreferences::sharedGlobalPreferences()->clearShift());
|
||||||
|
m_selectableTableView.reloadCellAtLocation(m_selectableTableView.selectedColumn(), m_selectableTableView.selectedRow());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
GenericSubController * subController = nullptr;
|
GenericSubController * subController = nullptr;
|
||||||
subController = &m_preferencesController;
|
subController = &m_preferencesController;
|
||||||
@@ -48,8 +53,10 @@ HighlightCell * CodeOptionsController::reusableCell(int index, int type) {
|
|||||||
}
|
}
|
||||||
else if (index == 1) {
|
else if (index == 1) {
|
||||||
return &m_switchCellAutoCompletion;
|
return &m_switchCellAutoCompletion;
|
||||||
|
} else if (index == 2) {
|
||||||
|
return &m_switchCellSyntaxHighlighting;
|
||||||
}
|
}
|
||||||
return &m_switchCellSyntaxHighlighting;
|
return &m_switchCellClearShift;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CodeOptionsController::reusableCellCount(int type) {
|
int CodeOptionsController::reusableCellCount(int type) {
|
||||||
@@ -79,6 +86,11 @@ void CodeOptionsController::willDisplayCellForIndex(HighlightCell * cell, int in
|
|||||||
SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView();
|
SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView();
|
||||||
mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->syntaxhighlighting());
|
mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->syntaxhighlighting());
|
||||||
}
|
}
|
||||||
|
else if (thisLabel == I18n::Message::ClearShift) {
|
||||||
|
MessageTableCellWithSwitch * mySwitchCell = (MessageTableCellWithSwitch *)cell;
|
||||||
|
SwitchView * mySwitch = (SwitchView *)mySwitchCell->accessoryView();
|
||||||
|
mySwitch->setState(GlobalPreferences::sharedGlobalPreferences()->clearShift());
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,11 +14,12 @@ public:
|
|||||||
int reusableCellCount(int type) override;
|
int reusableCellCount(int type) override;
|
||||||
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
|
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
|
||||||
private:
|
private:
|
||||||
constexpr static int k_totalNumberOfCell = 4;
|
constexpr static int k_totalNumberOfCell = 5;
|
||||||
PreferencesController m_preferencesController;
|
PreferencesController m_preferencesController;
|
||||||
MessageTableCellWithChevronAndMessage m_chevronCellFontSize;
|
MessageTableCellWithChevronAndMessage m_chevronCellFontSize;
|
||||||
MessageTableCellWithSwitch m_switchCellAutoCompletion;
|
MessageTableCellWithSwitch m_switchCellAutoCompletion;
|
||||||
MessageTableCellWithSwitch m_switchCellSyntaxHighlighting;
|
MessageTableCellWithSwitch m_switchCellSyntaxHighlighting;
|
||||||
|
MessageTableCellWithSwitch m_switchCellClearShift;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <ion/unicode/utf8_decoder.h>
|
#include <ion/unicode/utf8_decoder.h>
|
||||||
#include <ion/unicode/utf8_helper.h>
|
#include <ion/unicode/utf8_helper.h>
|
||||||
#include <poincare/serialization_helper.h>
|
#include <poincare/serialization_helper.h>
|
||||||
|
#include <../../apps/global_preferences.h>
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
@@ -249,11 +250,13 @@ bool TextArea::handleEvent(Ion::Events::Event event) {
|
|||||||
contentView()->resetSelection();
|
contentView()->resetSelection();
|
||||||
contentView()->moveCursorGeo(0, event == Ion::Events::Up ? -step : step);
|
contentView()->moveCursorGeo(0, event == Ion::Events::Up ? -step : step);
|
||||||
} else if (event == Ion::Events::Clear) {
|
} else if (event == Ion::Events::Clear) {
|
||||||
if (!contentView()->selectionIsEmpty()) {
|
if (GlobalPreferences::sharedGlobalPreferences()->clearShift()) {
|
||||||
deleteSelection();
|
if (!contentView()->selectionIsEmpty()) {
|
||||||
return true;
|
deleteSelection();
|
||||||
} else if (!contentView()->removeEndOfLine()) {
|
return true;
|
||||||
contentView()->removeStartOfLine();
|
} else if (!contentView()->removeEndOfLine()) {
|
||||||
|
contentView()->removeStartOfLine();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (event == Ion::Events::Paste) {
|
} else if (event == Ion::Events::Paste) {
|
||||||
return handleEventWithText(Clipboard::sharedClipboard()->storedText());
|
return handleEventWithText(Clipboard::sharedClipboard()->storedText());
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
SFLAGS += -Ipython/src
|
SFLAGS += -Ipython/src
|
||||||
SFLAGS += -Ipython/port
|
SFLAGS += -Ipython/port
|
||||||
SFLAGS += -I$(BUILD_DIR)/python/port
|
SFLAGS += -I$(BUILD_DIR)/python/port
|
||||||
SFLAGS += -DEPSILON_VERSION="$(EPSILON_VERSION)" -DOMEGA_VERSION="$(OMEGA_VERSION)"
|
SFLAGS += -DEPSILON_VERSION="$(EPSILON_VERSION)" -DOMEGA_VERSION="$(OMEGA_VERSION)" -DUPSILON_VERSION="$(UPSILON_VERSION)"
|
||||||
|
|
||||||
# How to maintain this Makefile
|
# How to maintain this Makefile
|
||||||
# - Copy PY_CORE_O_BASENAME from py.mk into py_src
|
# - Copy PY_CORE_O_BASENAME from py.mk into py_src
|
||||||
|
|||||||
@@ -18,11 +18,14 @@ extern "C" {
|
|||||||
#error This file expects EPSILON_VERSION to be defined
|
#error This file expects EPSILON_VERSION to be defined
|
||||||
#endif
|
#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_sysname_obj, "NumWorks");
|
||||||
STATIC const MP_DEFINE_STR_OBJ(modos_uname_info_nodename_obj, "");
|
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);
|
STATIC const MP_DEFINE_STR_OBJ(modos_uname_info_version_obj, MICROPY_VERSION_STRING);
|
||||||
|
|
||||||
#if defined(DEVICE_N0110)
|
#if defined(DEVICE_N0110)
|
||||||
|
|||||||
Reference in New Issue
Block a user