lv_lang: minor fixes

This commit is contained in:
Gabor Kiss-Vamosi
2019-01-23 12:30:50 +01:00
parent a6ead395a0
commit 68a860b958
3 changed files with 2 additions and 3 deletions

View File

@@ -75,7 +75,7 @@ void lv_lang_set_text_func(const void * (*fp)(uint16_t))
* @param txt_id an ID of the text to get
* @return the `txt_id` txt on the set language
*/
void * lv_lang_get_text(uint16_t txt_id)
const void * lv_lang_get_text(uint16_t txt_id)
{
if(get_txt == NULL) {
LV_LOG_WARN("lv_lang_get_text: text_func is not specified");

View File

@@ -51,7 +51,7 @@ void lv_lang_set_text_func(const void * (*fp)(uint16_t));
* @param txt_id an ID of the text to get
* @return the `txt_id` txt on the set language
*/
void * lv_lang_get_text(uint16_t txt_id);
const void * lv_lang_get_text(uint16_t txt_id);
/**
* Return with ID of the currently selected language

View File

@@ -761,7 +761,6 @@ static lv_res_t lv_label_signal(lv_obj_t * label, lv_signal_t sign, void * param
} else if(sign == LV_SIGNAL_LANG_CHG) {
#if USE_LV_MULTI_LANG
if(ext->lang_txt_id != LV_LANG_TXT_ID_NONE) {
uint8_t lang = lv_lang_act();
const char * lang_txt = lv_lang_get_text(ext->lang_txt_id);
if(lang_txt) {
lv_label_set_text(label, lang_txt);