mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 15:08:36 -07:00
sfw_mode support for ibutton added
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user