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()
{
@@ -58,7 +57,7 @@ static void onModelNameChanged()
struct ModelNameEdit : public ModelTextEdit {
ModelNameEdit(Window *parent, const rect_t &rect) :
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);
}
+16 -18
View File
@@ -25,26 +25,24 @@
#include "textedit.h"
#include "storage/storage.h"
class ModelTextEdit: public TextEdit
class ModelTextEdit : public TextEdit
{
public:
ModelTextEdit(Window * parent, const rect_t & rect, char * value, uint8_t length, LcdFlags windowFlags = 0, const char * extra_chars = nullptr):
TextEdit(parent, rect, value, length, windowFlags, extra_chars)
{
setChangeHandler([](){
storageDirty(EE_MODEL);
});
}
public:
ModelTextEdit(Window* parent, const rect_t& rect, char* value, uint8_t length,
LcdFlags windowFlags = 0) :
TextEdit(parent, rect, value, length, windowFlags)
{
setChangeHandler([]() { storageDirty(EE_MODEL); });
}
};
class RadioTextEdit: public TextEdit
class RadioTextEdit : public TextEdit
{
public:
RadioTextEdit(Window * parent, const rect_t & rect, char * value, uint8_t length, LcdFlags windowFlags = 0, const char * extra_chars = nullptr):
TextEdit(parent, rect, value, length, windowFlags, extra_chars)
{
setChangeHandler([](){
storageDirty(EE_GENERAL);
});
}
public:
RadioTextEdit(Window* parent, const rect_t& rect, char* value, uint8_t length,
LcdFlags windowFlags = 0) :
TextEdit(parent, rect, value, length, windowFlags)
{
setChangeHandler([]() { storageDirty(EE_GENERAL); });
}
};