Add log widget to lower dock
[frida/frida.git] / src / gui / widgets / ScriptingDock.cxx
index b334d712a1f20f552b6dab689fa57bc26e457c08..8e5f3cf38f4a44a0f60d00dfae0c6e743a8c9fbc 100644 (file)
@@ -1,20 +1,18 @@
 #include "ScriptingDock.hxx"
+#include "FridaDock.hxx"
+
 #include "bindings/Interpreter.hxx"
 
 #include <sstream>
 
-ScriptingDock::ScriptingDock(Interpreter* interpreter, const QString& title, QWidget * parent)
-       : QDockWidget(title, parent)
+ScriptingDock::ScriptingDock(Interpreter* interpreter, FridaDock* parent)
+       : QWidget(parent)
        , logger(log4cxx::Logger::getLogger("ScriptingDock"))
        , interpreter(interpreter) {
-       QTabWidget * tab = new QTabWidget;
-       QWidget * widget = new QWidget;
-       widget->setLayout(layout = new QGridLayout);
+       setLayout(layout = new QGridLayout);
        layout->addWidget(browser = new QTextBrowser, 0, 0, 1, 0);
        layout->addWidget(line = new QLineEdit, 1, 0);
        layout->addWidget(button = new QPushButton(tr("Evaluate")), 1, 1);
-       tab->addTab(widget, "GUILE");
-       ((QDockWidget*)this)->setWidget(tab);
        connect(button, SIGNAL(released()), this, SLOT(doEvaluate()));
        connect(line, SIGNAL(returnPressed()), this, SLOT(doEvaluate()));
 }