Commit 8f69cad4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Show others actions otherwise we can remove them

parent b5e0eb87
......@@ -262,6 +262,8 @@ void Pane::setXmlGuiClient(KXMLGUIClient *xmlGuiClient)
d->onNewTabClicked();
});
d->mActionMenu->addAction(action);
d->mActionMenu->addSeparator();
d->mMaxTabCreated = count();
for (int i = 1; i < 10 && i <= count(); ++i) {
......@@ -310,22 +312,13 @@ void Pane::setXmlGuiClient(KXMLGUIClient *xmlGuiClient)
d->mActionMenu->addSeparator();
d->mCloseTabAction = new QAction(i18n("Close Tab"), this);
d->mXmlGuiClient->actionCollection()->addAction(QStringLiteral("close_current_tab"), d->mCloseTabAction);
d->mXmlGuiClient->actionCollection()->setDefaultShortcuts(d->mCloseTabAction, QList<QKeySequence>() << QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_W) << QKeySequence(Qt::CTRL + Qt::Key_W));
connect(d->mCloseTabAction, &QAction::triggered, this, [this]() {
d->onCloseTabClicked();
});
d->mActionMenu->addAction(d->mCloseTabAction);
d->mCloseTabAction->setEnabled(false);
d->mMoveTabLeftAction = new QAction(i18n("Move Tab Left"), this);
d->mXmlGuiClient->actionCollection()->addAction(QStringLiteral("move_tab_left"), d->mMoveTabLeftAction);
d->mMoveTabLeftAction->setEnabled(false);
connect(d->mMoveTabLeftAction, &QAction::triggered, this, [this]() {
d->moveTabLeft();
});
d->mActionMenu->addAction(d->mMoveTabLeftAction);
d->mMoveTabRightAction = new QAction(i18n("Move Tab Right"), this);
d->mXmlGuiClient->actionCollection()->addAction(QStringLiteral("move_tab_right"), d->mMoveTabRightAction);
......@@ -333,6 +326,21 @@ void Pane::setXmlGuiClient(KXMLGUIClient *xmlGuiClient)
connect(d->mMoveTabRightAction, &QAction::triggered, this, [this]() {
d->moveTabRight();
});
d->mActionMenu->addAction(d->mMoveTabRightAction);
d->mActionMenu->addSeparator();
d->mCloseTabAction = new QAction(i18n("Close Tab"), this);
d->mXmlGuiClient->actionCollection()->addAction(QStringLiteral("close_current_tab"), d->mCloseTabAction);
d->mXmlGuiClient->actionCollection()->setDefaultShortcuts(d->mCloseTabAction, QList<QKeySequence>() << QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_W) << QKeySequence(Qt::CTRL + Qt::Key_W));
connect(d->mCloseTabAction, &QAction::triggered, this, [this]() {
d->onCloseTabClicked();
});
d->mActionMenu->addAction(d->mCloseTabAction);
d->mCloseTabAction->setEnabled(false);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment