diff options
Diffstat (limited to '')
-rw-r--r-- | gui/action.cpp | 133 | ||||
-rwxr-xr-x | gui/devices/1024x600/res/ui.xml | 329 | ||||
-rw-r--r-- | gui/devices/1024x768/res/ui.xml | 329 | ||||
-rw-r--r-- | gui/devices/1080x1920/res/ui.xml | 348 | ||||
-rw-r--r-- | gui/devices/1200x1920/res/ui.xml | 348 | ||||
-rw-r--r-- | gui/devices/1280x800/res/ui.xml | 329 | ||||
-rw-r--r-- | gui/devices/1600x2560/res/ui.xml | 363 | ||||
-rw-r--r-- | gui/devices/1920x1200/res/ui.xml | 329 | ||||
-rw-r--r-- | gui/devices/2560x1600/res/ui.xml | 329 | ||||
-rw-r--r-- | gui/devices/320x480/res/ui.xml | 348 | ||||
-rw-r--r-- | gui/devices/480x800/res/ui.xml | 348 | ||||
-rw-r--r-- | gui/devices/480x854/res/ui.xml | 348 | ||||
-rw-r--r-- | gui/devices/540x960/res/ui.xml | 348 | ||||
-rw-r--r-- | gui/devices/720x1280/res/ui.xml | 348 | ||||
-rwxr-xr-x | gui/devices/800x1280/res/ui.xml | 348 | ||||
-rwxr-xr-x | gui/devices/800x480/res/ui.xml | 329 | ||||
-rw-r--r-- | partition.cpp | 96 | ||||
-rw-r--r-- | partitionmanager.cpp | 135 | ||||
-rw-r--r-- | partitions.hpp | 9 |
19 files changed, 5452 insertions, 42 deletions
diff --git a/gui/action.cpp b/gui/action.cpp index 94acf188c..63a8085b1 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -684,6 +684,96 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) operation_end(0, simulate); return 0; } + if (function == "checkpartitionlist") { + string Wipe_List, wipe_path; + int count = 0; + + DataManager::GetValue("tw_wipe_list", Wipe_List); + LOGINFO("checkpartitionlist list '%s'\n", Wipe_List.c_str()); + if (!Wipe_List.empty()) { + size_t start_pos = 0, end_pos = Wipe_List.find(";", start_pos); + while (end_pos != string::npos && start_pos < Wipe_List.size()) { + wipe_path = Wipe_List.substr(start_pos, end_pos - start_pos); + LOGINFO("checkpartitionlist wipe_path '%s'\n", wipe_path.c_str()); + if (wipe_path == "/and-sec" || wipe_path == "DALVIK" || wipe_path == "INTERNAL") { + // Do nothing + } else { + count++; + } + start_pos = end_pos + 1; + end_pos = Wipe_List.find(";", start_pos); + } + DataManager::SetValue("tw_check_partition_list", count); + } else { + DataManager::SetValue("tw_check_partition_list", 0); + } + return 0; + } + if (function == "getpartitiondetails") { + string Wipe_List, wipe_path; + int count = 0; + + DataManager::GetValue("tw_wipe_list", Wipe_List); + LOGINFO("getpartitiondetails list '%s'\n", Wipe_List.c_str()); + if (!Wipe_List.empty()) { + size_t start_pos = 0, end_pos = Wipe_List.find(";", start_pos); + while (end_pos != string::npos && start_pos < Wipe_List.size()) { + wipe_path = Wipe_List.substr(start_pos, end_pos - start_pos); + LOGINFO("getpartitiondetails wipe_path '%s'\n", wipe_path.c_str()); + if (wipe_path == "/and-sec" || wipe_path == "DALVIK" || wipe_path == "INTERNAL") { + // Do nothing + } else { + DataManager::SetValue("tw_partition_path", wipe_path); + break; + } + start_pos = end_pos + 1; + end_pos = Wipe_List.find(";", start_pos); + } + if (!wipe_path.empty()) { + TWPartition* Part = PartitionManager.Find_Partition_By_Path(wipe_path); + if (Part) { + unsigned long long mb = 1048576; + + DataManager::SetValue("tw_partition_name", Part->Display_Name); + DataManager::SetValue("tw_partition_mount_point", Part->Mount_Point); + DataManager::SetValue("tw_partition_file_system", Part->Current_File_System); + DataManager::SetValue("tw_partition_size", Part->Size / mb); + DataManager::SetValue("tw_partition_used", Part->Used / mb); + DataManager::SetValue("tw_partition_free", Part->Free / mb); + DataManager::SetValue("tw_partition_backup_size", Part->Backup_Size / mb); + DataManager::SetValue("tw_partition_removable", Part->Removable); + DataManager::SetValue("tw_partition_is_present", Part->Is_Present); + + if (Part->Can_Repair()) + DataManager::SetValue("tw_partition_can_repair", 1); + else + DataManager::SetValue("tw_partition_can_repair", 0); + if (TWFunc::Path_Exists("/sbin/mkdosfs")) + DataManager::SetValue("tw_partition_vfat", 1); + else + DataManager::SetValue("tw_partition_vfat", 0); + if (TWFunc::Path_Exists("/sbin/mkfs.exfat")) + DataManager::SetValue("tw_partition_exfat", 1); + else + DataManager::SetValue("tw_partition_exfat", 0); + if (TWFunc::Path_Exists("/sbin/mkfs.f2fs")) + DataManager::SetValue("tw_partition_f2fs", 1); + else + DataManager::SetValue("tw_partition_f2fs", 0); + if (TWFunc::Path_Exists("/sbin/mke2fs")) + DataManager::SetValue("tw_partition_ext", 1); + else + DataManager::SetValue("tw_partition_ext", 0); + return 0; + } else { + LOGERR("Unable to locate partition: '%s'\n", wipe_path.c_str()); + } + } + } + DataManager::SetValue("tw_partition_name", ""); + DataManager::SetValue("tw_partition_file_system", ""); + return 0; + } if (isThreaded) { @@ -1282,6 +1372,49 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) operation_end(op_status, simulate); return 0; } + if (function == "repair") + { + int op_status = 0; + + operation_start("Repair Partition"); + if (simulate) { + simulate_progress_bar(); + } else { + string part_path; + DataManager::GetValue("tw_partition_mount_point", part_path); + if (PartitionManager.Repair_By_Path(part_path, true)) { + op_status = 0; // success + } else { + LOGERR("Error repairing file system.\n"); + op_status = 1; // fail + } + } + + operation_end(op_status, simulate); + return 0; + } + if (function == "changefilesystem") + { + int op_status = 0; + + operation_start("Change File System"); + if (simulate) { + simulate_progress_bar(); + } else { + string part_path, file_system; + DataManager::GetValue("tw_partition_mount_point", part_path); + DataManager::GetValue("tw_action_new_file_system", file_system); + if (PartitionManager.Wipe_By_Path(part_path, file_system)) { + op_status = 0; // success + } else { + LOGERR("Error changing file system.\n"); + op_status = 1; // fail + } + } + + operation_end(op_status, simulate); + return 0; + } } else { diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml index f201c679e..92a33c0e1 100755 --- a/gui/devices/1024x600/res/ui.xml +++ b/gui/devices/1024x600/res/ui.xml @@ -1490,7 +1490,7 @@ <object type="partitionlist"> <highlight color="%fileselector_highlight_color%" /> - <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%wipe_list_height%" /> + <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_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 Wipe:</text> @@ -1502,6 +1502,25 @@ <listtype name="wipe" /> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%col3_x%" y="%backup_storage_y%" /> + <text>Invalid partition selection</text> + </object> + <object type="slider"> <placement x="%slider_x%" y="%slider_y%" /> <resource base="slider" used="slider-used" touch="slider-touch" /> @@ -1607,6 +1626,314 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row1_text_y%" /> + <text>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col3_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col3_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col3_x%" y="%row4_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col4_x%" y="%row4_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row1_text_y%" /> + <text>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col4_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> diff --git a/gui/devices/1024x768/res/ui.xml b/gui/devices/1024x768/res/ui.xml index 8d7ded82a..2d8b07cf6 100644 --- a/gui/devices/1024x768/res/ui.xml +++ b/gui/devices/1024x768/res/ui.xml @@ -1490,7 +1490,7 @@ <object type="partitionlist"> <highlight color="%fileselector_highlight_color%" /> - <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%wipe_list_height%" /> + <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_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 Wipe:</text> @@ -1502,6 +1502,25 @@ <listtype name="wipe" /> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%col3_x%" y="%backup_storage_y%" /> + <text>Invalid partition selection</text> + </object> + <object type="slider"> <placement x="%slider_x%" y="%slider_y%" /> <resource base="slider" used="slider-used" touch="slider-touch" /> @@ -1607,6 +1626,314 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row1_text_y%" /> + <text>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col3_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col3_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col3_x%" y="%row4_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col4_x%" y="%row4_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row1_text_y%" /> + <text>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col4_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> diff --git a/gui/devices/1080x1920/res/ui.xml b/gui/devices/1080x1920/res/ui.xml index 96ff6231e..b11e6c134 100644 --- a/gui/devices/1080x1920/res/ui.xml +++ b/gui/devices/1080x1920/res/ui.xml @@ -182,7 +182,8 @@ <variable name="mount_list_height" value="1035" /> <variable name="mount_storage_row" value="1240" /> <variable name="storage_list_height" value="1000" /> - <variable name="wipe_list_height" value="1305" /> + <variable name="wipe_list_height" value="1105" /> + <variable name="wipe_button_row1" value="1350" /> <variable name="wipe_button_y" value="975" /> <variable name="slidervalue_w" value="1060" /> <variable name="slidervalue_line_clr" value="#FFFFFF" /> @@ -1163,7 +1164,10 @@ <font resource="font" color="%button_text_color%" /> <text>Advanced Wipe</text> <image resource="main_button" /> - <action function="page">advancedwipe</action> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="page">advancedwipe</action> + </actions> </object> <object type="button"> @@ -1216,6 +1220,10 @@ <page name="advancedwipe"> <object type="template" name="header" /> + <object type="action"> + <action function="set">tw_wipe_list=</action> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%row1_header_y%" placement="5" /> @@ -1250,6 +1258,25 @@ </actions> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col1_x%" y="%wipe_button_row1%" w="%button_fill_full_width%" h="%button_fill_half_height%" placement="5" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%center_x%" y="%wipe_button_row1%" placement="5" /> + <text>Invalid partition selection</text> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%slider_text_y%" placement="4" /> @@ -1347,6 +1374,320 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <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>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row5_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row5_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <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>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row3_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row4_text_y%" placement="5" /> + <text>file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> @@ -2470,7 +2811,8 @@ <action function="page">screen</action> </object> - <object type="button"> + <object type="button"> + <highlight color="%highlight_color%" /> <placement x="%col1_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> diff --git a/gui/devices/1200x1920/res/ui.xml b/gui/devices/1200x1920/res/ui.xml index f727e677d..313706ce2 100644 --- a/gui/devices/1200x1920/res/ui.xml +++ b/gui/devices/1200x1920/res/ui.xml @@ -185,7 +185,8 @@ <variable name="mount_list_height" value="1035" /> <variable name="mount_storage_row" value="1240" /> <variable name="storage_list_height" value="1000" /> - <variable name="wipe_list_height" value="1305" /> + <variable name="wipe_list_height" value="1105" /> + <variable name="wipe_button_row1" value="1350" /> <variable name="wipe_button_y" value="975" /> <variable name="slidervalue_w" value="1180" /> <variable name="slidervalue_line_clr" value="#FFFFFF" /> @@ -1166,7 +1167,10 @@ <font resource="font" color="%button_text_color%" /> <text>Advanced Wipe</text> <image resource="main_button" /> - <action function="page">advancedwipe</action> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="page">advancedwipe</action> + </actions> </object> <object type="button"> @@ -1219,6 +1223,10 @@ <page name="advancedwipe"> <object type="template" name="header" /> + <object type="action"> + <action function="set">tw_wipe_list=</action> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%row1_header_y%" placement="5" /> @@ -1253,6 +1261,25 @@ </actions> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col1_x%" y="%wipe_button_row1%" w="%button_fill_full_width%" h="%button_fill_half_height%" placement="5" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%center_x%" y="%wipe_button_row1%" placement="5" /> + <text>Invalid partition selection</text> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%slider_text_y%" placement="4" /> @@ -1350,6 +1377,320 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <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>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row5_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row5_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <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>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row3_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row4_text_y%" placement="5" /> + <text>file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> @@ -2473,7 +2814,8 @@ <action function="page">screen</action> </object> - <object type="button"> + <object type="button"> + <highlight color="%highlight_color%" /> <placement x="%col1_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> diff --git a/gui/devices/1280x800/res/ui.xml b/gui/devices/1280x800/res/ui.xml index 2c61b7776..d52d3efcf 100644 --- a/gui/devices/1280x800/res/ui.xml +++ b/gui/devices/1280x800/res/ui.xml @@ -1490,7 +1490,7 @@ <object type="partitionlist"> <highlight color="%fileselector_highlight_color%" /> - <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%wipe_list_height%" /> + <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_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 Wipe:</text> @@ -1502,6 +1502,25 @@ <listtype name="wipe" /> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%col3_x%" y="%backup_storage_y%" /> + <text>Invalid partition selection</text> + </object> + <object type="slider"> <placement x="%slider_x%" y="%slider_y%" /> <resource base="slider" used="slider-used" touch="slider-touch" /> @@ -1607,6 +1626,314 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row1_text_y%" /> + <text>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col3_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col3_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col3_x%" y="%row4_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col4_x%" y="%row4_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row1_text_y%" /> + <text>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col4_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> diff --git a/gui/devices/1600x2560/res/ui.xml b/gui/devices/1600x2560/res/ui.xml index 1873d0b24..bb28c0a54 100644 --- a/gui/devices/1600x2560/res/ui.xml +++ b/gui/devices/1600x2560/res/ui.xml @@ -185,7 +185,8 @@ <variable name="mount_list_height" value="1377" /> <variable name="mount_storage_row" value="1649" /> <variable name="storage_list_height" value="1330" /> - <variable name="wipe_list_height" value="1736" /> + <variable name="wipe_list_height" value="1620" /> + <variable name="wipe_button_row1" value="1884" /> <variable name="wipe_button_y" value="1298" /> <variable name="slidervalue_w" value="1569" /> <variable name="slidervalue_line_clr" value="#FFFFFF" /> @@ -1168,7 +1169,10 @@ <font resource="font" color="%button_text_color%" /> <text>Advanced Wipe</text> <image resource="main_button" /> - <action function="page">advancedwipe</action> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="page">advancedwipe</action> + </actions> </object> <object type="button"> @@ -1221,6 +1225,10 @@ <page name="advancedwipe"> <object type="template" name="header" /> + <object type="action"> + <action function="set">tw_wipe_list=</action> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%row1_header_y%" placement="5" /> @@ -1255,6 +1263,25 @@ </actions> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col1_x%" y="%wipe_button_row1%" w="%button_fill_full_width%" h="%button_fill_half_height%" placement="5" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%center_x%" y="%wipe_button_row1%" placement="5" /> + <text>Invalid partition selection</text> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%slider_text_y%" placement="4" /> @@ -1352,6 +1379,320 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <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>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row5_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row5_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <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>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row3_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row4_text_y%" placement="5" /> + <text>file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> @@ -2477,19 +2818,20 @@ <object type="button"> <highlight color="%highlight_color%" /> - <placement x="%col2_x%" y="%row4_y%" /> + <placement x="%col1_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Vibration Duration</text> + <text>Restore Defaults</text> <image resource="main_button" /> - <action function="page">Vibrate</action> + <action function="restoredefaultsettings"></action> </object> <object type="button"> - <placement x="%col_x%" y="%row4_y%" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> - <text>Restore Defaults</text> + <text>Vibration Duration</text> <image resource="main_button" /> - <action function="restoredefaultsettings"></action> + <action function="page">Vibrate</action> </object> <object type="action"> @@ -2538,7 +2880,6 @@ <listitem name="(UTC +5) Yekaterinburg, Islamabad">PAKST-5;PAKDT</listitem> <listitem name="(UTC +6) Almaty, Dhaka, Colombo">TASHST-6;TASHDT</listitem> <listitem name="(UTC +7) Bangkok, Hanoi, Jakarta">THAIST-7;THAIDT</listitem> - <listitem name="(UTC +8) Beijing, Singapore, Hong Kong">TAIST-8;TAIDT</listitem> <listitem name="(UTC +9) Tokyo, Seoul, Yakutsk">JST-9;JSTDT</listitem> <listitem name="(UTC +10) Eastern Australia, Guam">EET-10;EETDT</listitem> @@ -3558,7 +3899,7 @@ <resource base="slider" used="slider-used" touch="slider-touch" /> <action function="page">filemanageracction</action> </object> - + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%slider_text_y%" placement="4" /> @@ -3574,7 +3915,7 @@ <touch key="home" /> <action function="page">main</action> </object> - + <object type="template" name="footer" /> </page> diff --git a/gui/devices/1920x1200/res/ui.xml b/gui/devices/1920x1200/res/ui.xml index 1a8daf9ef..d0ab97731 100644 --- a/gui/devices/1920x1200/res/ui.xml +++ b/gui/devices/1920x1200/res/ui.xml @@ -1490,7 +1490,7 @@ <object type="partitionlist"> <highlight color="%fileselector_highlight_color%" /> - <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%wipe_list_height%" /> + <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_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 Wipe:</text> @@ -1502,6 +1502,25 @@ <listtype name="wipe" /> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%col3_x%" y="%backup_storage_y%" /> + <text>Invalid partition selection</text> + </object> + <object type="slider"> <placement x="%slider_x%" y="%slider_y%" /> <resource base="slider" used="slider-used" touch="slider-touch" /> @@ -1607,6 +1626,314 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row1_text_y%" /> + <text>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col3_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col3_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col3_x%" y="%row4_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col4_x%" y="%row4_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row1_text_y%" /> + <text>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col4_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> diff --git a/gui/devices/2560x1600/res/ui.xml b/gui/devices/2560x1600/res/ui.xml index d04288966..65dc8e8f2 100644 --- a/gui/devices/2560x1600/res/ui.xml +++ b/gui/devices/2560x1600/res/ui.xml @@ -1490,7 +1490,7 @@ <object type="partitionlist"> <highlight color="%fileselector_highlight_color%" /> - <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%wipe_list_height%" /> + <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_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 Wipe:</text> @@ -1502,6 +1502,25 @@ <listtype name="wipe" /> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%col3_x%" y="%backup_storage_y%" /> + <text>Invalid partition selection</text> + </object> + <object type="slider"> <placement x="%slider_x%" y="%slider_y%" /> <resource base="slider" used="slider-used" touch="slider-touch" /> @@ -1607,6 +1626,314 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row1_text_y%" /> + <text>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col3_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col3_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col3_x%" y="%row4_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col4_x%" y="%row4_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row1_text_y%" /> + <text>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col4_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> diff --git a/gui/devices/320x480/res/ui.xml b/gui/devices/320x480/res/ui.xml index cf17d1a2c..f8903a53b 100644 --- a/gui/devices/320x480/res/ui.xml +++ b/gui/devices/320x480/res/ui.xml @@ -177,7 +177,8 @@ <variable name="mount_list_height" value="270" /> <variable name="mount_storage_row" value="340" /> <variable name="storage_list_height" value="290" /> - <variable name="wipe_list_height" value="330" /> + <variable name="wipe_list_height" value="270" /> + <variable name="wipe_button_row1" value="350" /> <variable name="wipe_button_y" value="270" /> <variable name="slidervalue_w" value="304" /> <variable name="slidervalue_line_clr" value="#FFFFFF" /> @@ -1150,7 +1151,10 @@ <font resource="font" color="%button_text_color%" /> <text>Advanced Wipe</text> <image resource="main_button" /> - <action function="page">advancedwipe</action> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="page">advancedwipe</action> + </actions> </object> <object type="button"> @@ -1203,6 +1207,10 @@ <page name="advancedwipe"> <object type="template" name="header" /> + <object type="action"> + <action function="set">tw_wipe_list=</action> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%row1_header_y%" placement="5" /> @@ -1237,6 +1245,25 @@ </actions> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col1_x%" y="%wipe_button_row1%" w="%button_fill_full_width%" h="%button_fill_half_height%" placement="5" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%center_x%" y="%wipe_button_row1%" placement="5" /> + <text>Invalid partition selection</text> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%slider_text_y%" placement="4" /> @@ -1334,6 +1361,320 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <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>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row5_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row5_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <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>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row3_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row4_text_y%" placement="5" /> + <text>file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> @@ -2457,7 +2798,8 @@ <action function="page">screen</action> </object> - <object type="button"> + <object type="button"> + <highlight color="%highlight_color%" /> <placement x="%col1_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> diff --git a/gui/devices/480x800/res/ui.xml b/gui/devices/480x800/res/ui.xml index 96fc5c4ba..db78cd752 100644 --- a/gui/devices/480x800/res/ui.xml +++ b/gui/devices/480x800/res/ui.xml @@ -177,7 +177,8 @@ <variable name="mount_list_height" value="380" /> <variable name="mount_storage_row" value="500" /> <variable name="storage_list_height" value="400" /> - <variable name="wipe_list_height" value="550" /> + <variable name="wipe_list_height" value="460" /> + <variable name="wipe_button_row1" value="600" /> <variable name="wipe_button_y" value="400" /> <variable name="slidervalue_w" value="460" /> <variable name="slidervalue_line_clr" value="#FFFFFF" /> @@ -1150,7 +1151,10 @@ <font resource="font" color="%button_text_color%" /> <text>Advanced Wipe</text> <image resource="main_button" /> - <action function="page">advancedwipe</action> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="page">advancedwipe</action> + </actions> </object> <object type="button"> @@ -1203,6 +1207,10 @@ <page name="advancedwipe"> <object type="template" name="header" /> + <object type="action"> + <action function="set">tw_wipe_list=</action> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%row1_header_y%" placement="5" /> @@ -1237,6 +1245,25 @@ </actions> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col1_x%" y="%wipe_button_row1%" w="%button_fill_full_width%" h="%button_fill_half_height%" placement="5" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%center_x%" y="%wipe_button_row1%" placement="5" /> + <text>Invalid partition selection</text> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%slider_text_y%" placement="4" /> @@ -1334,6 +1361,320 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <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>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row5_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row5_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <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>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row3_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row4_text_y%" placement="5" /> + <text>file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> @@ -2457,7 +2798,8 @@ <action function="page">screen</action> </object> - <object type="button"> + <object type="button"> + <highlight color="%highlight_color%" /> <placement x="%col1_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> diff --git a/gui/devices/480x854/res/ui.xml b/gui/devices/480x854/res/ui.xml index 330f93931..617c19669 100644 --- a/gui/devices/480x854/res/ui.xml +++ b/gui/devices/480x854/res/ui.xml @@ -176,7 +176,8 @@ <variable name="mount_list_height" value="380" /> <variable name="mount_storage_row" value="500" /> <variable name="storage_list_height" value="400" /> - <variable name="wipe_list_height" value="550" /> + <variable name="wipe_list_height" value="460" /> + <variable name="wipe_button_row1" value="600" /> <variable name="wipe_button_y" value="400" /> <variable name="slidervalue_w" value="460" /> <variable name="slidervalue_line_clr" value="#FFFFFF" /> @@ -1149,7 +1150,10 @@ <font resource="font" color="%button_text_color%" /> <text>Advanced Wipe</text> <image resource="main_button" /> - <action function="page">advancedwipe</action> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="page">advancedwipe</action> + </actions> </object> <object type="button"> @@ -1202,6 +1206,10 @@ <page name="advancedwipe"> <object type="template" name="header" /> + <object type="action"> + <action function="set">tw_wipe_list=</action> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%row1_header_y%" placement="5" /> @@ -1236,6 +1244,25 @@ </actions> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col1_x%" y="%wipe_button_row1%" w="%button_fill_full_width%" h="%button_fill_half_height%" placement="5" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%center_x%" y="%wipe_button_row1%" placement="5" /> + <text>Invalid partition selection</text> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%slider_text_y%" placement="4" /> @@ -1333,6 +1360,320 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <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>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row5_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row5_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <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>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row3_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row4_text_y%" placement="5" /> + <text>file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> @@ -2456,7 +2797,8 @@ <action function="page">screen</action> </object> - <object type="button"> + <object type="button"> + <highlight color="%highlight_color%" /> <placement x="%col1_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> diff --git a/gui/devices/540x960/res/ui.xml b/gui/devices/540x960/res/ui.xml index 75262bb92..b6fcc6000 100644 --- a/gui/devices/540x960/res/ui.xml +++ b/gui/devices/540x960/res/ui.xml @@ -177,7 +177,8 @@ <variable name="mount_list_height" value="500" /> <variable name="mount_storage_row" value="630" /> <variable name="storage_list_height" value="575" /> - <variable name="wipe_list_height" value="670" /> + <variable name="wipe_list_height" value="570" /> + <variable name="wipe_button_row1" value="700" /> <variable name="wipe_button_y" value="475" /> <variable name="slidervalue_w" value="520" /> <variable name="slidervalue_line_clr" value="#FFFFFF" /> @@ -1150,7 +1151,10 @@ <font resource="font" color="%button_text_color%" /> <text>Advanced Wipe</text> <image resource="main_button" /> - <action function="page">advancedwipe</action> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="page">advancedwipe</action> + </actions> </object> <object type="button"> @@ -1203,6 +1207,10 @@ <page name="advancedwipe"> <object type="template" name="header" /> + <object type="action"> + <action function="set">tw_wipe_list=</action> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%row1_header_y%" placement="5" /> @@ -1237,6 +1245,25 @@ </actions> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col1_x%" y="%wipe_button_row1%" w="%button_fill_full_width%" h="%button_fill_half_height%" placement="5" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%center_x%" y="%wipe_button_row1%" placement="5" /> + <text>Invalid partition selection</text> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%slider_text_y%" placement="4" /> @@ -1334,6 +1361,320 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <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>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row5_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row5_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <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>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row3_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row4_text_y%" placement="5" /> + <text>file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> @@ -2457,7 +2798,8 @@ <action function="page">screen</action> </object> - <object type="button"> + <object type="button"> + <highlight color="%highlight_color%" /> <placement x="%col1_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> diff --git a/gui/devices/720x1280/res/ui.xml b/gui/devices/720x1280/res/ui.xml index 83f7c409b..763fa44d0 100644 --- a/gui/devices/720x1280/res/ui.xml +++ b/gui/devices/720x1280/res/ui.xml @@ -182,7 +182,8 @@ <variable name="mount_list_height" value="690" /> <variable name="mount_storage_row" value="820" /> <variable name="storage_list_height" value="775" /> - <variable name="wipe_list_height" value="870" /> + <variable name="wipe_list_height" value="670" /> + <variable name="wipe_button_row1" value="900" /> <variable name="wipe_button_y" value="650" /> <variable name="slidervalue_w" value="700" /> <variable name="slidervalue_line_clr" value="#FFFFFF" /> @@ -1163,7 +1164,10 @@ <font resource="font" color="%button_text_color%" /> <text>Advanced Wipe</text> <image resource="main_button" /> - <action function="page">advancedwipe</action> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="page">advancedwipe</action> + </actions> </object> <object type="button"> @@ -1216,6 +1220,10 @@ <page name="advancedwipe"> <object type="template" name="header" /> + <object type="action"> + <action function="set">tw_wipe_list=</action> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%row1_header_y%" placement="5" /> @@ -1250,6 +1258,25 @@ </actions> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col1_x%" y="%wipe_button_row1%" w="%button_fill_full_width%" h="%button_fill_half_height%" placement="5" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%center_x%" y="%wipe_button_row1%" placement="5" /> + <text>Invalid partition selection</text> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%slider_text_y%" placement="4" /> @@ -1347,6 +1374,320 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <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>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row5_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row5_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <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>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row3_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row4_text_y%" placement="5" /> + <text>file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> @@ -2470,7 +2811,8 @@ <action function="page">screen</action> </object> - <object type="button"> + <object type="button"> + <highlight color="%highlight_color%" /> <placement x="%col1_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> diff --git a/gui/devices/800x1280/res/ui.xml b/gui/devices/800x1280/res/ui.xml index b70837bc7..134b899c9 100755 --- a/gui/devices/800x1280/res/ui.xml +++ b/gui/devices/800x1280/res/ui.xml @@ -178,7 +178,8 @@ <variable name="mount_list_height" value="690" /> <variable name="mount_storage_row" value="830" /> <variable name="storage_list_height" value="775" /> - <variable name="wipe_list_height" value="870" /> + <variable name="wipe_list_height" value="670" /> + <variable name="wipe_button_row1" value="900" /> <variable name="wipe_button_y" value="650" /> <variable name="slidervalue_w" value="780" /> <variable name="slidervalue_line_clr" value="#FFFFFF" /> @@ -1151,7 +1152,10 @@ <font resource="font" color="%button_text_color%" /> <text>Advanced Wipe</text> <image resource="main_button" /> - <action function="page">advancedwipe</action> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="page">advancedwipe</action> + </actions> </object> <object type="button"> @@ -1204,6 +1208,10 @@ <page name="advancedwipe"> <object type="template" name="header" /> + <object type="action"> + <action function="set">tw_wipe_list=</action> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%row1_header_y%" placement="5" /> @@ -1238,6 +1246,25 @@ </actions> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col1_x%" y="%wipe_button_row1%" w="%button_fill_full_width%" h="%button_fill_half_height%" placement="5" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%center_x%" y="%wipe_button_row1%" placement="5" /> + <text>Invalid partition selection</text> + </object> + <object type="text" color="%text_color%"> <font resource="font" /> <placement x="%center_x%" y="%slider_text_y%" placement="4" /> @@ -1335,6 +1362,320 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <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>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col1_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row5_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row5_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <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>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row3_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row4_text_y%" placement="5" /> + <text>file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row3_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row4_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> @@ -2458,7 +2799,8 @@ <action function="page">screen</action> </object> - <object type="button"> + <object type="button"> + <highlight color="%highlight_color%" /> <placement x="%col1_x%" y="%row4_y%" /> <font resource="font" color="%button_text_color%" /> <text>Restore Defaults</text> diff --git a/gui/devices/800x480/res/ui.xml b/gui/devices/800x480/res/ui.xml index de693f17d..2af9c9c76 100755 --- a/gui/devices/800x480/res/ui.xml +++ b/gui/devices/800x480/res/ui.xml @@ -1498,7 +1498,7 @@ <object type="partitionlist"> <highlight color="%fileselector_highlight_color%" /> - <placement x="%listbox_x%" y="%row2_text_y%" w="%listbox_width%" h="%wipe_list_height%" /> + <placement x="%backup_list_x%" y="%backup_list_y%" w="%backup_list_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 Wipe:</text> @@ -1510,6 +1510,25 @@ <listtype name="wipe" /> </object> + <object type="button"> + <highlight color="%highlight_color%" /> + <fill color="%button_fill_color%" /> + <placement x="%col3_x%" y="%backup_storage_y%" w="%button_fill_main_width%" h="%button_fill_half_height%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair or Change File System</text> + <actions> + <action function="checkpartitionlist"></action> + <action function="page">checkpartitionlist</action> + </actions> + </object> + + <object type="text" color="%text_fail_color%"> + <condition var1="partitionlisterror" var2="1" /> + <font resource="font" /> + <placement x="%col3_x%" y="%backup_storage_y%" /> + <text>Invalid partition selection</text> + </object> + <object type="slider"> <placement x="%slider_x%" y="%slider_y%" /> <resource base="slider" used="slider-used" touch="slider-touch" /> @@ -1615,6 +1634,314 @@ </object> </page> + <page name="checkpartitionlist"> + <object type="action"> + <condition var1="tw_check_partition_list" op="=" var2="1" /> + <actions> + <action function="set">partitionlisterror=0</action> + <action function="getpartitiondetails"></action> + <action function="page">partitionoptions</action> + </actions> + </object> + + <object type="action"> + <condition var1="tw_check_partition_list" op="!=" var2="1" /> + <actions> + <action function="set">partitionlisterror=1</action> + <action function="set">tw_wipe_list=</action> + <action function="page">advancedwipe</action> + </actions> + </object> + </page> + + <page name="partitionoptions"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row1_text_y%" /> + <text>Partition Options for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Present: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_is_present" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col2_x%" y="%row3_text_y%" /> + <text>Present: No</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="!=" var2="0" /> + <font resource="font" /> + <placement x="%col3_x%" y="%row3_text_y%" /> + <text>Removable: Yes</text> + </object> + + <object type="text" color="%text_color%"> + <condition var1="tw_partition_removable" op="=" var2="0" /> + <font resource="font" /> + <placement x="%col3_x%" y="%row3_text_y%" /> + <text>Removable: No</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row4_text_y%" /> + <text>Size: %tw_partition_size%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col2_x%" y="%row4_text_y%" /> + <text>Used: %tw_partition_used%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col3_x%" y="%row4_text_y%" /> + <text>Free: %tw_partition_free%MB</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col4_x%" y="%row4_text_y%" /> + <text>Backup Size: %tw_partition_backup_size%MB</text> + </object> + + <object type="button"> + <condition var1="tw_partition_can_repair" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Repair</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=partitionoptions</action> + <action function="set">tw_action=repair</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Repair %tw_partition_name%?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Repairing...</action> + <action function="set">tw_complete_text1=Repair Complete</action> + <action function="set">tw_slider_text=Swipe to Repair</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>Change File System</text> + <image resource="main_button" /> + <action function="page">selectfilesystem</action> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">advancedwipe</action> + </object> + + <object type="template" name="footer" /> + </page> + + <page name="selectfilesystem"> + <object type="template" name="header" /> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col1_x%" y="%row1_text_y%" /> + <text>Change file system for: %tw_partition_name%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%col_right_x%" y="%row1_text_y%" placement="1" /> + <text>Mount Point: %tw_partition_mount_point%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row1_text_y%" placement="5" /> + <text>Current file system: %tw_partition_file_system%</text> + </object> + + <object type="text" color="%text_color%"> + <font resource="font" /> + <placement x="%center_x%" y="%row2_text_y%" placement="5" /> + <text>Some ROMs or kernels may not support some file systems. Proceed with caution!</text> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col1_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT2</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext2</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT2?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT3</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext3</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT3?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_ext" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>EXT4</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=ext4</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to EXT4?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_f2fs" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col4_x%" y="%row1_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>F2FS</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=f2fs</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to F2FS?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_vfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col2_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>FAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=vfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to FAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="button"> + <condition var1="tw_partition_exfat" op="=" var2="1" /> + <highlight color="%highlight_color%" /> + <placement x="%col3_x%" y="%row2_y%" /> + <font resource="font" color="%button_text_color%" /> + <text>exFAT</text> + <image resource="main_button" /> + <actions> + <action function="set">tw_back=selectfilesystem</action> + <action function="set">tw_action=changefilesystem</action> + <action function="set">tw_action_param=%tw_partition_mount_point%</action> + <action function="set">tw_action_new_file_system=exfat</action> + <action function="set">tw_has_action2=0</action> + <action function="set">tw_text1=Change %tw_partition_name% to exFAT?</action> + <action function="set">tw_text2=</action> + <action function="set">tw_action_text1=Formatting...</action> + <action function="set">tw_complete_text1=Format Complete</action> + <action function="set">tw_slider_text=Swipe to Change</action> + <action function="page">confirm_action</action> + </actions> + </object> + + <object type="action"> + <touch key="home" /> + <action function="page">main</action> + </object> + + <object type="action"> + <touch key="back" /> + <action function="page">partitionoptions</action> + </object> + + <object type="template" name="footer" /> + </page> + <page name="backup"> <object type="template" name="header" /> diff --git a/partition.cpp b/partition.cpp index e554ac7eb..e92fccfd2 100644 --- a/partition.cpp +++ b/partition.cpp @@ -1105,7 +1105,7 @@ bool TWPartition::Wipe(string New_File_System) { else unlink("/.layout_version"); - if (Has_Data_Media) { + if (Has_Data_Media && Current_File_System == New_File_System) { wiped = Wipe_Data_Without_Wiping_Media(); } else { @@ -1185,6 +1185,100 @@ bool TWPartition::Wipe_AndSec(void) { return true; } +bool TWPartition::Can_Repair() { + if (Current_File_System == "vfat" && TWFunc::Path_Exists("/sbin/dosfsck")) + return true; + else if ((Current_File_System == "ext2" || Current_File_System == "ext3" || Current_File_System == "ext4") && TWFunc::Path_Exists("/sbin/e2fsck")) + return true; + else if (Current_File_System == "exfat" && TWFunc::Path_Exists("/sbin/fsck.exfat")) + return true; + else if (Current_File_System == "f2fs" && TWFunc::Path_Exists("/sbin/fsck.f2fs")) + return true; + return false; +} + +bool TWPartition::Repair() { + string command; + + if (Current_File_System == "vfat") { + if (!TWFunc::Path_Exists("/sbin/dosfsck")) { + gui_print("dosfsck does not exist! Cannot repair!\n"); + return false; + } + if (!UnMount(true)) + return false; + gui_print("Repairing %s using dosfsck...\n", Display_Name.c_str()); + Find_Actual_Block_Device(); + command = "/sbin/dosfsck -y " + Actual_Block_Device; + LOGINFO("Repair command: %s\n", command.c_str()); + if (TWFunc::Exec_Cmd(command) == 0) { + gui_print("Done.\n"); + return true; + } else { + LOGERR("Unable to repair '%s'.\n", Mount_Point.c_str()); + return false; + } + } + if (Current_File_System == "ext2" || Current_File_System == "ext3" || Current_File_System == "ext4") { + if (!TWFunc::Path_Exists("/sbin/e2fsck")) { + gui_print("e2fsck does not exist! Cannot repair!\n"); + return false; + } + if (!UnMount(true)) + return false; + gui_print("Repairing %s using e2fsck...\n", Display_Name.c_str()); + Find_Actual_Block_Device(); + command = "/sbin/e2fsck -p " + Actual_Block_Device; + LOGINFO("Repair command: %s\n", command.c_str()); + if (TWFunc::Exec_Cmd(command) == 0) { + gui_print("Done.\n"); + return true; + } else { + LOGERR("Unable to repair '%s'.\n", Mount_Point.c_str()); + return false; + } + } + if (Current_File_System == "exfat") { + if (!TWFunc::Path_Exists("/sbin/fsck.exfat")) { + gui_print("fsck.exfat does not exist! Cannot repair!\n"); + return false; + } + if (!UnMount(true)) + return false; + gui_print("Repairing %s using fsck.exfat...\n", Display_Name.c_str()); + Find_Actual_Block_Device(); + command = "/sbin/fsck.exfat " + Actual_Block_Device; + LOGINFO("Repair command: %s\n", command.c_str()); + if (TWFunc::Exec_Cmd(command) == 0) { + gui_print("Done.\n"); + return true; + } else { + LOGERR("Unable to repair '%s'.\n", Mount_Point.c_str()); + return false; + } + } + if (Current_File_System == "f2fs") { + if (!TWFunc::Path_Exists("/sbin/fsck.f2fs")) { + gui_print("fsck.f2fs does not exist! Cannot repair!\n"); + return false; + } + if (!UnMount(true)) + return false; + gui_print("Repairing %s using fsck.f2fs...\n", Display_Name.c_str()); + Find_Actual_Block_Device(); + command = "/sbin/fsck.f2fs " + Actual_Block_Device; + LOGINFO("Repair command: %s\n", command.c_str()); + if (TWFunc::Exec_Cmd(command) == 0) { + gui_print("Done.\n"); + return true; + } else { + LOGERR("Unable to repair '%s'.\n", Mount_Point.c_str()); + return false; + } + } + return false; +} + bool TWPartition::Backup(string backup_folder) { if (Backup_Method == FILES) return Backup_Tar(backup_folder); diff --git a/partitionmanager.cpp b/partitionmanager.cpp index be4ba6359..452e5c245 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -1096,6 +1096,69 @@ int TWPartitionManager::Wipe_By_Name(string Name) { return false; } +int TWPartitionManager::Wipe_By_Path(string Path, string New_File_System) { + std::vector<TWPartition*>::iterator iter; + int ret = false; + bool found = false; + string Local_Path = TWFunc::Get_Root_Path(Path); + + // Iterate through all partitions + for (iter = Partitions.begin(); iter != Partitions.end(); iter++) { + if ((*iter)->Mount_Point == Local_Path || (!(*iter)->Symlink_Mount_Point.empty() && (*iter)->Symlink_Mount_Point == Local_Path)) { + if (Path == "/and-sec") + ret = (*iter)->Wipe_AndSec(); + else + ret = (*iter)->Wipe(New_File_System); + found = true; + } else if ((*iter)->Is_SubPartition && (*iter)->SubPartition_Of == Local_Path) { + (*iter)->Wipe(New_File_System); + } + } + if (found) { + return ret; + } else + LOGERR("Wipe: Unable to find partition for path '%s'\n", Local_Path.c_str()); + return false; +} + +int TWPartitionManager::Wipe_By_Block(string Block, string New_File_System) { + TWPartition* Part = Find_Partition_By_Block(Block); + + if (Part) { + if (Part->Has_SubPartition) { + std::vector<TWPartition*>::iterator subpart; + + for (subpart = Partitions.begin(); subpart != Partitions.end(); subpart++) { + if ((*subpart)->Is_SubPartition && (*subpart)->SubPartition_Of == Part->Mount_Point) + (*subpart)->Wipe(New_File_System); + } + return Part->Wipe(New_File_System); + } else + return Part->Wipe(New_File_System); + } + LOGERR("Wipe: Unable to find partition for block '%s'\n", Block.c_str()); + return false; +} + +int TWPartitionManager::Wipe_By_Name(string Name, string New_File_System) { + TWPartition* Part = Find_Partition_By_Name(Name); + + if (Part) { + if (Part->Has_SubPartition) { + std::vector<TWPartition*>::iterator subpart; + + for (subpart = Partitions.begin(); subpart != Partitions.end(); subpart++) { + if ((*subpart)->Is_SubPartition && (*subpart)->SubPartition_Of == Part->Mount_Point) + (*subpart)->Wipe(); + } + return Part->Wipe(New_File_System); + } else + return Part->Wipe(New_File_System); + } + LOGERR("Wipe: Unable to find partition for name '%s'\n", Name.c_str()); + return false; +} + int TWPartitionManager::Factory_Reset(void) { std::vector<TWPartition*>::iterator iter; int ret = true; @@ -1234,6 +1297,78 @@ int TWPartitionManager::Wipe_Media_From_Data(void) { return false; } +int TWPartitionManager::Repair_By_Path(string Path, bool Display_Error) { + std::vector<TWPartition*>::iterator iter; + int ret = false; + bool found = false; + string Local_Path = TWFunc::Get_Root_Path(Path); + + if (Local_Path == "/tmp" || Local_Path == "/") + return true; + + // Iterate through all partitions + for (iter = Partitions.begin(); iter != Partitions.end(); iter++) { + if ((*iter)->Mount_Point == Local_Path || (!(*iter)->Symlink_Mount_Point.empty() && (*iter)->Symlink_Mount_Point == Local_Path)) { + ret = (*iter)->Repair(); + found = true; + } else if ((*iter)->Is_SubPartition && (*iter)->SubPartition_Of == Local_Path) { + (*iter)->Repair(); + } + } + if (found) { + return ret; + } else if (Display_Error) { + LOGERR("Repair: Unable to find partition for path '%s'\n", Local_Path.c_str()); + } else { + LOGINFO("Repair: Unable to find partition for path '%s'\n", Local_Path.c_str()); + } + return false; +} + +int TWPartitionManager::Repair_By_Block(string Block, bool Display_Error) { + TWPartition* Part = Find_Partition_By_Block(Block); + + if (Part) { + if (Part->Has_SubPartition) { + std::vector<TWPartition*>::iterator subpart; + + for (subpart = Partitions.begin(); subpart != Partitions.end(); subpart++) { + if ((*subpart)->Is_SubPartition && (*subpart)->SubPartition_Of == Part->Mount_Point) + (*subpart)->Repair(); + } + return Part->Repair(); + } else + return Part->Repair(); + } + if (Display_Error) + LOGERR("Repair: Unable to find partition for block '%s'\n", Block.c_str()); + else + LOGINFO("Repair: Unable to find partition for block '%s'\n", Block.c_str()); + return false; +} + +int TWPartitionManager::Repair_By_Name(string Name, bool Display_Error) { + TWPartition* Part = Find_Partition_By_Name(Name); + + if (Part) { + if (Part->Has_SubPartition) { + std::vector<TWPartition*>::iterator subpart; + + for (subpart = Partitions.begin(); subpart != Partitions.end(); subpart++) { + if ((*subpart)->Is_SubPartition && (*subpart)->SubPartition_Of == Part->Mount_Point) + (*subpart)->Repair(); + } + return Part->Repair(); + } else + return Part->Repair(); + } + if (Display_Error) + LOGERR("Repair: Unable to find partition for name '%s'\n", Name.c_str()); + else + LOGINFO("Repair: Unable to find partition for name '%s'\n", Name.c_str()); + return false; +} + void TWPartitionManager::Refresh_Sizes(void) { Update_System_Details(); return; diff --git a/partitions.hpp b/partitions.hpp index 7341fe0b5..73ff1fbc5 100644 --- a/partitions.hpp +++ b/partitions.hpp @@ -55,6 +55,8 @@ public: bool Wipe(string New_File_System); // Wipes the partition bool Wipe(); // Wipes the partition bool Wipe_AndSec(); // Wipes android secure + bool Can_Repair(); // Checks to see if we have everything needed to be able to repair the current file system + bool Repair(); // Repairs the current file system bool Backup(string backup_folder); // Backs up the partition to the folder specified bool Check_MD5(string restore_folder); // Checks MD5 of a backup bool Restore(string restore_folder); // Restores the partition using the backup folder provided @@ -158,6 +160,7 @@ private: friend class TWPartitionManager; friend class DataManager; friend class GUIPartitionList; +friend class GUIAction; }; class TWPartitionManager @@ -191,6 +194,9 @@ public: int Wipe_By_Path(string Path); // Wipes a partition based on path int Wipe_By_Block(string Block); // Wipes a partition based on block device int Wipe_By_Name(string Name); // Wipes a partition based on display name + int Wipe_By_Path(string Path, string New_File_System); // Wipes a partition based on path + int Wipe_By_Block(string Block, string New_File_System); // Wipes a partition based on block device + int Wipe_By_Name(string Name, string New_File_System); // Wipes a partition based on display name int Factory_Reset(); // Performs a factory reset int Wipe_Dalvik_Cache(); // Wipes dalvik cache int Wipe_Rotate_Data(); // Wipes rotation data -- @@ -198,6 +204,9 @@ public: int Wipe_Android_Secure(); // Wipes android secure int Format_Data(); // Really formats data on /data/media devices -- also removes encryption int Wipe_Media_From_Data(); // Removes and recreates the media folder on /data/media devices + int Repair_By_Path(string Path, bool Display_Error); // Repairs a partition based on path + int Repair_By_Block(string Block, bool Display_Error); // Repairs a partition based on block device + int Repair_By_Name(string Name, bool Display_Error); // Repairs a partition based on display name void Refresh_Sizes(); // Refreshes size data of partitions void Update_System_Details(); // Updates fstab, file systems, sizes, etc. int Decrypt_Device(string Password); // Attempt to decrypt any encrypted partitions |