GUI: Terminal command: minor improvements
* Use mono font for terminal command input * Recognize 'exit' command (go to main page) Change-Id: I5f383cd8d19959a49d2ae0b18f839b86e4145693
This commit is contained in:
@@ -1321,6 +1321,10 @@ int GUIAction::terminalcommand(std::string arg)
|
||||
if (simulate) {
|
||||
simulate_progress_bar();
|
||||
operation_end(op_status);
|
||||
} else if (arg == "exit") {
|
||||
LOGINFO("Exiting terminal\n");
|
||||
operation_end(op_status);
|
||||
page("main");
|
||||
} else {
|
||||
command = "cd \"" + cmdpath + "\" && " + arg + " 2>&1";;
|
||||
LOGINFO("Actual command is: '%s'\n", command.c_str());
|
||||
|
||||
@@ -3371,6 +3371,7 @@
|
||||
<condition var1="tw_terminal_state" var2="0" />
|
||||
<placement x="%input_x%" y="%terminal_text_y%" w="%terminal_input_width%" h="%input_height%" placement="0" />
|
||||
<text>%tw_terminal_command%</text>
|
||||
<font resource="fixed" color="%text_color%" />
|
||||
<data name="tw_terminal_command" />
|
||||
<restrict minlen="1" />
|
||||
<action function="terminalcommand">%tw_terminal_command%</action>
|
||||
|
||||
@@ -3398,6 +3398,7 @@
|
||||
<condition var1="tw_terminal_state" var2="0" />
|
||||
<placement x="%col1_x%" y="%terminal_text_y%" w="%input_width%" h="%input_height%" placement="0" />
|
||||
<text>%tw_terminal_command%</text>
|
||||
<font resource="fixed" color="%text_color%" />
|
||||
<data name="tw_terminal_command" />
|
||||
<restrict minlen="1" />
|
||||
<action function="terminalcommand">%tw_terminal_command%</action>
|
||||
|
||||
@@ -3389,6 +3389,7 @@
|
||||
<condition var1="tw_terminal_state" var2="0" />
|
||||
<placement x="%col1_x%" y="%terminal_text_y%" w="%input_width%" h="%input_height%" placement="0" />
|
||||
<text>%tw_terminal_command%</text>
|
||||
<font resource="fixed" color="%text_color%" />
|
||||
<data name="tw_terminal_command" />
|
||||
<restrict minlen="1" />
|
||||
<action function="terminalcommand">%tw_terminal_command%</action>
|
||||
|
||||
Reference in New Issue
Block a user