summaryrefslogtreecommitdiffstats
path: root/twrp-functions.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2012-09-25 17:06:46 +0200
committerDees_Troy <dees_troy@teamw.in>2012-09-26 15:00:46 +0200
commitb46a6849719a8cd1045e08cd2c48f2ef94a2ccf6 (patch)
treeac584e693d2894a336815602996150a45049d10a /twrp-functions.cpp
parentFix skip MD5 setting during backup (diff)
downloadandroid_bootable_recovery-b46a6849719a8cd1045e08cd2c48f2ef94a2ccf6.tar
android_bootable_recovery-b46a6849719a8cd1045e08cd2c48f2ef94a2ccf6.tar.gz
android_bootable_recovery-b46a6849719a8cd1045e08cd2c48f2ef94a2ccf6.tar.bz2
android_bootable_recovery-b46a6849719a8cd1045e08cd2c48f2ef94a2ccf6.tar.lz
android_bootable_recovery-b46a6849719a8cd1045e08cd2c48f2ef94a2ccf6.tar.xz
android_bootable_recovery-b46a6849719a8cd1045e08cd2c48f2ef94a2ccf6.tar.zst
android_bootable_recovery-b46a6849719a8cd1045e08cd2c48f2ef94a2ccf6.zip
Diffstat (limited to '')
-rw-r--r--twrp-functions.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index 0b2258a90..a681de280 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -12,6 +12,7 @@
#include "twrp-functions.hpp"
#include "partitions.hpp"
#include "common.h"
+#include "data.hpp"
/* Checks md5 for a path
Return values:
@@ -226,4 +227,26 @@ bool TWFunc::Path_Exists(string Path) {
return false;
else
return true;
+}
+
+void TWFunc::GUI_Operation_Text(string Read_Value, string Default_Text) {
+ string Display_Text;
+
+ DataManager::GetValue(Read_Value, Display_Text);
+ if (Display_Text.empty())
+ Display_Text = Default_Text;
+
+ DataManager::SetValue("tw_operation", Display_Text);
+ DataManager::SetValue("tw_partition", "");
+}
+
+void TWFunc::GUI_Operation_Text(string Read_Value, string Partition_Name, string Default_Text) {
+ string Display_Text;
+
+ DataManager::GetValue(Read_Value, Display_Text);
+ if (Display_Text.empty())
+ Display_Text = Default_Text;
+
+ DataManager::SetValue("tw_operation", Display_Text);
+ DataManager::SetValue("tw_partition", Partition_Name);
} \ No newline at end of file