[FL-2461] IR: change word from key to button (#1119)

* 2461 ir renamed menu items
* Renamed the key to the button

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Dmitry Pavlov 2022-04-19 14:07:14 +03:00 committed by GitHub
parent ac44b9bc69
commit 29e5e57a70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 7 deletions

View File

@ -23,9 +23,9 @@ void InfraredAppSceneEdit::on_enter(InfraredApp* app) {
InfraredAppViewManager* view_manager = app->get_view_manager();
Submenu* submenu = view_manager->get_submenu();
submenu_add_item(submenu, "Add Key", SubmenuIndexAddKey, submenu_callback, app);
submenu_add_item(submenu, "Rename Key", SubmenuIndexRenameKey, submenu_callback, app);
submenu_add_item(submenu, "Delete Key", SubmenuIndexDeleteKey, submenu_callback, app);
submenu_add_item(submenu, "Add Button", SubmenuIndexAddKey, submenu_callback, app);
submenu_add_item(submenu, "Rename Button", SubmenuIndexRenameKey, submenu_callback, app);
submenu_add_item(submenu, "Delete Button", SubmenuIndexDeleteKey, submenu_callback, app);
submenu_add_item(submenu, "Rename Remote", SubmenuIndexRenameRemote, submenu_callback, app);
submenu_add_item(submenu, "Delete Remote", SubmenuIndexDeleteRemote, submenu_callback, app);
submenu_set_selected_item(submenu, submenu_item_selected);

View File

@ -16,8 +16,9 @@ void InfraredAppSceneEditKeySelect::on_enter(InfraredApp* app) {
Submenu* submenu = view_manager->get_submenu();
int item_number = 0;
const char* header =
app->get_edit_action() == InfraredApp::EditAction::Rename ? "Rename key:" : "Delete key:";
const char* header = app->get_edit_action() == InfraredApp::EditAction::Rename ?
"Rename Button:" :
"Delete Button:";
submenu_set_header(submenu, header);
auto remote_manager = app->get_remote_manager();

View File

@ -14,7 +14,7 @@ void InfraredAppSceneEditRename::on_enter(InfraredApp* app) {
strncpy(buffer_str, button_name.c_str(), max_len);
buffer_str[max_len + 1] = 0;
enter_name_length = max_len;
text_input_set_header_text(text_input, "Name the key");
text_input_set_header_text(text_input, "Name the button");
} else {
auto remote_name = remote_manager->get_remote_name();
strncpy(app->get_text_store(0), remote_name.c_str(), app->get_text_store_size());

View File

@ -20,7 +20,7 @@ void InfraredAppSceneLearnEnterName::on_enter(InfraredApp* app) {
app->set_text_store(0, "RAW_%d", raw_signal.timings_cnt);
}
text_input_set_header_text(text_input, "Name the key");
text_input_set_header_text(text_input, "Name the button");
text_input_set_result_callback(
text_input,
InfraredApp::text_input_callback,