nano: Add File Manager option to edit selected file
Change-Id: Ie7d940545569e6de976d2a51666b692f3fc23798
diff --git a/gui/theme/common/landscape.xml b/gui/theme/common/landscape.xml
index 17977e2..5ffa146 100755
--- a/gui/theme/common/landscape.xml
+++ b/gui/theme/common/landscape.xml
@@ -4086,6 +4086,19 @@
</button>
<button style="main_button_half_width">
+edi <conditions>
+ <condition var1="tw_include_nano" var2="1"/>
+ <condition var1="tw_fm_isfolder" var2="0"/>
+ </conditions>
+ <placement x="%col1_x_left%" y="%row15a_y%"/>
+ <text>{@fm_edit_file=Edit File}</text>
+ <actions>
+ <action function="editfile">nano "%tw_filename1%"</action>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </button>
+
+ <button style="main_button_half_width">
<placement x="%col2_x_left%" y="%row11_y%"/>
<text>{@fm_move_btn=Move}</text>
<actions>
diff --git a/gui/theme/common/languages/en.xml b/gui/theme/common/languages/en.xml
index 497d088..352bffa 100755
--- a/gui/theme/common/languages/en.xml
+++ b/gui/theme/common/languages/en.xml
@@ -460,6 +460,7 @@
<string name="fm_perms">Permissions:</string>
<string name="fm_complete">File Operation Complete</string>
<string name="fm_open_terminal_btn">Open Terminal Here</string>
+ <string name="fm_edit_file">Edit File</string>
<string name="decrypt_data_hdr">Decrypt Data</string>
<string name="decrypt_data_enter_pass">Enter Password.</string>
<string name="decrypt_data_failed">Password failed, please try again!</string>
diff --git a/gui/theme/common/portrait.xml b/gui/theme/common/portrait.xml
index ea52af8..3a11170 100755
--- a/gui/theme/common/portrait.xml
+++ b/gui/theme/common/portrait.xml
@@ -4188,6 +4188,19 @@
</text>
<button style="main_button_half_height">
+ <conditions>
+ <condition var1="tw_include_nano" var2="1"/>
+ <condition var1="tw_fm_isfolder" var2="0"/>
+ </conditions>
+ <placement x="%indent%" y="%row12a_y%"/>
+ <text>{@fm_edit_file=Edit File}</text>
+ <actions>
+ <action function="editfile">nano "%tw_filename1%"</action>
+ <action function="page">terminalcommand</action>
+ </actions>
+ </button>
+
+ <button style="main_button_half_height">
<condition var1="tw_fm_isfolder" var2="1"/>
<placement x="%center_x%" y="%row12a_y%"/>
<text>{@fm_open_terminal_btn=Open Terminal Here}</text>