Added Support for terminal from filemanager
* Now We can open terminal from current directory in filemanager
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
Change-Id: I6df9ee1222c1fa24105da1002abe3c180be2ded1
Signed-off-by: AndroiableDroid <mohd.faraz.abc@gmail.com>
diff --git a/gui/terminal.cpp b/gui/terminal.cpp
index 288a6c3..d7037e1 100755
--- a/gui/terminal.cpp
+++ b/gui/terminal.cpp
@@ -48,7 +48,6 @@
#endif
extern int g_pty_fd; // in gui.cpp where the select is
-
/*
Pseudoterminal handler.
*/
@@ -144,7 +143,7 @@
return -1;
}
int rc = ::write(fdMaster, buffer, size);
- debug_printf("pty write: %d bytes -> %d\n", size, rc);
+ debug_printf("pty write: %zu bytes -> %d\n", size, rc);
if (rc < 0) {
LOGERR("pty write failed: %d\n", errno);
// assume child has died
@@ -388,6 +387,14 @@
output(buffer[i]);
}
+ bool status() {
+ return pty.started();
+ }
+
+ void stop() {
+ pty.stop();
+ }
+
void clear()
{
cursorX = cursorY = 0;
@@ -901,6 +908,17 @@
// do nothing - terminal ignores selections
}
+bool GUITerminal::status()
+{
+ return engine->status();
+}
+
+void GUITerminal::stop()
+{
+ engine->stop();
+ engine->clear();
+}
+
void GUITerminal::InitAndResize()
{
// make sure the shell is started