Add log widget to lower dock
[frida/frida.git] / src / gui / Mainwindow.cxx
index 2036c486b705bb872ba51e037deeb3bb1cfb649b..269f3e7359d7c82b89e613c011d6f614097cee0a 100644 (file)
@@ -6,6 +6,9 @@
 #include "core/BasicBlock.hxx"
 #include "core/InformationManager.hxx"
 #include "core/events/RenameFunctionEvent.hxx"
+
+#include "widgets/FridaDock.hxx"
+#include "widgets/LogDock.hxx"
 #include "widgets/ScriptingDock.hxx"
 #include "widgets/CFGScene.hxx"
 #include "widgets/FunctionWidget.hxx"
@@ -44,9 +47,13 @@ Mainwindow::Mainwindow(InformationManager* mgr)
        if (!loader->load())
                LOG4CXX_ERROR(logger, "Loading plugin failed: " << loader->errorString().toStdString());
        interpreter["GUILE"] = qobject_cast<Interpreter*>(loader->instance());
-       scripting = new ScriptingDock(interpreter["GUILE"], tr("Scripting"), this);
-       scripting->setAllowedAreas(Qt::BottomDockWidgetArea);
-       addDockWidget(Qt::BottomDockWidgetArea, scripting);
+       fdock = new FridaDock(tr("Frida Dock"), this);
+
+       fdock->addTab(new LogDock(fdock), "Log");
+
+       fdock->addTab(new ScriptingDock(interpreter["GUILE"], fdock), "guile");
+       fdock->setAllowedAreas(Qt::BottomDockWidgetArea);
+       addDockWidget(Qt::BottomDockWidgetArea, fdock);
        QAction* guileLoad = new QAction(tr("&GUILE"), this);
        interpretermenu->addAction(guileLoad);
        connect(guileLoad, &QAction::triggered,