aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow')
-rw-r--r--src/mainwindow/mainwindow.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp
index 5129abc..88a0b42 100644
--- a/src/mainwindow/mainwindow.cpp
+++ b/src/mainwindow/mainwindow.cpp
@@ -28,6 +28,7 @@
#include <configuration/configuration.h>
#include <QJsonObject>
#include <QJsonArray>
+#include "browser.h"
MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent)
: QMainWindow(parent)
@@ -113,9 +114,13 @@ void MainWindow::createMenuBar()
auto *smolboteMenu = menuBar()->addMenu(qApp->applicationDisplayName());
smolboteMenu->addAction(tr("New tab group"), this, [this]() {
createSubWindow();
- },
- QKeySequence(m_config->value<std::string>("mainwindow.shortcuts.newGroup").value().c_str()));
- smolboteMenu->addAction(tr("New window"))->setEnabled(false);
+ }, QKeySequence(m_config->value<std::string>("mainwindow.shortcuts.newGroup").value().c_str()));
+
+ smolboteMenu->addAction(tr("New window"), this, [this]() {
+ auto *browser = qobject_cast<Browser *>(qApp);
+ if(browser)
+ browser->createWindow();
+ }, QKeySequence(m_config->value<std::string>("mainwindow.shortcuts.newWindow").value().c_str()));
smolboteMenu->addSeparator();