mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 17:31:11 +02:00
COPKGManager: add member to handle line of shell lines
prepared for use as callback in shell window class, currently
it is not possible to get line output from shellwindow object, this
should help soon
also added ne locales
Origin commit data
------------------
Commit: 4909844ad6
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-12-10 (Wed, 10 Dec 2014)
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
#include <errno.h>
|
||||
#include <system/debug.h>
|
||||
|
||||
CShellWindow::CShellWindow(const std::string &Command, const int Mode, int *Res)
|
||||
CShellWindow::CShellWindow(const std::string &Command, const int Mode, int *Res, bool auto_exec)
|
||||
{
|
||||
textBox = NULL;
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
@@ -55,7 +55,8 @@ CShellWindow::CShellWindow(const std::string &Command, const int Mode, int *Res)
|
||||
mode = Mode;
|
||||
res = Res;
|
||||
|
||||
exec();
|
||||
if (auto_exec)
|
||||
exec();
|
||||
}
|
||||
|
||||
void CShellWindow::exec()
|
||||
@@ -152,6 +153,10 @@ void CShellWindow::exec()
|
||||
lines.push_back(line);
|
||||
incomplete = true;
|
||||
}
|
||||
|
||||
//callback for line handler
|
||||
std::string s_output = std::string((output));
|
||||
OnShellOutputLoop(s_output);
|
||||
if (lines.size() > lines_max)
|
||||
lines.pop_front();
|
||||
txt = "";
|
||||
|
Reference in New Issue
Block a user