summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gui/action.cpp2
-rw-r--r--gui/devices/landscape/res/landscape.xml21
-rw-r--r--gui/devices/portrait/res/portrait.xml21
-rw-r--r--gui/devices/watch/res/watch.xml21
4 files changed, 28 insertions, 37 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index fbd80dc94..97d95f170 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1798,7 +1798,7 @@ int GUIAction::mountsystemtoggle(std::string arg)
} else {
TWPartition* Part = PartitionManager.Find_Partition_By_Path("/system");
if (Part) {
- if (DataManager::GetIntValue("tw_mount_system_ro")) {
+ if (arg == "0") {
DataManager::SetValue("tw_mount_system_ro", 0);
Part->Change_Mount_Read_Only(false);
} else {
diff --git a/gui/devices/landscape/res/landscape.xml b/gui/devices/landscape/res/landscape.xml
index 529aef79c..b41669113 100644
--- a/gui/devices/landscape/res/landscape.xml
+++ b/gui/devices/landscape/res/landscape.xml
@@ -995,7 +995,7 @@
<condition var1="tw_mount_system_ro" op="=" var2="0" />
<text>Only mount system read-only</text>
<image resource="checkbox_false" />
- <action function="mountsystemtoggle"></action>
+ <action function="mountsystemtoggle">1</action>
</object>
<object type="button">
@@ -1062,18 +1062,15 @@
</object>
<object type="action">
- <conditions>
- <condition var1="tw_operation_state" var2="1" />
- <condition var1="tw_lifetime_writes" var2="1" />
- </conditions>
- <action function="page">mount</action>
+ <condition var1="tw_lifetime_writes" var2="1" />
+ <actions>
+ <action function="mountsystemtoggle">0</action>
+ <action function="page">mount</action>
+ </actions>
</object>
<object type="action">
- <conditions>
- <condition var1="tw_operation_state" var2="1" />
- <condition var1="tw_lifetime_writes" var2="0" />
- </conditions>
+ <condition var1="tw_lifetime_writes" var2="0" />
<actions>
<action function="set">tw_back=mount</action>
<action function="page">system_readonly</action>
@@ -3696,7 +3693,7 @@
<placement x="%col_center_x%" y="%row7_text_y%" />
<text>Keep Read Only</text>
<actions>
- <action function="set">tw_mount_system_ro=1</action>
+ <action function="mountsystemtoggle">1</action>
<action function="set">tw_page_done=1</action>
<action function="page">%tw_back%</action>
</actions>
@@ -3705,7 +3702,7 @@
<object type="slider">
<text>Swipe to Allow Modifications</text>
<actions>
- <action function="set">tw_mount_system_ro=0</action>
+ <action function="mountsystemtoggle">0</action>
<action function="set">tw_page_done=1</action>
<action function="page">%tw_back%</action>
</actions>
diff --git a/gui/devices/portrait/res/portrait.xml b/gui/devices/portrait/res/portrait.xml
index 9ffd6e44e..cf113efd7 100644
--- a/gui/devices/portrait/res/portrait.xml
+++ b/gui/devices/portrait/res/portrait.xml
@@ -2130,7 +2130,7 @@
<condition var1="tw_mount_system_ro" op="=" var2="0" />
<text>Only mount system read-only</text>
<image resource="checkbox_false" />
- <action function="mountsystemtoggle"></action>
+ <action function="mountsystemtoggle">1</action>
</object>
<object type="button">
@@ -2207,18 +2207,15 @@
</object>
<object type="action">
- <conditions>
- <condition var1="tw_operation_state" var2="1" />
- <condition var1="tw_lifetime_writes" var2="1" />
- </conditions>
- <action function="page">mount</action>
+ <condition var1="tw_lifetime_writes" var2="1" />
+ <actions>
+ <action function="mountsystemtoggle">0</action>
+ <action function="page">mount</action>
+ </actions>
</object>
<object type="action">
- <conditions>
- <condition var1="tw_operation_state" var2="1" />
- <condition var1="tw_lifetime_writes" var2="0" />
- </conditions>
+ <condition var1="tw_lifetime_writes" var2="0" />
<actions>
<action function="set">tw_back=mount</action>
<action function="page">system_readonly</action>
@@ -3722,7 +3719,7 @@
<placement x="%col_center_x%" y="%row10_text_y%" />
<text>Keep Read Only</text>
<actions>
- <action function="set">tw_mount_system_ro=1</action>
+ <action function="mountsystemtoggle">1</action>
<action function="set">tw_page_done=1</action>
<action function="page">%tw_back%</action>
</actions>
@@ -3731,7 +3728,7 @@
<object type="slider">
<text>Swipe to Allow Modifications</text>
<actions>
- <action function="set">tw_mount_system_ro=0</action>
+ <action function="mountsystemtoggle">0</action>
<action function="set">tw_page_done=1</action>
<action function="page">%tw_back%</action>
</actions>
diff --git a/gui/devices/watch/res/watch.xml b/gui/devices/watch/res/watch.xml
index a8535c659..7fae5f3d7 100644
--- a/gui/devices/watch/res/watch.xml
+++ b/gui/devices/watch/res/watch.xml
@@ -2138,7 +2138,7 @@
<condition var1="tw_mount_system_ro" op="=" var2="0" />
<text>Only mount system read-only</text>
<image resource="checkbox_false" />
- <action function="mountsystemtoggle"></action>
+ <action function="mountsystemtoggle">1</action>
</object>
<object type="button">
@@ -2214,18 +2214,15 @@
</object>
<object type="action">
- <conditions>
- <condition var1="tw_operation_state" var2="1" />
- <condition var1="tw_lifetime_writes" var2="1" />
- </conditions>
- <action function="page">mount</action>
+ <condition var1="tw_lifetime_writes" var2="1" />
+ <actions>
+ <action function="mountsystemtoggle">0</action>
+ <action function="page">mount</action>
+ </actions>
</object>
<object type="action">
- <conditions>
- <condition var1="tw_operation_state" var2="1" />
- <condition var1="tw_lifetime_writes" var2="0" />
- </conditions>
+ <condition var1="tw_lifetime_writes" var2="0" />
<actions>
<action function="set">tw_back=mount</action>
<action function="page">system_readonly</action>
@@ -3711,7 +3708,7 @@
<placement x="%col_center_x%" y="%row9_text_y%" />
<text>Keep Read Only</text>
<actions>
- <action function="set">tw_mount_system_ro=1</action>
+ <action function="mountsystemtoggle">1</action>
<action function="set">tw_page_done=1</action>
<action function="page">%tw_back%</action>
</actions>
@@ -3720,7 +3717,7 @@
<object type="slider">
<text>Swipe to Allow Modifications</text>
<actions>
- <action function="set">tw_mount_system_ro=0</action>
+ <action function="mountsystemtoggle">0</action>
<action function="set">tw_page_done=1</action>
<action function="page">%tw_back%</action>
</actions>