Fixup reboot after install variables

* Create correctly named data manager variable 'tw_install_reboot'
* Make configurable through Settings
* Remove closing tag space in theme files (not personal preference,
  but should match surrounding code style)
* Fix the "two presses needed to enable" issue for the checkbox on the
  install screen

Change-Id: I0ceb60b4888a672e2f0ecb5672b03cc86615621a
diff --git a/data.cpp b/data.cpp
index 3eb9dad..553c9a4 100644
--- a/data.cpp
+++ b/data.cpp
@@ -676,7 +676,7 @@
 	mConst.SetValue(TW_MIN_SYSTEM_VAR, TW_MIN_SYSTEM_SIZE);
 	mData.SetValue(TW_BACKUP_NAME, "(Auto Generate)");
 
-	mPersist.SetValue(TW_REBOOT_AFTER_FLASH_VAR, "0");
+	mPersist.SetValue(TW_INSTALL_REBOOT_VAR, "0");
 	mPersist.SetValue(TW_SIGNED_ZIP_VERIFY_VAR, "0");
 	mPersist.SetValue(TW_FORCE_MD5_CHECK_VAR, "0");
 	mPersist.SetValue(TW_DISABLE_FREE_SPACE_VAR, "0");
diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml
index 9272db0..df68a3a 100644
--- a/gui/theme/common/landscape.xml
+++ b/gui/theme/common/landscape.xml
@@ -441,9 +441,9 @@
 			</checkbox>
 
 			<checkbox>
-				<placement x="%col1_x_right%" y="%row12_y%" />
+				<placement x="%col1_x_right%" y="%row12_y%"/>
 				<text>{@install_reboot_chk=Reboot after installation is complete}</text>
-				<data variable="tw_install_reboot" />
+				<data variable="tw_install_reboot"/>
 			</checkbox>
 
 			<button style="main_button_half_width">
@@ -2771,6 +2771,9 @@
 				<listitem name="{@zip_sig_chk=Zip signature verification}">
 					<data variable="tw_signed_zip_verify"/>
 				</listitem>
+				<listitem name="{@install_reboot_chk=Reboot after installation is complete}">
+					<data variable="tw_install_reboot"/>
+				</listitem>
 				<listitem name="{@use_rmrf_chk=Use rm -rf instead of formatting}">
 					<data variable="tw_rm_rf"/>
 				</listitem>
diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml
index 507f384..dbd4305 100644
--- a/gui/theme/common/portrait.xml
+++ b/gui/theme/common/portrait.xml
@@ -386,9 +386,9 @@
 			</checkbox>
 
 			<checkbox>
-				<placement x="%indent%" y="%row13a_y%" />
+				<placement x="%indent%" y="%row13a_y%"/>
 				<text>{@install_reboot_chk=Reboot after installation is complete}</text>
-				<data variable="tw_install_reboot" />
+				<data variable="tw_install_reboot"/>
 			</checkbox>
 
 			<checkbox>
@@ -2904,6 +2904,9 @@
 				<listitem name="{@zip_sig_chk=Zip signature verification}">
 					<data variable="tw_signed_zip_verify"/>
 				</listitem>
+				<listitem name="{@install_reboot_chk=Reboot after installation is complete}">
+					<data variable="tw_install_reboot"/>
+				</listitem>
 				<listitem name="{@use_rmrf_chk=Use rm -rf instead of formatting}">
 					<data variable="tw_rm_rf"/>
 				</listitem>
diff --git a/gui/theme/common/watch.xml b/gui/theme/common/watch.xml
index d7bba84..b61d3ef 100644
--- a/gui/theme/common/watch.xml
+++ b/gui/theme/common/watch.xml
@@ -526,9 +526,9 @@
 			</checkbox>
 
 			<checkbox>
-				<placement x="%indent%" y="%row4_y%" />
+				<placement x="%indent%" y="%row4_y%"/>
 				<text>{@install_reboot_chk=Reboot after installation is complete}</text>
-				<data variable="tw_install_reboot" />
+				<data variable="tw_install_reboot"/>
 			</checkbox>
 
 			<button>
@@ -3467,6 +3467,9 @@
 				<listitem name="{@zip_sig_chk=Zip signature verification}">
 					<data variable="tw_signed_zip_verify"/>
 				</listitem>
+				<listitem name="{@install_reboot_chk=Reboot after installation is complete}">
+					<data variable="tw_install_reboot"/>
+				</listitem>
 				<listitem name="{@use_rmrf_chk=Use rm -rf instead of formatting}">
 					<data variable="tw_rm_rf"/>
 				</listitem>
diff --git a/variables.h b/variables.h
index 5acae75..241c7dc 100644
--- a/variables.h
+++ b/variables.h
@@ -72,7 +72,7 @@
 #define TW_SKIP_MD5_GENERATE_VAR    "tw_skip_md5_generate"
 #define TW_DISABLE_FREE_SPACE_VAR   "tw_disable_free_space"
 #define TW_SIGNED_ZIP_VERIFY_VAR    "tw_signed_zip_verify"
-#define TW_REBOOT_AFTER_FLASH_VAR   "tw_reboot_after_flash_option"
+#define TW_INSTALL_REBOOT_VAR       "tw_install_reboot"
 #define TW_TIME_ZONE_VAR            "tw_time_zone"
 #define TW_RM_RF_VAR                "tw_rm_rf"