]> git.siccegge.de Git - frida/frida.git/commitdiff
Fix widget setup for scripting
authorChristoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Thu, 27 Nov 2014 12:18:03 +0000 (13:18 +0100)
committerChristoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Thu, 27 Nov 2014 12:18:03 +0000 (13:18 +0100)
src/gui/widgets/ScriptingDock.hxx

index e070955e15faeadfebcfb68922ee17d622023cd7..ce5319182a118387aa23327580bd407d87a4ed55 100644 (file)
@@ -9,14 +9,16 @@ class ScriptingDock : public QDockWidget {
 
 public:
     ScriptingDock(const QString& title, QWidget * parent = 0)
-        : logger(log4cxx::Logger::getLogger("ScriptingDock")) {
-        QDockWidget(title, parent);
+        : QDockWidget(title, parent)
+        , logger(log4cxx::Logger::getLogger("ScriptingDock")) {     
+        QTabWidget * tab = new QTabWidget;
         QWidget * widget = new QWidget;
-        widget->setLayout(layout = new QGridLayout(this));
+        widget->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);
-        setWidget(widget);
+        tab->addTab(widget, "GUILE");
+        ((QDockWidget*)this)->setWidget(tab);
         connect(button, SIGNAL(released()), this, SLOT(doEvaluate()));
         connect(line, SIGNAL(returnPressed()), this, SLOT(doEvaluate()));
         scm_init_guile();