summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2013-12-07 23:02:09 +0100
committerVojtech Bocek <vbocek@gmail.com>2013-12-07 23:05:10 +0100
commit81c29dc7c42cca8dddfcbdeee14ae84ee6090c8b (patch)
tree819bb154fd58f2b0111e253d07b2093ef201b0b8 /gui
parentFix render issue when button has conditional (diff)
downloadandroid_bootable_recovery-81c29dc7c42cca8dddfcbdeee14ae84ee6090c8b.tar
android_bootable_recovery-81c29dc7c42cca8dddfcbdeee14ae84ee6090c8b.tar.gz
android_bootable_recovery-81c29dc7c42cca8dddfcbdeee14ae84ee6090c8b.tar.bz2
android_bootable_recovery-81c29dc7c42cca8dddfcbdeee14ae84ee6090c8b.tar.lz
android_bootable_recovery-81c29dc7c42cca8dddfcbdeee14ae84ee6090c8b.tar.xz
android_bootable_recovery-81c29dc7c42cca8dddfcbdeee14ae84ee6090c8b.tar.zst
android_bootable_recovery-81c29dc7c42cca8dddfcbdeee14ae84ee6090c8b.zip
Diffstat (limited to 'gui')
-rw-r--r--gui/pages.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/gui/pages.cpp b/gui/pages.cpp
index d02dd216d..d662f18f8 100644
--- a/gui/pages.cpp
+++ b/gui/pages.cpp
@@ -611,16 +611,21 @@ Page* PageSet::FindPage(std::string name)
int PageSet::LoadVariables(xml_node<>* vars)
{
xml_node<>* child;
+ xml_attribute<> *name, *value, *persist;
+ int p;
child = vars->first_node("variable");
while (child)
{
- if (!child->first_attribute("name"))
- break;
- if (!child->first_attribute("value"))
- break;
+ name = child->first_attribute("name");
+ value = child->first_attribute("value");
+ persist = child->first_attribute("persist");
+ if(name && value)
+ {
+ p = persist ? atoi(persist->value()) : 0;
+ DataManager::SetValue(name->value(), value->value(), p);
+ }
- DataManager::SetValue(child->first_attribute("name")->value(), child->first_attribute("value")->value());
child = child->next_sibling("variable");
}
return 0;