diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2019-11-14 19:19:57 +0300 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-11-14 20:10:16 +0100 |
commit | cd11a8597a3f1759692b50d241088d6e5dd1ecf7 (patch) | |
tree | 2c804a513124c23b57383c009577b9068f1ef528 /DevTools/HackStudio | |
parent | d29a078ab3a60887b1a950bda345472c6d312cc5 (diff) | |
download | serenity-cd11a8597a3f1759692b50d241088d6e5dd1ecf7.zip |
HackStudio: Add TerminalWrapper::on_command_exit
Diffstat (limited to 'DevTools/HackStudio')
-rw-r--r-- | DevTools/HackStudio/TerminalWrapper.cpp | 3 | ||||
-rw-r--r-- | DevTools/HackStudio/TerminalWrapper.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/DevTools/HackStudio/TerminalWrapper.cpp b/DevTools/HackStudio/TerminalWrapper.cpp index 4319666994..2314c233de 100644 --- a/DevTools/HackStudio/TerminalWrapper.cpp +++ b/DevTools/HackStudio/TerminalWrapper.cpp @@ -47,6 +47,9 @@ void TerminalWrapper::run_command(const String& command) } m_process_state_widget->set_tty_fd(-1); m_pid = -1; + + if (on_command_exit) + on_command_exit(); }; m_pid = fork(); diff --git a/DevTools/HackStudio/TerminalWrapper.h b/DevTools/HackStudio/TerminalWrapper.h index 5da7766199..30318736d9 100644 --- a/DevTools/HackStudio/TerminalWrapper.h +++ b/DevTools/HackStudio/TerminalWrapper.h @@ -12,6 +12,8 @@ public: void run_command(const String&); + Function<void()> on_command_exit; + private: explicit TerminalWrapper(GWidget* parent); |