From fb1c4ffaafae4843c7edb302351b7df48e02a990 Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Wed, 16 Apr 2014 13:43:36 -0500 Subject: Whitespace and minor code cleanup This is by no means comprehensive, but is quite a bit better already. Change-Id: Ibc8654a5dfb0eec39cbd0b64bdb52bb4fbfe2f7e --- gui/action.cpp | 22 +- gui/basicTheme/mkTheme.sh | 6 - gui/basicTheme/res/fonts/bluehighway-25.dat | Bin 3299 -> 0 bytes gui/basicTheme/res/fonts/bluehighway-40.dat | Bin 7367 -> 0 bytes gui/basicTheme/res/images/android.png | Bin 2043 -> 0 bytes gui/basicTheme/res/images/checkbox_checked.png | Bin 858 -> 0 bytes gui/basicTheme/res/images/checkbox_empty.png | Bin 311 -> 0 bytes gui/basicTheme/res/images/file.png | Bin 533 -> 0 bytes gui/basicTheme/res/images/folder.png | Bin 591 -> 0 bytes gui/basicTheme/res/images/indeterminate001.png | Bin 1742 -> 0 bytes gui/basicTheme/res/images/indeterminate002.png | Bin 1744 -> 0 bytes gui/basicTheme/res/images/indeterminate003.png | Bin 1748 -> 0 bytes gui/basicTheme/res/images/indeterminate004.png | Bin 1748 -> 0 bytes gui/basicTheme/res/images/indeterminate005.png | Bin 1740 -> 0 bytes gui/basicTheme/res/images/indeterminate006.png | Bin 1740 -> 0 bytes gui/basicTheme/res/images/qhd-medium-button.png | Bin 1911 -> 0 bytes gui/basicTheme/res/images/qhd-menu-button.png | Bin 3925 -> 0 bytes gui/basicTheme/res/images/qhd-minus-button.png | Bin 819 -> 0 bytes gui/basicTheme/res/images/qhd-plus-button.png | Bin 845 -> 0 bytes gui/basicTheme/res/images/qhd-small-button.png | Bin 807 -> 0 bytes gui/basicTheme/res/images/qhd-sort-button.png | Bin 854 -> 0 bytes gui/basicTheme/res/images/slideout.png | Bin 1245 -> 0 bytes gui/basicTheme/res/ui.xml | 1952 ----------------------- gui/basicTheme/ui.zip | Bin 36681 -> 0 bytes gui/devices/1024x600/res/ui.xml | 20 +- gui/devices/1024x768/res/ui.xml | 20 +- gui/devices/1080x1920/res/ui.xml | 6 +- gui/devices/1200x1920/res/ui.xml | 6 +- gui/devices/1280x800/res/ui.xml | 20 +- gui/devices/1600x2560/res/ui.xml | 2 +- gui/devices/1920x1200/res/ui.xml | 20 +- gui/devices/240x240/res/ui.xml | 18 +- gui/devices/2560x1600/res/ui.xml | 20 +- gui/devices/320x480/res/ui.xml | 6 +- gui/devices/480x800/res/ui.xml | 6 +- gui/devices/480x854/res/ui.xml | 6 +- gui/devices/540x960/res/ui.xml | 6 +- gui/devices/720x1280/res/ui.xml | 6 +- gui/devices/800x1280/res/ui.xml | 8 +- gui/devices/800x480/res/ui.xml | 20 +- gui/fileselector.cpp | 4 +- gui/gui.cpp | 5 +- gui/hardwarekeyboard.cpp | 2 +- gui/listbox.cpp | 4 +- gui/object.cpp | 4 +- gui/pages.cpp | 14 +- gui/partitionlist.cpp | 4 +- gui/progressbar.cpp | 12 +- gui/resources.cpp | 2 +- gui/resources.hpp | 2 +- gui/slider.cpp | 2 +- gui/slidervalue.cpp | 15 +- 52 files changed, 144 insertions(+), 2096 deletions(-) delete mode 100755 gui/basicTheme/mkTheme.sh delete mode 100755 gui/basicTheme/res/fonts/bluehighway-25.dat delete mode 100755 gui/basicTheme/res/fonts/bluehighway-40.dat delete mode 100644 gui/basicTheme/res/images/android.png delete mode 100644 gui/basicTheme/res/images/checkbox_checked.png delete mode 100644 gui/basicTheme/res/images/checkbox_empty.png delete mode 100644 gui/basicTheme/res/images/file.png delete mode 100644 gui/basicTheme/res/images/folder.png delete mode 100644 gui/basicTheme/res/images/indeterminate001.png delete mode 100644 gui/basicTheme/res/images/indeterminate002.png delete mode 100644 gui/basicTheme/res/images/indeterminate003.png delete mode 100644 gui/basicTheme/res/images/indeterminate004.png delete mode 100644 gui/basicTheme/res/images/indeterminate005.png delete mode 100644 gui/basicTheme/res/images/indeterminate006.png delete mode 100644 gui/basicTheme/res/images/qhd-medium-button.png delete mode 100644 gui/basicTheme/res/images/qhd-menu-button.png delete mode 100644 gui/basicTheme/res/images/qhd-minus-button.png delete mode 100644 gui/basicTheme/res/images/qhd-plus-button.png delete mode 100644 gui/basicTheme/res/images/qhd-small-button.png delete mode 100644 gui/basicTheme/res/images/qhd-sort-button.png delete mode 100644 gui/basicTheme/res/images/slideout.png delete mode 100644 gui/basicTheme/res/ui.xml delete mode 100644 gui/basicTheme/ui.zip (limited to 'gui') diff --git a/gui/action.cpp b/gui/action.cpp index 63a8085b1..d4d944dfb 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -88,7 +88,7 @@ GUIAction::GUIAction(xml_node<>* node) attr = child->first_attribute("function"); if (!attr) return; - + action.mFunction = attr->value(); action.mArg = child->value(); mActions.push_back(action); @@ -502,7 +502,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) gui_print("Simulating actions...\n"); return 0; } - + if (function == "restoredefaultsettings") { operation_start("Restore Defaults"); @@ -516,7 +516,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) operation_end(0, simulate); return 0; } - + if (function == "copylog") { operation_start("Copy Log"); @@ -533,7 +533,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) operation_end(0, simulate); return 0; } - + if (function == "compute" || function == "addsubtract") { if (arg.find("+") != string::npos) @@ -589,27 +589,27 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) LOGERR("Unable to perform compute '%s'\n", arg.c_str()); return -1; } - + if (function == "setguitimezone") { string SelectedZone; DataManager::GetValue(TW_TIME_ZONE_GUISEL, SelectedZone); // read the selected time zone into SelectedZone string Zone = SelectedZone.substr(0, SelectedZone.find(';')); // parse to get time zone string DSTZone = SelectedZone.substr(SelectedZone.find(';') + 1, string::npos); // parse to get DST component - + int dst; DataManager::GetValue(TW_TIME_ZONE_GUIDST, dst); // check wether user chose to use DST - + string offset; DataManager::GetValue(TW_TIME_ZONE_GUIOFFSET, offset); // pull in offset - + string NewTimeZone = Zone; if (offset != "0") NewTimeZone += ":" + offset; - + if (dst != 0) NewTimeZone += DSTZone; - + DataManager::SetValue(TW_TIME_ZONE_VAR, NewTimeZone); DataManager::update_tz_environment_variables(); return 0; @@ -619,7 +619,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */) LOGERR("togglestorage action was deprecated from TWRP\n"); return 0; } - + if (function == "overlay") return gui_changeOverlay(arg); diff --git a/gui/basicTheme/mkTheme.sh b/gui/basicTheme/mkTheme.sh deleted file mode 100755 index 3b8d21be6..000000000 --- a/gui/basicTheme/mkTheme.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -cd res -zip -r ../ui.zip * -cd .. - diff --git a/gui/basicTheme/res/fonts/bluehighway-25.dat b/gui/basicTheme/res/fonts/bluehighway-25.dat deleted file mode 100755 index a0944c9aa..000000000 Binary files a/gui/basicTheme/res/fonts/bluehighway-25.dat and /dev/null differ diff --git a/gui/basicTheme/res/fonts/bluehighway-40.dat b/gui/basicTheme/res/fonts/bluehighway-40.dat deleted file mode 100755 index ce6d35c52..000000000 Binary files a/gui/basicTheme/res/fonts/bluehighway-40.dat and /dev/null differ diff --git a/gui/basicTheme/res/images/android.png b/gui/basicTheme/res/images/android.png deleted file mode 100644 index 73e94d8f0..000000000 Binary files a/gui/basicTheme/res/images/android.png and /dev/null differ diff --git a/gui/basicTheme/res/images/checkbox_checked.png b/gui/basicTheme/res/images/checkbox_checked.png deleted file mode 100644 index 2dd029dd7..000000000 Binary files a/gui/basicTheme/res/images/checkbox_checked.png and /dev/null differ diff --git a/gui/basicTheme/res/images/checkbox_empty.png b/gui/basicTheme/res/images/checkbox_empty.png deleted file mode 100644 index 1db36ffd1..000000000 Binary files a/gui/basicTheme/res/images/checkbox_empty.png and /dev/null differ diff --git a/gui/basicTheme/res/images/file.png b/gui/basicTheme/res/images/file.png deleted file mode 100644 index 133a681c6..000000000 Binary files a/gui/basicTheme/res/images/file.png and /dev/null differ diff --git a/gui/basicTheme/res/images/folder.png b/gui/basicTheme/res/images/folder.png deleted file mode 100644 index e4bc250cd..000000000 Binary files a/gui/basicTheme/res/images/folder.png and /dev/null differ diff --git a/gui/basicTheme/res/images/indeterminate001.png b/gui/basicTheme/res/images/indeterminate001.png deleted file mode 100644 index e6fa1c574..000000000 Binary files a/gui/basicTheme/res/images/indeterminate001.png and /dev/null differ diff --git a/gui/basicTheme/res/images/indeterminate002.png b/gui/basicTheme/res/images/indeterminate002.png deleted file mode 100644 index e1fceaba1..000000000 Binary files a/gui/basicTheme/res/images/indeterminate002.png and /dev/null differ diff --git a/gui/basicTheme/res/images/indeterminate003.png b/gui/basicTheme/res/images/indeterminate003.png deleted file mode 100644 index 670286743..000000000 Binary files a/gui/basicTheme/res/images/indeterminate003.png and /dev/null differ diff --git a/gui/basicTheme/res/images/indeterminate004.png b/gui/basicTheme/res/images/indeterminate004.png deleted file mode 100644 index ff65e0930..000000000 Binary files a/gui/basicTheme/res/images/indeterminate004.png and /dev/null differ diff --git a/gui/basicTheme/res/images/indeterminate005.png b/gui/basicTheme/res/images/indeterminate005.png deleted file mode 100644 index e61e2cc15..000000000 Binary files a/gui/basicTheme/res/images/indeterminate005.png and /dev/null differ diff --git a/gui/basicTheme/res/images/indeterminate006.png b/gui/basicTheme/res/images/indeterminate006.png deleted file mode 100644 index c9c21ba9c..000000000 Binary files a/gui/basicTheme/res/images/indeterminate006.png and /dev/null differ diff --git a/gui/basicTheme/res/images/qhd-medium-button.png b/gui/basicTheme/res/images/qhd-medium-button.png deleted file mode 100644 index c26298f8d..000000000 Binary files a/gui/basicTheme/res/images/qhd-medium-button.png and /dev/null differ diff --git a/gui/basicTheme/res/images/qhd-menu-button.png b/gui/basicTheme/res/images/qhd-menu-button.png deleted file mode 100644 index b14bed9c3..000000000 Binary files a/gui/basicTheme/res/images/qhd-menu-button.png and /dev/null differ diff --git a/gui/basicTheme/res/images/qhd-minus-button.png b/gui/basicTheme/res/images/qhd-minus-button.png deleted file mode 100644 index 5e265fa32..000000000 Binary files a/gui/basicTheme/res/images/qhd-minus-button.png and /dev/null differ diff --git a/gui/basicTheme/res/images/qhd-plus-button.png b/gui/basicTheme/res/images/qhd-plus-button.png deleted file mode 100644 index 9f073825c..000000000 Binary files a/gui/basicTheme/res/images/qhd-plus-button.png and /dev/null differ diff --git a/gui/basicTheme/res/images/qhd-small-button.png b/gui/basicTheme/res/images/qhd-small-button.png deleted file mode 100644 index 0d01b35a4..000000000 Binary files a/gui/basicTheme/res/images/qhd-small-button.png and /dev/null differ diff --git a/gui/basicTheme/res/images/qhd-sort-button.png b/gui/basicTheme/res/images/qhd-sort-button.png deleted file mode 100644 index bb4100b01..000000000 Binary files a/gui/basicTheme/res/images/qhd-sort-button.png and /dev/null differ diff --git a/gui/basicTheme/res/images/slideout.png b/gui/basicTheme/res/images/slideout.png deleted file mode 100644 index ff05d6251..000000000 Binary files a/gui/basicTheme/res/images/slideout.png and /dev/null differ diff --git a/gui/basicTheme/res/ui.xml b/gui/basicTheme/res/ui.xml deleted file mode 100644 index 3b3110135..000000000 --- a/gui/basicTheme/res/ui.xml +++ /dev/null @@ -1,1952 +0,0 @@ - - - -
- - TeamWin - Backup Naowz - Default basic theme - preview.jpg -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Install - - install - - - - - - Wipe - - wipe - - - - - - Backup - - backup - - - - - - Restore - - restore - - - - - - Mount - - mount - - - - - - Settings - - settings - - - - - - Advanced - - advanced - - - - - - Reboot - - reboot - - - - - - - - - - - - - - - - - - - - - - Sort Ascending: - - - - - - Name - - tw_gui_sort_order=1 - - - - - - Date - - tw_gui_sort_order=2 - - - - - - Size - - tw_gui_sort_order=3 - - - - - - Sort Descending: - - - - - - Name - - tw_gui_sort_order=-1 - - - - - - Date - - tw_gui_sort_order=-2 - - - - - - Size - - tw_gui_sort_order=-3 - - - - - flash_confirm - - - - - main - - - - - main - - - - - - - - - - - - WARNING: This operation may install incompatible software - - - - - - and render your device unusable. - - - - - - File to flash: %tw_filename% - - - - - - Flash now - - flash_zip - - - - - install - - - - - main - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - flash_done - - - - - - - - - - - - - - - - - - Main Menu - - main - - - - - - - - - - - - Cache - - wipe_cache - - - - - - Dalvik Cache - - wipe_dalvik - - - - - - Factory Reset - - wipe_data - - - - - - Battery Stats - - wipe_battery - - - - - - Rotation - - wipe_rotate - - - - - - System - - wipe_system - - - - - - SD Card - - wipe_sdcard - - - - - - SD Ext - - wipe_sdext - - - - - main - - - - - main - - - - - - - - - - - - - - - - - - wipe_done - - - - /cache - - - - - - - - - - - - - - - - - - wipe_done - - - - dalvik - - - - - - - - - - - - - - - - - - wipe_done - - - - rotate - - - - - - - - - - - - - - - - - - wipe_done - - - - data - - - - - - - - - - - - - - - - - - wipe_done - - - - /system - - - - - - - - - - - - - - - - - - wipe_done - - - - /sdcard - - - - - - - - - - - - - - - - - - wipe_done - - - - /sd-ext - - - - - - - - - - - - - - - - - - wipe_done - - - - battery - - - - - - - - - - - - Wipe complete - - - - - - Back - - wipe - - - - - main - - - - - wipe - - - - - - - - - - - - Backup now - - backup_run - - - - - - System - - - - - - - - Data - - - - - - - - Boot - - - - - - - - Recovery - - - - - - - - Cache - - - - - - - - %tw_sp1_name% - - - - - - - - .android_secure - - - - - - - - - - - - sd-ext - - - - - - - - - Enable Compression (Requires more time) - - - - - - - main - - - - - main - - - - - - - - - - - - %tw_operation% %tw_partition% - - - - - - - - - - - - - - - - - - backup_done - - - - backup - - - - - - - - - backup_success - - - - - backup_failed - - - - - - - - - - Your backup was successful! - - - - - - Main Menu - - main - - - - - - - - - - - - Your backup failed. - - - - - - Pull up the console for more details - - - - - - Main Menu - - main - - - - - - - - - - - - Select packge to restore - - - - - - - - - - - - - - - restore_setrestoredata - - - - - main - - - - - main - - - - - - - - - - - - restore_select - - - - - - - - - - Restore now - - restore_run - - - - - - System - - - - - - - - - Data - - - - - - - - - Boot - - - - - - - - - Recovery - - - - - - - - - Cache - - - - - - - - - %tw_sp1_name% - - - - - - - - - .android_secure - - - - - - - - - sd-ext - - - - - - - - main - - - - - restore - - - - - - - - - - - - %tw_operation% %tw_partition% - - - - - - - - - - - - - - - - - - restore_done - - - - restore - - - - - - - - - restore_success - - - - - restore_failed - - - - - - - - - - Your restore was successful! - - - - - - Main Menu - - main - - - - - - - - - - - - Your restore failed. - - - - - - Pull up the console for more details - - - - - - Main Menu - - main - - - - - - - - - - - - - Mount System - - /system - - - - - - - Unmount System - - /system - - - - - - - Mount Data - - /data - - - - - - - Unmount Data - - /data - - - - - - - Mount Cache - - /cache - - - - - - - Unmount Cache - - /cache - - - - - - Mount USB Storage - - usb_mount - - - - - main - - - - - main - - - - - - - - - - - - Unmount - - usb_umount - - - - usb - - - - - - - - usb - - - - mount - - - - - - - - - - System - - system - - - - - - Power Off - - poweroff - - - - - - Recovery - - recovery - - - - - - Bootloader - - bootloader - - - - - main - - - - - main - - - - - - - - - - - - Zip file signature verification? - - - - - - - - Reboot after flashing a zip? - - - - - - - - Force MD5 check on all zips? - - - - - - - - Use rm -rf instead of formatting? - - - - - - - - Time Zone - - timezonemain - - - - - - Restore Defaults - - - - - - - main - - - - - main - - - - - - - - - - - - Minus (GMT 0 to -11) - - timezoneminus - - - - - - Plus (GMT +1 to +12) - - timezoneplus - - - - - main - - - - - settings - - - - - - - - - - - - Selected: %tw_time_zone_guisel% - - - - - - GMT 0 CUT - - tw_time_zone_guisel=CUT0;GDT - - - - - - GMT 0 - - tw_time_zone_guisel=GMT0;BST - - - - - - AZOREST -1 - - tw_time_zone_guisel=AZOREST1;AZOREDT - - - - - - FALKST -2 - - tw_time_zone_guisel=FALKST2;FALKDT - - - - - - GRNLNDST -3 - - tw_time_zone_guisel=GRNLNDST3;GRNLNDDT - - - - - - AST -4 - - tw_time_zone_guisel=AST4;ADT - - - - - - EST -5 - - tw_time_zone_guisel=EST5;EDT - - - - - - CST -6 - - tw_time_zone_guisel=CST6;CDT - - - - - - MST -7 - - tw_time_zone_guisel=MST7;MDT - - - - - - PST -8 - - tw_time_zone_guisel=PST8;PDT - - - - - - AST -9 - - tw_time_zone_guisel=AST9;ADT - - - - - - HST -10 - - tw_time_zone_guisel=HST10;HDT - - - - - - BST -11 - - tw_time_zone_guisel=BST11;BDT - - - - - - Do you use daylight savings time (DST)? - - - - - - - - Offset (usually 0): %tw_time_zone_guioffset% - - - - - - None - - tw_time_zone_guioffset=0 - - - - - - 15 - - tw_time_zone_guioffset=15 - - - - - - 30 - - tw_time_zone_guioffset=30 - - - - - - 45 - - tw_time_zone_guioffset=45 - - - - - - Set Time Zone - - - - - - - - Current Time Zone: %tw_time_zone% - - - - - main - - - - - timezonemain - - - - - - - - - - - - Selected: %tw_time_zone_guisel% - - - - - - NFT +1 - - tw_time_zone_guisel=NFT-1;DFT - - - - - - USAST +2 - - tw_time_zone_guisel=USAST-2;USADT - - - - - - WET +2 - - tw_time_zone_guisel=WET-2;WET - - - - - - SAUST +3 - - tw_time_zone_guisel=SAUST-3;SAUDT - - - - - - MEST +3 - - tw_time_zone_guisel=MEST-3;MEDT - - - - - - WST +4 - - tw_time_zone_guisel=WST-4;WDT - - - - - - PAKST +5 - - tw_time_zone_guisel=PAKST-5;PAKDT - - - - - - TASHST +6 - - tw_time_zone_guisel=TASHST-6;TASHDT - - - - - - THAIST +7 - - tw_time_zone_guisel=THAIST-7;THAIDT - - - - - - TAIST +8 - - tw_time_zone_guisel=TAIST-8;TAIDT - - - - - - WAUST +8 - - tw_time_zone_guisel=WAUST-8;WAUDT - - - - - - KORST +9 - - tw_time_zone_guisel=KORST-9;KORDT - - - - - - JST +9 - - tw_time_zone_guisel=JST-9;JSTDT - - - - - - EET +10 - - tw_time_zone_guisel=EET-10;EETDT - - - - - - MET +11 - - tw_time_zone_guisel=MET-11;METDT - - - - - - NZST +12 - - tw_time_zone_guisel=NZST-12;NZDT - - - - - - Do you use daylight savings time (DST)? - - - - - - - - Offset (usually 0): %tw_time_zone_guioffset% - - - - - - None - - tw_time_zone_guioffset=0 - - - - - - 15 - - tw_time_zone_guioffset=15 - - - - - - 30 - - tw_time_zone_guioffset=30 - - - - - - 45 - - tw_time_zone_guioffset=45 - - - - - - Set Time Zone - - - - - - - - Current Time Zone: %tw_time_zone% - - - - - main - - - - - timezonemain - - - - - - - - - - - - Copy Log to SD - - - - - - - - Fix Permissions - - fixperms - - - - - - Partition SD Card - - partsdcard - - - - - main - - - - - main - - - - - - - - - - - - - - tw_sdext_size-128 - - - - - - - - tw_sdext_size+128 - - - - - - EXT Size: %tw_sdext_size% - - - - - - - - tw_swap_size-32 - - - - - - - - tw_swap_size+32 - - - - - - Swap Size: %tw_swap_size% - - - - - - File system: %tw_sdpart_file_system% - - - - - - EXT3 - - tw_sdpart_file_system=ext3 - - - - - - EXT4 - - tw_sdpart_file_system=ext4 - - - - - - You will lose all files on your SD card! - - - - - - This action cannot be undone! - - - - - - Partition SD - - partsdcardaction - - - - - main - - - - - advanced - - - - - - - - - - - - Partitioning SD Card . . . - - - - - - This may take a couple minutes. - - - - - - The progress bar may not be accurate. - - - - - - - - - - - - - - - - - - - - - - advanced - - - - - - - - - - - - Fixing Permissions . . . - - - - - - This may take several minutes. - - - - - - The progress bar may not be accurate. - - - - - - - - - - - - - - - - - - - - - - advanced - - - - - - - diff --git a/gui/basicTheme/ui.zip b/gui/basicTheme/ui.zip deleted file mode 100644 index a2fddee89..000000000 Binary files a/gui/basicTheme/ui.zip and /dev/null differ diff --git a/gui/devices/1024x600/res/ui.xml b/gui/devices/1024x600/res/ui.xml index 92a33c0e1..c0880a76a 100755 --- a/gui/devices/1024x600/res/ui.xml +++ b/gui/devices/1024x600/res/ui.xml @@ -279,7 +279,7 @@