Commit ed5f5956 authored by Laurent Montel's avatar Laurent Montel 😁

Fix create actions

parent 1aefb7b2
......@@ -558,12 +558,14 @@ void ActionManagerImpl::initTabWidget(TabWidget *tabWidget)
action = KStandardAction::printPreview(d->tabWidget, SLOT(slotPrintPreview()), coll);
coll->addAction(QStringLiteral("viewer_printpreview"), action);
action = KStandardAction::printPreview(d->tabWidget, SLOT(slotMute()), coll);
coll->addAction(QStringLiteral("tab_mute"), action);
action = KStandardAction::printPreview(d->tabWidget, SLOT(slotUnMute()), coll);
coll->addAction(QStringLiteral("tab_unmute"), action);
action = coll->addAction(QStringLiteral("tab_mute"));
action->setText(i18n("Mute"));
connect(action, &QAction::triggered, d->tabWidget, &TabWidget::slotMute);
action = coll->addAction(QStringLiteral("tab_unmute"));
action->setText(i18n("Unmute"));
connect(action, &QAction::triggered, d->tabWidget, &TabWidget::slotUnMute);
action = new QAction(i18n("Speak Text"), this);
action->setIcon(QIcon::fromTheme(QStringLiteral("preferences-desktop-text-to-speech")));
......
......@@ -299,7 +299,8 @@ void ArticleViewerWebEngine::slotWebHitFinished(const WebEngineViewer::WebHitTes
popup.addAction(ActionManager::getInstance()->action(QStringLiteral("viewer_print")));
popup.addAction(ActionManager::getInstance()->action(QStringLiteral("viewer_printpreview")));
popup.addSeparator();
popup.addAction(pageAction(QWebEnginePage::SavePage));
popup.addAction(ActionManager::getInstance()->action(QStringLiteral("tab_mute")));
popup.addAction(ActionManager::getInstance()->action(QStringLiteral("tab_unmute")));
#endif
popup.addSeparator();
popup.addAction(ActionManager::getInstance()->action(QStringLiteral("find_in_messages")));
......
......@@ -115,7 +115,8 @@ void AkrWebEngineViewer::slotWebHitFinished(const WebEngineViewer::WebHitTestRes
popup.addSeparator();
popup.addAction(pageAction(QWebEnginePage::SavePage));
popup.addSeparator();
popup.addAction(pageAction(QWebEnginePage::ToggleMediaMute));
popup.addAction(ActionManager::getInstance()->action(QStringLiteral("tab_mute")));
popup.addAction(ActionManager::getInstance()->action(QStringLiteral("tab_unmute")));
#endif
const QList<QAction *> interceptorUrlActions = mNetworkAccessManager->interceptorUrlActions(result);
if (!interceptorUrlActions.isEmpty()) {
......
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