diff --git a/gui/action.cpp b/gui/action.cpp
index 7ecd0b46..fc397373 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -223,6 +223,7 @@ GUIAction::GUIAction(xml_node<>* node)
ADD_ACTION(installsu);
ADD_ACTION(decrypt_backup);
ADD_ACTION(repair);
+ ADD_ACTION(resize);
ADD_ACTION(changefilesystem);
ADD_ACTION(flashimage);
}
@@ -872,6 +873,10 @@ int GUIAction::getpartitiondetails(std::string arg)
DataManager::SetValue("tw_partition_can_repair", 1);
else
DataManager::SetValue("tw_partition_can_repair", 0);
+ if (Part->Can_Resize())
+ DataManager::SetValue("tw_partition_can_resize", 1);
+ else
+ DataManager::SetValue("tw_partition_can_resize", 0);
if (TWFunc::Path_Exists("/sbin/mkdosfs"))
DataManager::SetValue("tw_partition_vfat", 1);
else
@@ -1651,6 +1656,28 @@ int GUIAction::repair(std::string arg)
return 0;
}
+int GUIAction::resize(std::string arg)
+{
+ int op_status = 0;
+
+ operation_start("Resize Partition");
+ if (simulate) {
+ simulate_progress_bar();
+ } else {
+ string part_path;
+ DataManager::GetValue("tw_partition_mount_point", part_path);
+ if (PartitionManager.Resize_By_Path(part_path, true)) {
+ op_status = 0; // success
+ } else {
+ LOGERR("Error resizing file system.\n");
+ op_status = 1; // fail
+ }
+ }
+
+ operation_end(op_status);
+ return 0;
+}
+
int GUIAction::changefilesystem(std::string arg)
{
int op_status = 0;
diff --git a/gui/devices/landscape/res/landscape.xml b/gui/devices/landscape/res/landscape.xml
index 12c66290..529aef79 100644
--- a/gui/devices/landscape/res/landscape.xml
+++ b/gui/devices/landscape/res/landscape.xml
@@ -1380,6 +1380,25 @@
Backup Size: %tw_partition_backup_size%MB
+
+
+
+
+
+