textedit: extra_chars has been removed

This commit is contained in:
Raphael Coeffic
2022-08-18 12:38:35 +10:00
committed by Peter Feerick
parent 00630277a8
commit 2c4533ddbd
3 changed files with 18 additions and 21 deletions
+1 -2
View File
@@ -42,7 +42,6 @@ ModelSetupPage::ModelSetupPage() :
{ {
} }
const char MODEL_NAME_EXTRA_CHARS[] = "_-.,:;<=>";
static void onModelNameChanged() static void onModelNameChanged()
{ {
@@ -58,7 +57,7 @@ static void onModelNameChanged()
struct ModelNameEdit : public ModelTextEdit { struct ModelNameEdit : public ModelTextEdit {
ModelNameEdit(Window *parent, const rect_t &rect) : ModelNameEdit(Window *parent, const rect_t &rect) :
ModelTextEdit(parent, rect, g_model.header.name, ModelTextEdit(parent, rect, g_model.header.name,
sizeof(g_model.header.name), 0, MODEL_NAME_EXTRA_CHARS) sizeof(g_model.header.name), 0)
{ {
setChangeHandler(onModelNameChanged); setChangeHandler(onModelNameChanged);
} }
+16 -18
View File
@@ -25,26 +25,24 @@
#include "textedit.h" #include "textedit.h"
#include "storage/storage.h" #include "storage/storage.h"
class ModelTextEdit: public TextEdit class ModelTextEdit : public TextEdit
{ {
public: public:
ModelTextEdit(Window * parent, const rect_t & rect, char * value, uint8_t length, LcdFlags windowFlags = 0, const char * extra_chars = nullptr): ModelTextEdit(Window* parent, const rect_t& rect, char* value, uint8_t length,
TextEdit(parent, rect, value, length, windowFlags, extra_chars) LcdFlags windowFlags = 0) :
{ TextEdit(parent, rect, value, length, windowFlags)
setChangeHandler([](){ {
storageDirty(EE_MODEL); setChangeHandler([]() { storageDirty(EE_MODEL); });
}); }
}
}; };
class RadioTextEdit: public TextEdit class RadioTextEdit : public TextEdit
{ {
public: public:
RadioTextEdit(Window * parent, const rect_t & rect, char * value, uint8_t length, LcdFlags windowFlags = 0, const char * extra_chars = nullptr): RadioTextEdit(Window* parent, const rect_t& rect, char* value, uint8_t length,
TextEdit(parent, rect, value, length, windowFlags, extra_chars) LcdFlags windowFlags = 0) :
{ TextEdit(parent, rect, value, length, windowFlags)
setChangeHandler([](){ {
storageDirty(EE_GENERAL); setChangeHandler([]() { storageDirty(EE_GENERAL); });
}); }
}
}; };