sfw_mode support for ibutton added
BIN
applications/main/ibutton/images/DolphinMafia_115x62_sfw.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
applications/main/ibutton/images/DolphinNice_96x59_sfw.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
applications/main/ibutton/images/DolphinWait_61x59_sfw.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
@@ -1,4 +1,5 @@
|
||||
#include "../ibutton_i.h"
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
static void ibutton_scene_delete_success_popup_callback(void* context) {
|
||||
iButton* ibutton = context;
|
||||
@@ -8,8 +9,15 @@ static void ibutton_scene_delete_success_popup_callback(void* context) {
|
||||
void ibutton_scene_delete_success_on_enter(void* context) {
|
||||
iButton* ibutton = context;
|
||||
Popup* popup = ibutton->popup;
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
|
||||
}
|
||||
popup_set_header(popup, "Deleted", 83, 19, AlignLeft, AlignBottom);
|
||||
|
||||
popup_set_callback(popup, ibutton_scene_delete_success_popup_callback);
|
||||
@@ -18,6 +26,7 @@ void ibutton_scene_delete_success_on_enter(void* context) {
|
||||
popup_enable_timeout(popup);
|
||||
|
||||
view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool ibutton_scene_delete_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "../ibutton_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
static void ibutton_scene_read_callback(void* context) {
|
||||
iButton* ibutton = context;
|
||||
@@ -11,10 +12,17 @@ void ibutton_scene_read_on_enter(void* context) {
|
||||
Popup* popup = ibutton->popup;
|
||||
iButtonKey* key = ibutton->key;
|
||||
iButtonWorker* worker = ibutton->key_worker;
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
popup_set_header(popup, "iButton", 95, 26, AlignCenter, AlignBottom);
|
||||
popup_set_text(popup, "Waiting\nfor key ...", 95, 30, AlignCenter, AlignTop);
|
||||
popup_set_icon(popup, 0, 5, &I_DolphinWait_61x59);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 0, 5, &I_DolphinWait_61x59_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 0, 5, &I_DolphinWait_61x59);
|
||||
}
|
||||
|
||||
view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewPopup);
|
||||
furi_string_set(ibutton->file_path, IBUTTON_APP_FOLDER);
|
||||
@@ -23,6 +31,7 @@ void ibutton_scene_read_on_enter(void* context) {
|
||||
ibutton_worker_read_start(worker, key);
|
||||
|
||||
ibutton_notification_message(ibutton, iButtonNotificationMessageReadStart);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool ibutton_scene_read_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "../ibutton_i.h"
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
static void ibutton_scene_save_success_popup_callback(void* context) {
|
||||
iButton* ibutton = context;
|
||||
@@ -8,8 +9,15 @@ static void ibutton_scene_save_success_popup_callback(void* context) {
|
||||
void ibutton_scene_save_success_on_enter(void* context) {
|
||||
iButton* ibutton = context;
|
||||
Popup* popup = ibutton->popup;
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
}
|
||||
popup_set_header(popup, "Saved!", 5, 7, AlignLeft, AlignTop);
|
||||
|
||||
popup_set_callback(popup, ibutton_scene_save_success_popup_callback);
|
||||
@@ -18,6 +26,7 @@ void ibutton_scene_save_success_on_enter(void* context) {
|
||||
popup_enable_timeout(popup);
|
||||
|
||||
view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool ibutton_scene_save_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "../ibutton_i.h"
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
static void ibutton_scene_write_success_popup_callback(void* context) {
|
||||
iButton* ibutton = context;
|
||||
@@ -9,8 +10,15 @@ static void ibutton_scene_write_success_popup_callback(void* context) {
|
||||
void ibutton_scene_write_success_on_enter(void* context) {
|
||||
iButton* ibutton = context;
|
||||
Popup* popup = ibutton->popup;
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
popup_set_icon(popup, 0, 12, &I_iButtonDolphinVerySuccess_108x52);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 0, 12, &I_iButtonDolphinVerySuccess_108x52_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 0, 12, &I_iButtonDolphinVerySuccess_108x52);
|
||||
}
|
||||
popup_set_text(popup, "Successfully written!", 40, 12, AlignLeft, AlignBottom);
|
||||
|
||||
popup_set_callback(popup, ibutton_scene_write_success_popup_callback);
|
||||
@@ -21,6 +29,7 @@ void ibutton_scene_write_success_on_enter(void* context) {
|
||||
view_dispatcher_switch_to_view(ibutton->view_dispatcher, iButtonViewPopup);
|
||||
ibutton_notification_message(ibutton, iButtonNotificationMessageSuccess);
|
||||
ibutton_notification_message(ibutton, iButtonNotificationMessageGreenOn);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool ibutton_scene_write_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
#include "../lfrfid_i.h"
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
void lfrfid_scene_delete_success_on_enter(void* context) {
|
||||
LfRfid* app = context;
|
||||
Popup* popup = app->popup;
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
|
||||
}
|
||||
popup_set_header(popup, "Deleted", 83, 19, AlignLeft, AlignBottom);
|
||||
popup_set_context(popup, app);
|
||||
popup_set_callback(popup, lfrfid_popup_timeout_callback);
|
||||
@@ -12,6 +20,7 @@ void lfrfid_scene_delete_success_on_enter(void* context) {
|
||||
popup_enable_timeout(popup);
|
||||
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool lfrfid_scene_delete_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
#include "../lfrfid_i.h"
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
void lfrfid_scene_save_success_on_enter(void* context) {
|
||||
LfRfid* app = context;
|
||||
Popup* popup = app->popup;
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
// Clear state of data enter scene
|
||||
scene_manager_set_scene_state(app->scene_manager, LfRfidSceneSaveData, 0);
|
||||
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
}
|
||||
popup_set_header(popup, "Saved!", 5, 7, AlignLeft, AlignTop);
|
||||
popup_set_context(popup, app);
|
||||
popup_set_callback(popup, lfrfid_popup_timeout_callback);
|
||||
@@ -15,6 +22,7 @@ void lfrfid_scene_save_success_on_enter(void* context) {
|
||||
popup_enable_timeout(popup);
|
||||
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool lfrfid_scene_save_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "../nfc_i.h"
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
void nfc_scene_delete_success_popup_callback(void* context) {
|
||||
Nfc* nfc = context;
|
||||
@@ -7,16 +8,24 @@ void nfc_scene_delete_success_popup_callback(void* context) {
|
||||
|
||||
void nfc_scene_delete_success_on_enter(void* context) {
|
||||
Nfc* nfc = context;
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
// Setup view
|
||||
Popup* popup = nfc->popup;
|
||||
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
|
||||
}
|
||||
popup_set_header(popup, "Deleted", 83, 19, AlignLeft, AlignBottom);
|
||||
popup_set_timeout(popup, 1500);
|
||||
popup_set_context(popup, nfc);
|
||||
popup_set_callback(popup, nfc_scene_delete_success_popup_callback);
|
||||
popup_enable_timeout(popup);
|
||||
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool nfc_scene_delete_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "../nfc_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
void nfc_scene_mf_classic_update_success_popup_callback(void* context) {
|
||||
Nfc* nfc = context;
|
||||
@@ -9,11 +10,18 @@ void nfc_scene_mf_classic_update_success_popup_callback(void* context) {
|
||||
void nfc_scene_mf_classic_update_success_on_enter(void* context) {
|
||||
Nfc* nfc = context;
|
||||
DOLPHIN_DEED(DolphinDeedNfcSave);
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
notification_message(nfc->notifications, &sequence_success);
|
||||
|
||||
Popup* popup = nfc->popup;
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
}
|
||||
popup_set_header(popup, "Updated!", 11, 20, AlignLeft, AlignBottom);
|
||||
popup_set_timeout(popup, 1500);
|
||||
popup_set_context(popup, nfc);
|
||||
@@ -21,6 +29,7 @@ void nfc_scene_mf_classic_update_success_on_enter(void* context) {
|
||||
popup_enable_timeout(popup);
|
||||
|
||||
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool nfc_scene_mf_classic_update_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "../nfc_i.h"
|
||||
#include <dolphin/dolphin.h>
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
void nfc_scene_mf_classic_write_success_popup_callback(void* context) {
|
||||
Nfc* nfc = context;
|
||||
@@ -9,11 +10,18 @@ void nfc_scene_mf_classic_write_success_popup_callback(void* context) {
|
||||
void nfc_scene_mf_classic_write_success_on_enter(void* context) {
|
||||
Nfc* nfc = context;
|
||||
DOLPHIN_DEED(DolphinDeedNfcSave);
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
notification_message(nfc->notifications, &sequence_success);
|
||||
|
||||
Popup* popup = nfc->popup;
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
}
|
||||
popup_set_header(popup, "Successfully\nwritten", 13, 22, AlignLeft, AlignBottom);
|
||||
popup_set_timeout(popup, 1500);
|
||||
popup_set_context(popup, nfc);
|
||||
@@ -21,6 +29,7 @@ void nfc_scene_mf_classic_write_success_on_enter(void* context) {
|
||||
popup_enable_timeout(popup);
|
||||
|
||||
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool nfc_scene_mf_classic_write_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "../nfc_i.h"
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
void nfc_scene_restore_original_popup_callback(void* context) {
|
||||
Nfc* nfc = context;
|
||||
@@ -7,16 +8,24 @@ void nfc_scene_restore_original_popup_callback(void* context) {
|
||||
|
||||
void nfc_scene_restore_original_on_enter(void* context) {
|
||||
Nfc* nfc = context;
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
// Setup view
|
||||
Popup* popup = nfc->popup;
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
}
|
||||
popup_set_header(popup, "Original file\nrestored", 13, 22, AlignLeft, AlignBottom);
|
||||
popup_set_timeout(popup, 1500);
|
||||
popup_set_context(popup, nfc);
|
||||
popup_set_callback(popup, nfc_scene_restore_original_popup_callback);
|
||||
popup_enable_timeout(popup);
|
||||
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool nfc_scene_restore_original_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "../nfc_i.h"
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
void nfc_scene_save_success_popup_callback(void* context) {
|
||||
Nfc* nfc = context;
|
||||
@@ -7,16 +8,24 @@ void nfc_scene_save_success_popup_callback(void* context) {
|
||||
|
||||
void nfc_scene_save_success_on_enter(void* context) {
|
||||
Nfc* nfc = context;
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
// Setup view
|
||||
Popup* popup = nfc->popup;
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
}
|
||||
popup_set_header(popup, "Saved!", 13, 22, AlignLeft, AlignBottom);
|
||||
popup_set_timeout(popup, 1500);
|
||||
popup_set_context(popup, nfc);
|
||||
popup_set_callback(popup, nfc_scene_save_success_popup_callback);
|
||||
popup_enable_timeout(popup);
|
||||
view_dispatcher_switch_to_view(nfc->view_dispatcher, NfcViewPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool nfc_scene_save_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "../subghz_i.h"
|
||||
#include "../helpers/subghz_custom_event.h"
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
void subghz_scene_delete_success_popup_callback(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
@@ -9,16 +10,24 @@ void subghz_scene_delete_success_popup_callback(void* context) {
|
||||
|
||||
void subghz_scene_delete_success_on_enter(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
// Setup view
|
||||
Popup* popup = subghz->popup;
|
||||
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 0, 2, &I_DolphinMafia_115x62);
|
||||
}
|
||||
popup_set_header(popup, "Deleted", 83, 19, AlignLeft, AlignBottom);
|
||||
popup_set_timeout(popup, 1500);
|
||||
popup_set_context(popup, subghz);
|
||||
popup_set_callback(popup, subghz_scene_delete_success_popup_callback);
|
||||
popup_enable_timeout(popup);
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool subghz_scene_delete_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "../subghz_i.h"
|
||||
#include "../helpers/subghz_custom_event.h"
|
||||
#include "../../../settings/desktop_settings/desktop_settings_app.h"
|
||||
|
||||
void subghz_scene_save_success_popup_callback(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
@@ -8,16 +9,24 @@ void subghz_scene_save_success_popup_callback(void* context) {
|
||||
|
||||
void subghz_scene_save_success_on_enter(void* context) {
|
||||
SubGhz* subghz = context;
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
// Setup view
|
||||
Popup* popup = subghz->popup;
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
}
|
||||
popup_set_header(popup, "Saved!", 13, 22, AlignLeft, AlignBottom);
|
||||
popup_set_timeout(popup, 1500);
|
||||
popup_set_context(popup, subghz);
|
||||
popup_set_callback(popup, subghz_scene_save_success_popup_callback);
|
||||
popup_enable_timeout(popup);
|
||||
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool subghz_scene_save_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "../bt_settings_app.h"
|
||||
#include "furi_hal_bt.h"
|
||||
#include "../../desktop_settings/desktop_settings_app.h"
|
||||
|
||||
void bt_settings_app_scene_forget_dev_success_popup_callback(void* context) {
|
||||
BtSettingsApp* app = context;
|
||||
@@ -9,14 +10,22 @@ void bt_settings_app_scene_forget_dev_success_popup_callback(void* context) {
|
||||
void bt_settings_scene_forget_dev_success_on_enter(void* context) {
|
||||
BtSettingsApp* app = context;
|
||||
Popup* popup = app->popup;
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(popup, 32, 5, &I_DolphinNice_96x59);
|
||||
}
|
||||
popup_set_header(popup, "Done", 14, 15, AlignLeft, AlignTop);
|
||||
popup_set_timeout(popup, 1500);
|
||||
popup_set_context(popup, app);
|
||||
popup_set_callback(popup, bt_settings_app_scene_forget_dev_success_popup_callback);
|
||||
popup_enable_timeout(popup);
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, BtSettingsAppViewPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool bt_settings_scene_forget_dev_success_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
@@ -21,14 +21,22 @@ void desktop_settings_scene_pin_disable_on_enter(void* context) {
|
||||
app->settings.pin_code.length = 0;
|
||||
memset(app->settings.pin_code.data, '0', sizeof(app->settings.pin_code.data));
|
||||
DESKTOP_SETTINGS_SAVE(&app->settings);
|
||||
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
|
||||
DESKTOP_SETTINGS_LOAD(settings);
|
||||
|
||||
popup_set_context(app->popup, app);
|
||||
popup_set_callback(app->popup, pin_disable_back_callback);
|
||||
popup_set_icon(app->popup, 0, 2, &I_DolphinMafia_115x62);
|
||||
if (settings->sfw_mode) {
|
||||
popup_set_icon(app->popup, 0, 2, &I_DolphinMafia_115x62_sfw);
|
||||
}
|
||||
else {
|
||||
popup_set_icon(app->popup, 0, 2, &I_DolphinMafia_115x62);
|
||||
}
|
||||
popup_set_header(app->popup, "PIN\nDeleted!", 95, 9, AlignCenter, AlignCenter);
|
||||
popup_set_timeout(app->popup, 1500);
|
||||
popup_enable_timeout(app->popup);
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, DesktopSettingsAppViewIdPopup);
|
||||
free(settings);
|
||||
}
|
||||
|
||||
bool desktop_settings_scene_pin_disable_on_event(void* context, SceneManagerEvent event) {
|
||||
|
||||
BIN
assets/icons/iButton/DolphinMafia_115x62_sfw.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
assets/icons/iButton/DolphinNice_96x59_sfw.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
assets/icons/iButton/DolphinWait_61x59_sfw.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
assets/icons/iButton/iButtonDolphinVerySuccess_108x52_sfw.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |