diff --git a/src/gui/widget/shellwindow.cpp b/src/gui/widget/shellwindow.cpp index 4147fb717..a0602a68d 100644 --- a/src/gui/widget/shellwindow.cpp +++ b/src/gui/widget/shellwindow.cpp @@ -51,10 +51,14 @@ CShellWindow::CShellWindow(const std::string &Command, const int Mode, int *Res, textBox = NULL; frameBuffer = CFrameBuffer::getInstance(); - command = Command; - mode = Mode; - res = Res; + setCommand(Command, Mode, Res, auto_exec); +} +void CShellWindow::setCommand(const std::string &Command, const int Mode, int* Res, bool auto_exec) +{ + command = Command; + mode = Mode; + res = Res; if (auto_exec) exec(); } diff --git a/src/gui/widget/shellwindow.h b/src/gui/widget/shellwindow.h index 75cbd88f5..c875a22e4 100644 --- a/src/gui/widget/shellwindow.h +++ b/src/gui/widget/shellwindow.h @@ -56,6 +56,10 @@ class CShellWindow : public sigc::trackable }; CShellWindow(const std::string &Command, const int Mode = 0, int* Res = NULL, bool auto_exec = true); ~CShellWindow(); + void setCommand(const std::string &Command, const int Mode = 0, int* Res = NULL, bool auto_exec = true); + std::string getCommand(){return command;} + int getMode(){return mode;} + void exec(); /*!