summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-05-04 14:39:56 +0200
committerDees_Troy <dees_troy@yahoo.com>2013-06-22 23:16:55 +0200
commit83bd483f3db1df4b69c1612030e1a1be05b303ad (patch)
treed5c7b468b831244bfcd90aadda98b9d359d0d280 /gui
parentFix building of updater binary (diff)
downloadandroid_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.tar
android_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.tar.gz
android_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.tar.bz2
android_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.tar.lz
android_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.tar.xz
android_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.tar.zst
android_bootable_recovery-83bd483f3db1df4b69c1612030e1a1be05b303ad.zip
Diffstat (limited to '')
-rw-r--r--gui/action.cpp37
-rwxr-xr-xgui/devices/1024x600/res/ui.xml301
-rw-r--r--gui/devices/1024x768/res/ui.xml301
-rw-r--r--gui/devices/1080x1920/res/ui.xml325
-rw-r--r--gui/devices/1280x800/res/ui.xml301
-rw-r--r--gui/devices/1920x1200/res/ui.xml301
-rw-r--r--gui/devices/2560x1600/res/ui.xml416
-rw-r--r--gui/devices/320x480/res/ui.xml327
-rw-r--r--gui/devices/480x800/res/ui.xml327
-rw-r--r--gui/devices/480x854/res/ui.xml327
-rw-r--r--gui/devices/540x960/res/ui.xml327
-rw-r--r--gui/devices/720x1280/res/ui.xml327
-rwxr-xr-xgui/devices/800x1280/res/ui.xml327
-rwxr-xr-xgui/devices/800x480/res/ui.xml301
14 files changed, 4083 insertions, 162 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index 64049b2c1..9bd5ce5fb 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -31,6 +31,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
+#include <dirent.h>
#include <string>
#include <sstream>
@@ -405,6 +406,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
}
}
operation_end(ret_val, simulate);
+ return 0;
}
if (function == "readBackup")
@@ -494,6 +496,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
PartitionManager.Mount_Current_Storage(true);
}
operation_end(0, simulate);
+ return 0;
}
if (function == "copylog")
@@ -705,6 +708,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
operation_end(0, simulate);
else
operation_end(1, simulate);
+ return 0;
}
if (function == "flash")
@@ -863,6 +867,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
} else
PartitionManager.Update_System_Details();
operation_end(0, simulate);
+ return 0;
}
if (function == "nandroid")
{
@@ -893,12 +898,13 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
return -1;
}
}
+ DataManager::SetValue("tw_encrypt_backup", 0);
if (ret == false)
ret = 1; // 1 for failure
else
ret = 0; // 0 for success
- operation_end(ret, simulate);
- return 0;
+ operation_end(ret, simulate);
+ return 0;
}
if (function == "fixpermissions")
{
@@ -1226,6 +1232,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
DataManager::SetValue("tw_page_done", 1);
}
}
+ return 0;
}
if (function == "installsu")
{
@@ -1257,13 +1264,35 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
operation_end(op_status, simulate);
return 0;
}
+ if (function == "decrypt_backup")
+ {
+ int op_status = 0;
+
+ operation_start("Try Restore Decrypt");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ string Restore_Path, Filename, Password;
+ DataManager::GetValue("tw_restore", Restore_Path);
+ Restore_Path += "/";
+ DataManager::GetValue("tw_restore_password", Password);
+ if (TWFunc::Try_Decrypting_Backup(Restore_Path, Password))
+ op_status = 0; // success
+ else
+ op_status = 1; // fail
+ }
+
+ operation_end(op_status, simulate);
+ return 0;
+ }
}
else
{
- pthread_t t;
- pthread_create(&t, NULL, thread_start, this);
+ pthread_t t;
+ pthread_create(&t, NULL, thread_start, this);
return 0;
}
+ LOGERR("Unknown action '%s'\n", function.c_str());
return -1;
}
diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml
index b24bda381..4835d8294 100755
--- a/gui/devices/1024x600/res/ui.xml
+++ b/gui/devices/1024x600/res/ui.xml
@@ -183,7 +183,7 @@
<variable name="button_fill_full_width" value="512" />
<variable name="button_fill_main_width" value="486" />
<variable name="button_fill_main_height" value="150" />
- <variable name="button_fill_half_height" value="75" />
+ <variable name="button_fill_half_height" value="50" />
<variable name="button_fill_quarter_height" value="30" />
<variable name="button_full_center_x" value="256" />
<variable name="backup_list_x" value="23" />
@@ -191,6 +191,7 @@
<variable name="backup_list_width" value="486" />
<variable name="backup_list_height" value="360" />
<variable name="backup_storage_y" value="250" />
+ <variable name="backup_encrypt_y" value="310" />
<variable name="restore_list_y" value="140" />
<variable name="restore_list_height" value="320" />
<variable name="mount_list_height" value="400" />
@@ -1667,6 +1668,36 @@
</actions>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
<object type="checkbox">
<placement x="%col3_x%" y="%nandcheck_row6%" />
<font resource="font" color="%text_color%" />
@@ -1787,6 +1818,140 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Encrypt your backup? Please enter a password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Encrypt your backup? Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1855,7 +2020,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1872,6 +2037,138 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Backup encrypted. Please enter your password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />
diff --git a/gui/devices/1024x768/res/ui.xml b/gui/devices/1024x768/res/ui.xml
index 5b9c3fcc5..dd53da410 100644
--- a/gui/devices/1024x768/res/ui.xml
+++ b/gui/devices/1024x768/res/ui.xml
@@ -183,7 +183,7 @@
<variable name="button_fill_full_width" value="512" />
<variable name="button_fill_main_width" value="486" />
<variable name="button_fill_main_height" value="150" />
- <variable name="button_fill_half_height" value="75" />
+ <variable name="button_fill_half_height" value="50" />
<variable name="button_fill_quarter_height" value="30" />
<variable name="button_full_center_x" value="256" />
<variable name="backup_list_x" value="23" />
@@ -191,6 +191,7 @@
<variable name="backup_list_width" value="486" />
<variable name="backup_list_height" value="450" />
<variable name="backup_storage_y" value="250" />
+ <variable name="backup_encrypt_y" value="310" />
<variable name="restore_list_y" value="140" />
<variable name="restore_list_height" value="400" />
<variable name="mount_list_height" value="500" />
@@ -1667,6 +1668,36 @@
</actions>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
<object type="checkbox">
<placement x="%col3_x%" y="%nandcheck_row6%" />
<font resource="font" color="%text_color%" />
@@ -1787,6 +1818,140 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Encrypt your backup? Please enter a password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Encrypt your backup? Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1855,7 +2020,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1872,6 +2037,138 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Backup encrypted. Please enter your password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />
diff --git a/gui/devices/1080x1920/res/ui.xml b/gui/devices/1080x1920/res/ui.xml
index 625cad83d..1c757fa19 100644
--- a/gui/devices/1080x1920/res/ui.xml
+++ b/gui/devices/1080x1920/res/ui.xml
@@ -1338,15 +1338,21 @@
<page name="backup">
<object type="template" name="header" />
- <object type="text" color="%text_color%">
- <font resource="font" />
- <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
<text>Backup Name: %tw_backup_name%</text>
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
</object>
<object type="partitionlist">
<highlight color="%fileselector_highlight_color%" />
- <placement x="%listbox_x%" y="%row1_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
<header background="%fileselector_header_background%" textcolor="%fileselector_header_textcolor%" separatorcolor="%fileselector_header_separatorcolor%" separatorheight="%fileselector_header_separatorheight%" />
<fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" />
<text>Select Partitions to Back Up:</text>
@@ -1359,14 +1365,33 @@
</object>
<object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
<highlight color="%highlight_color%" />
<fill color="%button_fill_color%" />
<placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
<font resource="font" color="%button_text_color%" />
- <text>Set Backup Name</text>
+ <text>No Encryption</text>
<actions>
- <action function="set">tw_fileexists=0</action>
- <action function="page">backupname1</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
</actions>
</object>
@@ -1508,6 +1533,152 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter A Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1574,7 +1745,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1591,6 +1762,144 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Your Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />
diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml
index 3ffa79dee..8babda141 100644
--- a/gui/devices/1280x800/res/ui.xml
+++ b/gui/devices/1280x800/res/ui.xml
@@ -183,7 +183,7 @@
<variable name="button_fill_full_width" value="640" />
<variable name="button_fill_main_width" value="609" />
<variable name="button_fill_main_height" value="160" />
- <variable name="button_fill_half_height" value="80" />
+ <variable name="button_fill_half_height" value="53" />
<variable name="button_fill_quarter_height" value="40" />
<variable name="button_full_center_x" value="320" />
<variable name="backup_list_x" value="28" />
@@ -191,6 +191,7 @@
<variable name="backup_list_width" value="609" />
<variable name="backup_list_height" value="440" />
<variable name="backup_storage_y" value="270" />
+ <variable name="backup_encrypt_y" value="330" />
<variable name="restore_list_y" value="140" />
<variable name="restore_list_height" value="400" />
<variable name="mount_list_height" value="600" />
@@ -1667,6 +1668,36 @@
</actions>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
<object type="checkbox">
<placement x="%col3_x%" y="%nandcheck_row6%" />
<font resource="font" color="%text_color%" />
@@ -1787,6 +1818,140 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Encrypt your backup? Please enter a password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Encrypt your backup? Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1855,7 +2020,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1872,6 +2037,138 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Backup encrypted. Please enter your password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />
diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml
index af9aba6a7..0cc4d7e03 100644
--- a/gui/devices/1920x1200/res/ui.xml
+++ b/gui/devices/1920x1200/res/ui.xml
@@ -183,7 +183,7 @@
<variable name="button_fill_full_width" value="960" />
<variable name="button_fill_main_width" value="900" />
<variable name="button_fill_main_height" value="240" />
- <variable name="button_fill_half_height" value="120" />
+ <variable name="button_fill_half_height" value="80" />
<variable name="button_fill_quarter_height" value="60" />
<variable name="button_full_center_x" value="480" />
<variable name="backup_list_x" value="50" />
@@ -191,6 +191,7 @@
<variable name="backup_list_width" value="900" />
<variable name="backup_list_height" value="660" />
<variable name="backup_storage_y" value="405" />
+ <variable name="backup_encrypt_y" value="495" />
<variable name="restore_list_y" value="190" />
<variable name="restore_list_height" value="600" />
<variable name="mount_list_height" value="900" />
@@ -1667,6 +1668,36 @@
</actions>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
<object type="checkbox">
<placement x="%col3_x%" y="%nandcheck_row6%" />
<font resource="font" color="%text_color%" />
@@ -1787,6 +1818,140 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Encrypt your backup? Please enter a password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Encrypt your backup? Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1855,7 +2020,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1872,6 +2037,138 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Backup encrypted. Please enter your password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />
diff --git a/gui/devices/2560x1600/res/ui.xml b/gui/devices/2560x1600/res/ui.xml
index 12c032bd0..c9e6c6960 100644
--- a/gui/devices/2560x1600/res/ui.xml
+++ b/gui/devices/2560x1600/res/ui.xml
@@ -183,7 +183,7 @@
<variable name="button_fill_full_width" value="1280" />
<variable name="button_fill_main_width" value="1200" />
<variable name="button_fill_main_height" value="320" />
- <variable name="button_fill_half_height" value="160" />
+ <variable name="button_fill_half_height" value="107" />
<variable name="button_fill_quarter_height" value="80" />
<variable name="button_full_center_x" value="640" />
<variable name="backup_list_x" value="50" />
@@ -191,6 +191,7 @@
<variable name="backup_list_width" value="1200" />
<variable name="backup_list_height" value="880" />
<variable name="backup_storage_y" value="540" />
+ <variable name="backup_encrypt_y" value="650" />
<variable name="restore_list_y" value="280" />
<variable name="restore_list_height" value="800" />
<variable name="mount_list_height" value="1200" />
@@ -1667,6 +1668,36 @@
</actions>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
<object type="checkbox">
<placement x="%col3_x%" y="%nandcheck_row6%" />
<font resource="font" color="%text_color%" />
@@ -1787,6 +1818,140 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Encrypt your backup? Please enter a password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Encrypt your backup? Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1855,7 +2020,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1872,6 +2037,138 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Backup encrypted. Please enter your password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />
@@ -2297,100 +2594,47 @@
<text>Screen Settings</text>
</object>
- <object type="text" color="%text_color%">
- <font resource="font" />
- <placement x="%center_x%" y="%row4_text_y%" placement="5" />
- <text>Screen Timeout: %tw_screen_timeout_secs% seconds</text>
- </object>
-
<object type="button">
- <placement x="%col1_medium_x%" y="%row2_medium_y%" />
- <font resource="font" color="%button_text_color%" />
- <text>None</text>
- <image resource="medium_button" />
- <action function="set">tw_screen_timeout_secs=0</action>
- </object>
-
- <object type="button">
- <placement x="%col2_medium_x%" y="%row2_medium_y%" />
- <font resource="font" color="%button_text_color%" />
- <text>60</text>
- <image resource="medium_button" />
+ <placement x="%slidervalue_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <condition var1="tw_screen_timeout_secs" op="=" var2="0" />
+ <text>Enable screen timeout.</text>
+ <image resource="checkbox_false" />
<action function="set">tw_screen_timeout_secs=60</action>
</object>
<object type="button">
- <placement x="%col3_medium_x%" y="%row2_medium_y%" />
- <font resource="font" color="%button_text_color%" />
- <text>120</text>
- <image resource="medium_button" />
- <action function="set">tw_screen_timeout_secs=120</action>
- </object>
-
- <object type="button">
- <placement x="%col4_medium_x%" y="%row2_medium_y%" />
- <font resource="font" color="%button_text_color%" />
- <text>180</text>
- <image resource="medium_button" />
- <action function="set">tw_screen_timeout_secs=180</action>
- </object>
-
- <object type="text" color="%text_color%">
- <condition var1="tw_has_brightnesss_file" var2="1" />
- <font resource="font" />
- <placement x="%center_x%" y="%row12_text_y%" placement="5" />
- <text>Brightness: %tw_brightness_display%</text>
- </object>
-
- <object type="button">
- <condition var1="tw_has_brightnesss_file" var2="1" />
- <placement x="%col1_medium_x%" y="%row4_medium_y%" />
- <font resource="font" color="%button_text_color%" />
- <text>25%</text>
- <image resource="medium_button" />
- <actions>
- <action function="cmd">echo %tw_brightness_25% > &quot;%tw_brightness_file%&quot;</action>
- <action function="set">tw_brightness_display=25%</action>
- <action function="set">tw_brightness=%tw_brightness_25%</action>
- </actions>
- </object>
-
- <object type="button">
- <condition var1="tw_has_brightnesss_file" var2="1" />
- <placement x="%col2_medium_x%" y="%row4_medium_y%" />
- <font resource="font" color="%button_text_color%" />
- <text>50%</text>
- <image resource="medium_button" />
- <actions>
- <action function="cmd">echo %tw_brightness_50% > &quot;%tw_brightness_file%&quot;</action>
- <action function="set">tw_brightness_display=50%</action>
- <action function="set">tw_brightness=%tw_brightness_50%</action>
- </actions>
+ <placement x="%slidervalue_x%" y="%row3_text_y%" />
+ <font resource="font" color="%text_color%" />
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <text>Enable screen timeout.</text>
+ <image resource="checkbox_true" />
+ <action function="set">tw_screen_timeout_secs=0</action>
</object>
- <object type="button">
- <condition var1="tw_has_brightnesss_file" var2="1" />
- <placement x="%col3_medium_x%" y="%row4_medium_y%" />
- <font resource="font" color="%button_text_color%" />
- <text>75%</text>
- <image resource="medium_button" />
- <actions>
- <action function="cmd">echo %tw_brightness_75% > &quot;%tw_brightness_file%&quot;</action>
- <action function="set">tw_brightness_display=75%</action>
- <action function="set">tw_brightness=%tw_brightness_75%</action>
- </actions>
+ <object type="slidervalue">
+ <condition var1="tw_screen_timeout_secs" op="!=" var2="0" />
+ <placement x="slidervalue_x" y="%row5_text_y%" w="%slidervalue_w%" />
+ <font resource="font" color="%text_color%" />
+ <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" />
+ <dimensions lineh="%slidervalue_lineh%" linepadding="%slidervalue_padding%" sliderw="%slidervalue_sliderw%" sliderh="%slidervalue_sliderh%" />
+ <text>Screen timeout in seconds:</text>
+ <data variable="tw_screen_timeout_secs" min="15" max="300" />
</object>
- <object type="button">
+ <object type="slidervalue">
<condition var1="tw_has_brightnesss_file" var2="1" />
- <placement x="%col4_medium_x%" y="%row4_medium_y%" />
- <font resource="font" color="%button_text_color%" />
- <text>100%</text>
- <image resource="medium_button" />
- <actions>
- <action function="cmd">echo %tw_brightness_100% > &quot;%tw_brightness_file%&quot;</action>
- <action function="set">tw_brightness_display=100%</action>
- <action function="set">tw_brightness=%tw_brightness_100%</action>
+ <placement x="slidervalue_x" y="%row12_text_y%" w="%slidervalue_w%" />
+ <font resource="font" color="%text_color%" />
+ <colors line="%slidervalue_line_clr%" slider="%slidervalue_slider_clr%" />
+ <dimensions lineh="%slidervalue_lineh%" linepadding="%slidervalue_padding%" sliderw="%slidervalue_sliderw%" sliderh="%slidervalue_sliderh%" />
+ <text>Brightness: %tw_brightness_pct%%</text>
+ <data variable="tw_brightness_pct" min="10" max="100" />
+ <actions>
+ <action function="set">tw_brightness=%tw_brightness_max%</action>
+ <action function="compute">tw_brightness*%tw_brightness_pct%</action>
+ <action function="compute">tw_brightness/100</action>
+ <action function="cmd">echo %tw_brightness% > &quot;%tw_brightness_file%&quot;</action>
</actions>
</object>
diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml
index 66865a7c4..6d258b067 100644
--- a/gui/devices/320x480/res/ui.xml
+++ b/gui/devices/320x480/res/ui.xml
@@ -169,7 +169,7 @@
<variable name="button_fill_main_height" value="81" />
<variable name="button_fill_half_height" value="40" />
<variable name="button_fill_quarter_height" value="24" />
- <variable name="backup_list_height" value="212" />
+ <variable name="backup_list_height" value="193" />
<variable name="backup_button_row1" value="300" />
<variable name="backup_button_row2" value="326" />
<variable name="mount_list_height" value="270" />
@@ -1325,15 +1325,21 @@
<page name="backup">
<object type="template" name="header" />
- <object type="text" color="%text_color%">
- <font resource="font" />
- <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
<text>Backup Name: %tw_backup_name%</text>
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
</object>
<object type="partitionlist">
<highlight color="%fileselector_highlight_color%" />
- <placement x="%listbox_x%" y="%row1_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
<header background="%fileselector_header_background%" textcolor="%fileselector_header_textcolor%" separatorcolor="%fileselector_header_separatorcolor%" separatorheight="%fileselector_header_separatorheight%" />
<fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" />
<text>Select Partitions to Back Up:</text>
@@ -1346,14 +1352,33 @@
</object>
<object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
<highlight color="%highlight_color%" />
<fill color="%button_fill_color%" />
<placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
<font resource="font" color="%button_text_color%" />
- <text>Set Backup Name</text>
+ <text>No Encryption</text>
<actions>
- <action function="set">tw_fileexists=0</action>
- <action function="page">backupname1</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
</actions>
</object>
@@ -1495,6 +1520,152 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter A Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1561,7 +1732,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1578,6 +1749,144 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Your Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />
diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml
index e33e5b1dd..fdebf15f1 100644
--- a/gui/devices/480x800/res/ui.xml
+++ b/gui/devices/480x800/res/ui.xml
@@ -169,7 +169,7 @@
<variable name="button_fill_main_height" value="135" />
<variable name="button_fill_half_height" value="67" />
<variable name="button_fill_quarter_height" value="34" />
- <variable name="backup_list_height" value="325" />
+ <variable name="backup_list_height" value="300" />
<variable name="backup_button_row1" value="480" />
<variable name="backup_button_row2" value="520" />
<variable name="mount_list_height" value="380" />
@@ -1325,15 +1325,21 @@
<page name="backup">
<object type="template" name="header" />
- <object type="text" color="%text_color%">
- <font resource="font" />
- <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
<text>Backup Name: %tw_backup_name%</text>
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
</object>
<object type="partitionlist">
<highlight color="%fileselector_highlight_color%" />
- <placement x="%listbox_x%" y="%row1_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
<header background="%fileselector_header_background%" textcolor="%fileselector_header_textcolor%" separatorcolor="%fileselector_header_separatorcolor%" separatorheight="%fileselector_header_separatorheight%" />
<fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" />
<text>Select Partitions to Back Up:</text>
@@ -1346,14 +1352,33 @@
</object>
<object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
<highlight color="%highlight_color%" />
<fill color="%button_fill_color%" />
<placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
<font resource="font" color="%button_text_color%" />
- <text>Set Backup Name</text>
+ <text>No Encryption</text>
<actions>
- <action function="set">tw_fileexists=0</action>
- <action function="page">backupname1</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
</actions>
</object>
@@ -1495,6 +1520,152 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter A Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1561,7 +1732,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1578,6 +1749,144 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Your Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />
diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml
index e4487f65c..b2a5f4c6d 100644
--- a/gui/devices/480x854/res/ui.xml
+++ b/gui/devices/480x854/res/ui.xml
@@ -168,7 +168,7 @@
<variable name="button_fill_main_height" value="135" />
<variable name="button_fill_half_height" value="67" />
<variable name="button_fill_quarter_height" value="34" />
- <variable name="backup_list_height" value="325" />
+ <variable name="backup_list_height" value="300" />
<variable name="backup_button_row1" value="480" />
<variable name="backup_button_row2" value="520" />
<variable name="mount_list_height" value="380" />
@@ -1324,15 +1324,21 @@
<page name="backup">
<object type="template" name="header" />
- <object type="text" color="%text_color%">
- <font resource="font" />
- <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
<text>Backup Name: %tw_backup_name%</text>
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
</object>
<object type="partitionlist">
<highlight color="%fileselector_highlight_color%" />
- <placement x="%listbox_x%" y="%row1_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
<header background="%fileselector_header_background%" textcolor="%fileselector_header_textcolor%" separatorcolor="%fileselector_header_separatorcolor%" separatorheight="%fileselector_header_separatorheight%" />
<fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" />
<text>Select Partitions to Back Up:</text>
@@ -1345,14 +1351,33 @@
</object>
<object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
<highlight color="%highlight_color%" />
<fill color="%button_fill_color%" />
<placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
<font resource="font" color="%button_text_color%" />
- <text>Set Backup Name</text>
+ <text>No Encryption</text>
<actions>
- <action function="set">tw_fileexists=0</action>
- <action function="page">backupname1</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
</actions>
</object>
@@ -1494,6 +1519,152 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter A Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1560,7 +1731,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1577,6 +1748,144 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Your Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />
diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml
index 6ea2e1c64..c6b0c9252 100644
--- a/gui/devices/540x960/res/ui.xml
+++ b/gui/devices/540x960/res/ui.xml
@@ -169,7 +169,7 @@
<variable name="button_fill_main_height" value="162" />
<variable name="button_fill_half_height" value="81" />
<variable name="button_fill_quarter_height" value="40" />
- <variable name="backup_list_height" value="445" />
+ <variable name="backup_list_height" value="410" />
<variable name="backup_button_row1" value="600" />
<variable name="backup_button_row2" value="645" />
<variable name="mount_list_height" value="500" />
@@ -1325,15 +1325,21 @@
<page name="backup">
<object type="template" name="header" />
- <object type="text" color="%text_color%">
- <font resource="font" />
- <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
<text>Backup Name: %tw_backup_name%</text>
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
</object>
<object type="partitionlist">
<highlight color="%fileselector_highlight_color%" />
- <placement x="%listbox_x%" y="%row1_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
<header background="%fileselector_header_background%" textcolor="%fileselector_header_textcolor%" separatorcolor="%fileselector_header_separatorcolor%" separatorheight="%fileselector_header_separatorheight%" />
<fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" />
<text>Select Partitions to Back Up:</text>
@@ -1346,14 +1352,33 @@
</object>
<object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
<highlight color="%highlight_color%" />
<fill color="%button_fill_color%" />
<placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
<font resource="font" color="%button_text_color%" />
- <text>Set Backup Name</text>
+ <text>No Encryption</text>
<actions>
- <action function="set">tw_fileexists=0</action>
- <action function="page">backupname1</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
</actions>
</object>
@@ -1495,6 +1520,152 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter A Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1561,7 +1732,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1578,6 +1749,144 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Your Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />
diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml
index d43aae95d..548111461 100644
--- a/gui/devices/720x1280/res/ui.xml
+++ b/gui/devices/720x1280/res/ui.xml
@@ -174,7 +174,7 @@
<variable name="button_fill_main_height" value="216" />
<variable name="button_fill_half_height" value="108" />
<variable name="button_fill_quarter_height" value="54" />
- <variable name="backup_list_height" value="570" />
+ <variable name="backup_list_height" value="520" />
<variable name="backup_button_row1" value="745" />
<variable name="backup_button_row2" value="810" />
<variable name="mount_list_height" value="690" />
@@ -1338,15 +1338,21 @@
<page name="backup">
<object type="template" name="header" />
- <object type="text" color="%text_color%">
- <font resource="font" />
- <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
<text>Backup Name: %tw_backup_name%</text>
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
</object>
<object type="partitionlist">
<highlight color="%fileselector_highlight_color%" />
- <placement x="%listbox_x%" y="%row1_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
<header background="%fileselector_header_background%" textcolor="%fileselector_header_textcolor%" separatorcolor="%fileselector_header_separatorcolor%" separatorheight="%fileselector_header_separatorheight%" />
<fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" />
<text>Select Partitions to Back Up:</text>
@@ -1359,14 +1365,33 @@
</object>
<object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
<highlight color="%highlight_color%" />
<fill color="%button_fill_color%" />
<placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
<font resource="font" color="%button_text_color%" />
- <text>Set Backup Name</text>
+ <text>No Encryption</text>
<actions>
- <action function="set">tw_fileexists=0</action>
- <action function="page">backupname1</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
</actions>
</object>
@@ -1508,6 +1533,152 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter A Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1574,7 +1745,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1591,6 +1762,144 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Your Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />
diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml
index f7226f0fa..a6931b238 100755
--- a/gui/devices/800x1280/res/ui.xml
+++ b/gui/devices/800x1280/res/ui.xml
@@ -170,7 +170,7 @@
<variable name="button_fill_main_height" value="240" />
<variable name="button_fill_half_height" value="120" />
<variable name="button_fill_quarter_height" value="54" />
- <variable name="backup_list_height" value="570" />
+ <variable name="backup_list_height" value="520" />
<variable name="backup_button_row1" value="745" />
<variable name="backup_button_row2" value="810" />
<variable name="mount_list_height" value="690" />
@@ -1326,15 +1326,21 @@
<page name="backup">
<object type="template" name="header" />
- <object type="text" color="%text_color%">
- <font resource="font" />
- <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%row1_header_y%" w="%button_fill_full_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
<text>Backup Name: %tw_backup_name%</text>
+ <actions>
+ <action function="set">tw_fileexists=0</action>
+ <action function="page">backupname1</action>
+ </actions>
</object>
<object type="partitionlist">
<highlight color="%fileselector_highlight_color%" />
- <placement x="%listbox_x%" y="%row1_text_y%" w="%listbox_width%" h="%backup_list_height%" />
+ <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%backup_list_height%" />
<header background="%fileselector_header_background%" textcolor="%fileselector_header_textcolor%" separatorcolor="%fileselector_header_separatorcolor%" separatorheight="%fileselector_header_separatorheight%" />
<fastscroll linecolor="%fastscroll_linecolor%" rectcolor="%fastscroll_rectcolor%" w="%fastscroll_w%" linew="%fastscroll_linew%" rectw="%fastscroll_rectw%" recth="%fastscroll_recth%" />
<text>Select Partitions to Back Up:</text>
@@ -1347,14 +1353,33 @@
</object>
<object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
<highlight color="%highlight_color%" />
<fill color="%button_fill_color%" />
<placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
<font resource="font" color="%button_text_color%" />
- <text>Set Backup Name</text>
+ <text>No Encryption</text>
<actions>
- <action function="set">tw_fileexists=0</action>
- <action function="page">backupname1</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col1_x%" y="%backup_button_row1%" w="%button_fill_main_width%" h="%button_fill_quarter_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="set">tw_password_not_match=0</action>
+ <action function="page">backupencryption</action>
</actions>
</object>
@@ -1496,6 +1521,152 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter A Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Encrypt your backup?</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1562,7 +1733,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1579,6 +1750,144 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_header_y%" placement="5" />
+ <text>Backup Encrypted</text>
+ </object>
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row2_text_y%" placement="5" />
+ <text>Please Enter Your Password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%col1_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col1_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%row2_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />
diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml
index bb324dffd..562cb169e 100755
--- a/gui/devices/800x480/res/ui.xml
+++ b/gui/devices/800x480/res/ui.xml
@@ -183,7 +183,7 @@
<variable name="button_fill_full_width" value="400" />
<variable name="button_fill_main_width" value="367" />
<variable name="button_fill_main_height" value="120" />
- <variable name="button_fill_half_height" value="60" />
+ <variable name="button_fill_half_height" value="40" />
<variable name="button_fill_quarter_height" value="30" />
<variable name="button_full_center_x" value="200" />
<variable name="backup_list_x" value="23" />
@@ -191,6 +191,7 @@
<variable name="backup_list_width" value="367" />
<variable name="backup_list_height" value="290" />
<variable name="backup_storage_y" value="190" />
+ <variable name="backup_encrypt_y" value="235" />
<variable name="restore_list_y" value="100" />
<variable name="restore_list_height" value="270" />
<variable name="mount_list_height" value="360" />
@@ -1675,6 +1676,36 @@
</actions>
</object>
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="0" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>No Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <conditions>
+ <condition var1="tw_include_encrypted_backup" var2="1" />
+ <condition var1="tw_encrypt_backup" var2="1" />
+ </conditions>
+ <highlight color="%highlight_color%" />
+ <fill color="%button_fill_color%" />
+ <placement x="%col3_x%" y="%backup_encrypt_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Using Encryption</text>
+ <actions>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+
<object type="checkbox">
<placement x="%col3_x%" y="%nandcheck_row6%" />
<font resource="font" color="%text_color%" />
@@ -1795,6 +1826,140 @@
<object type="template" name="footer" />
</page>
+ <page name="backupencryption">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Encrypt your backup? Please enter a password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display%</text>
+ <data name="tw_backup_password" mask="*" maskvariable="tw_backup_encrypt_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <action function="page">backupencryption2</action>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_not_match" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Passwords Do Not Match</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="backupencryption2">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Encrypt your backup? Please Enter Password Again:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_backup_encrypt_display2%</text>
+ <data name="tw_backup_password2" mask="*" maskvariable="tw_backup_encrypt_display2" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">checkbackuppassword</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col_center_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">backup</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="checkbackuppassword">
+ <object type="action">
+ <condition var1="tw_backup_password2" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=1</action>
+ <action function="page">backup</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_backup_password2" op="!=" var2="tw_backup_password" />
+ <actions>
+ <action function="set">tw_encrypt_backup=0</action>
+ <action function="set">tw_password_not_match=1</action>
+ <action function="set">tw_backup_password=</action>
+ <action function="set">tw_backup_password2=</action>
+ <action function="set">tw_backup_encrypt_display=</action>
+ <action function="set">tw_backup_encrypt_display2=</action>
+ <action function="page">backupencryption</action>
+ </actions>
+ </object>
+ </page>
+
<page name="backup_run">
<object type="template" name="header" />
@@ -1863,7 +2028,7 @@
<condition var1="tw_restore" op="modified" />
<actions>
<action function="readBackup"></action>
- <action function="page">restore_select</action>
+ <action function="page">restore_read</action>
</actions>
</object>
@@ -1880,6 +2045,138 @@
<object type="template" name="footer" />
</page>
+ <page name="restore_read">
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="1" />
+ <actions>
+ <action function="set">tw_password_fail=0</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <condition var1="tw_restore_encrypted" var2="0" />
+ <actions>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
+ <page name="restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Backup encrypted. Please enter your password:</text>
+ </object>
+
+ <object type="input">
+ <placement x="%input_x%" y="%row3_text_y%" w="%input_width%" h="%input_height%" placement="0" />
+ <background color="%input_background_color%" />
+ <cursor color="%input_cursor_color%" hasfocus="1" width="%input_cursor_width%" />
+ <font resource="font" color="%text_color%" />
+ <text>%tw_restore_display%</text>
+ <data name="tw_restore_password" mask="*" maskvariable="tw_restore_display" />
+ <restrict minlen="1" maxlen="32" allow="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_" />
+ <actions>
+ <action function="page">try_restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="text" color="%text_fail_color%">
+ <condition var1="tw_password_fail" var2="1" />
+ <font resource="font" />
+ <placement x="%center_x%" y="%row4_text_y%" placement="5" />
+ <text>Password Failed, Please Try Again</text>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col2_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Cancel</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore</action>
+ </actions>
+ </object>
+
+ <object type="button">
+ <highlight color="%highlight_color%" />
+ <placement x="%col3_x%" y="%cancel_button_y%" />
+ <font resource="font" color="%button_text_color%" />
+ <text>Delete</text>
+ <image resource="main_button" />
+ <actions>
+ <action function="set">tw_back=restore</action>
+ <action function="set">tw_action=cmd</action>
+ <action function="set">tw_action_param=cd %tw_backups_folder% && rm -rf &quot;%tw_restore_name%&quot;</action>
+ <action function="set">tw_text1=Delete Backup? %tw_restore_name%</action>
+ <action function="set">tw_text2=This cannot be undone!</action>
+ <action function="set">tw_action_text1=Deleting Backup...</action>
+ <action function="set">tw_complete_text1=Backup Delete Complete</action>
+ <action function="set">tw_slider_text=Swipe to Delete</action>
+ <action function="page">confirm_action</action>
+ </actions>
+ </object>
+
+ <object type="template" name="keyboardtemplate" />
+
+ <object type="action">
+ <touch key="home" />
+ <action function="page">main</action>
+ </object>
+
+ <object type="action">
+ <touch key="back" />
+ <action function="page">restore</action>
+ </object>
+
+ <object type="template" name="footer" />
+ </page>
+
+ <page name="try_restore_decrypt">
+ <object type="template" name="header" />
+
+ <object type="text" color="%text_color%">
+ <font resource="font" />
+ <placement x="%center_x%" y="%row1_text_y%" placement="5" />
+ <text>Trying Decryption with Your Password</text>
+ </object>
+
+ <object type="template" name="action_page_console" />
+
+ <object type="template" name="progress_bar" />
+
+ <object type="action">
+ <action function="decrypt_backup"></action>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="!=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_password_fail=1</action>
+ <action function="page">restore_decrypt</action>
+ </actions>
+ </object>
+
+ <object type="action">
+ <conditions>
+ <condition var1="tw_operation_state" var2="1" />
+ <condition var1="tw_operation_status" op="=" var2="0" />
+ </conditions>
+ <actions>
+ <action function="set">tw_page_done=1</action>
+ <action function="page">restore_select</action>
+ </actions>
+ </object>
+ </page>
+
<page name="restore_select">
<object type="template" name="header" />