Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorits your bedtime <23366927+itsyourbedtime@users.noreply.github.com>2021-06-22 12:56:57 +0300
committerGitHub <noreply@github.com>2021-06-22 12:56:57 +0300
commit6ec9c6cc498cbbf2f1be776ad0629633021a3e57 (patch)
tree65b28c28e467d0fac3212706fb765eb1fc131c00 /applications/ibutton
parent8605f53c28976e8a9dd80e80d54bd1adc9d978f7 (diff)
[FL-1404] iButton long names fix (#528)
* ibutton: long names partial fix\ * ibutton: limit max filename length to 22 chars * elwrapping long names to a new line * Proper m-string size usage Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Diffstat (limited to 'applications/ibutton')
-rw-r--r--applications/ibutton/helpers/key-info.h2
-rw-r--r--applications/ibutton/scene/ibutton-scene-delete-confirm.cpp2
-rw-r--r--applications/ibutton/scene/ibutton-scene-emulate.cpp10
-rw-r--r--applications/ibutton/scene/ibutton-scene-save-name.cpp2
-rw-r--r--applications/ibutton/scene/ibutton-scene-write-success.cpp2
-rw-r--r--applications/ibutton/scene/ibutton-scene-write.cpp10
6 files changed, 14 insertions, 14 deletions
diff --git a/applications/ibutton/helpers/key-info.h b/applications/ibutton/helpers/key-info.h
index 1eaf54c3..20ee7e1d 100644
--- a/applications/ibutton/helpers/key-info.h
+++ b/applications/ibutton/helpers/key-info.h
@@ -2,7 +2,7 @@
#include <stdint.h>
static const uint8_t IBUTTON_KEY_DATA_SIZE = 8;
-static const uint8_t IBUTTON_KEY_NAME_SIZE = 64;
+static const uint8_t IBUTTON_KEY_NAME_SIZE = 22;
enum class iButtonKeyType : uint8_t {
KeyDallas,
diff --git a/applications/ibutton/scene/ibutton-scene-delete-confirm.cpp b/applications/ibutton/scene/ibutton-scene-delete-confirm.cpp
index e7430fd7..622a377f 100644
--- a/applications/ibutton/scene/ibutton-scene-delete-confirm.cpp
+++ b/applications/ibutton/scene/ibutton-scene-delete-confirm.cpp
@@ -41,7 +41,7 @@ void iButtonSceneDeleteConfirm::on_enter(iButtonApp* app) {
break;
}
- dialog_ex_set_text(dialog_ex, app->get_text_store(), 64, 26, AlignCenter, AlignCenter);
+ dialog_ex_set_text(dialog_ex, app->get_text_store(), 64, 20, AlignCenter, AlignCenter);
dialog_ex_set_left_button_text(dialog_ex, "Back");
dialog_ex_set_right_button_text(dialog_ex, "Delete");
dialog_ex_set_result_callback(dialog_ex, callback);
diff --git a/applications/ibutton/scene/ibutton-scene-emulate.cpp b/applications/ibutton/scene/ibutton-scene-emulate.cpp
index 62839b54..598b5f26 100644
--- a/applications/ibutton/scene/ibutton-scene-emulate.cpp
+++ b/applications/ibutton/scene/ibutton-scene-emulate.cpp
@@ -51,17 +51,17 @@ void iButtonSceneEmulate::on_enter(iButtonApp* app) {
switch(line_count) {
case 3:
- popup_set_header(popup, "iButton", 92, 18, AlignCenter, AlignBottom);
- popup_set_text(popup, app->get_text_store(), 92, 22, AlignCenter, AlignTop);
+ popup_set_header(popup, "iButton", 82, 18, AlignCenter, AlignBottom);
+ popup_set_text(popup, app->get_text_store(), 82, 22, AlignCenter, AlignTop);
break;
default:
- popup_set_header(popup, "iButton", 92, 24, AlignCenter, AlignBottom);
- popup_set_text(popup, app->get_text_store(), 92, 28, AlignCenter, AlignTop);
+ popup_set_header(popup, "iButton", 82, 24, AlignCenter, AlignBottom);
+ popup_set_text(popup, app->get_text_store(), 82, 28, AlignCenter, AlignTop);
break;
}
- popup_set_icon(popup, 10, 10, I_iButtonKey_49x44);
+ popup_set_icon(popup, 2, 10, I_iButtonKey_49x44);
view_manager->switch_to(iButtonAppViewManager::Type::iButtonAppViewPopup);
app->get_key_worker()->start_emulate(app->get_key());
diff --git a/applications/ibutton/scene/ibutton-scene-save-name.cpp b/applications/ibutton/scene/ibutton-scene-save-name.cpp
index 1bb614cf..04230332 100644
--- a/applications/ibutton/scene/ibutton-scene-save-name.cpp
+++ b/applications/ibutton/scene/ibutton-scene-save-name.cpp
@@ -22,7 +22,7 @@ void iButtonSceneSaveName::on_enter(iButtonApp* app) {
text_input_set_header_text(text_input, "Name the key");
text_input_set_result_callback(
- text_input, callback, app, app->get_text_store(), app->get_text_store_size());
+ text_input, callback, app, app->get_text_store(), IBUTTON_KEY_NAME_SIZE);
view_manager->switch_to(iButtonAppViewManager::Type::iButtonAppViewTextInput);
}
diff --git a/applications/ibutton/scene/ibutton-scene-write-success.cpp b/applications/ibutton/scene/ibutton-scene-write-success.cpp
index f66181a4..7c0b60ef 100644
--- a/applications/ibutton/scene/ibutton-scene-write-success.cpp
+++ b/applications/ibutton/scene/ibutton-scene-write-success.cpp
@@ -11,7 +11,7 @@ void iButtonSceneWriteSuccess::on_enter(iButtonApp* app) {
auto callback = cbc::obtain_connector(this, &iButtonSceneWriteSuccess::popup_callback);
popup_set_icon(popup, 0, 12, I_iButtonDolphinVerySuccess_108x52);
- popup_set_text(popup, "Successful writing!", 47, 14, AlignLeft, AlignBottom);
+ popup_set_text(popup, "Successfully written!", 44, 14, AlignLeft, AlignBottom);
popup_set_callback(popup, callback);
popup_set_context(popup, app);
diff --git a/applications/ibutton/scene/ibutton-scene-write.cpp b/applications/ibutton/scene/ibutton-scene-write.cpp
index 6c109aa1..d05dd2c3 100644
--- a/applications/ibutton/scene/ibutton-scene-write.cpp
+++ b/applications/ibutton/scene/ibutton-scene-write.cpp
@@ -46,17 +46,17 @@ void iButtonSceneWrite::on_enter(iButtonApp* app) {
switch(line_count) {
case 3:
- popup_set_header(popup, "iButton", 92, 18, AlignCenter, AlignBottom);
- popup_set_text(popup, app->get_text_store(), 92, 22, AlignCenter, AlignTop);
+ popup_set_header(popup, "iButton", 82, 18, AlignCenter, AlignBottom);
+ popup_set_text(popup, app->get_text_store(), 82, 22, AlignCenter, AlignTop);
break;
default:
- popup_set_header(popup, "iButton", 92, 24, AlignCenter, AlignBottom);
- popup_set_text(popup, app->get_text_store(), 92, 28, AlignCenter, AlignTop);
+ popup_set_header(popup, "iButton", 82, 24, AlignCenter, AlignBottom);
+ popup_set_text(popup, app->get_text_store(), 82, 28, AlignCenter, AlignTop);
break;
}
- popup_set_icon(popup, 10, 10, I_iButtonKey_49x44);
+ popup_set_icon(popup, 2, 10, I_iButtonKey_49x44);
view_manager->switch_to(iButtonAppViewManager::Type::iButtonAppViewPopup);