Summary:
BUG: 384352
Add an "Open in New Window" menu item to the context menu for Dolphin's places items.
Test Plan:
Tested in up-to-date KDE Neon. Works as expected:
{
F3898707}
Reviewers: #dolphin, #kde_applications, dfaure, aacid, elvisangelaccio, emmanuelp, broulik
Reviewed By: #dolphin, emmanuelp, broulik
Subscribers: alexeymin, emmanuelp, broulik, sefaeyeoglu, #dolphin
Tags: #dolphin
Differential Revision: https://phabricator.kde.org/D7690
#include "dolphin_generalsettings.h"
#include "dolphin_generalsettings.h"
#include <KFileItem>
#include "dolphindebug.h"
#include <KDirNotify>
#include <KFileItem>
#include "dolphindebug.h"
#include <KDirNotify>
+ QAction* openInNewWindowAction = menu.addAction(QIcon::fromTheme("window-new"), i18nc("@item:inmenu", "Open in New Window"));
QAction* openInNewTabAction = menu.addAction(QIcon::fromTheme("tab-new"), i18nc("@item:inmenu", "Open in New Tab"));
if (!isDevice && !isTrash) {
menu.addSeparator();
QAction* openInNewTabAction = menu.addAction(QIcon::fromTheme("tab-new"), i18nc("@item:inmenu", "Open in New Tab"));
if (!isDevice && !isTrash) {
menu.addSeparator();
} else if (action == hideAction) {
item->setHidden(hideAction->isChecked());
m_model->saveBookmarks();
} else if (action == hideAction) {
item->setHidden(hideAction->isChecked());
m_model->saveBookmarks();
+ } else if (action == openInNewWindowAction) {
+ Dolphin::openNewWindow({PlacesItemModel::convertedUrl(m_model->data(index).value("url").toUrl())}, this);
} else if (action == openInNewTabAction) {
// TriggerItem does set up the storage first and then it will
// emit the slotItemMiddleClicked signal, because of Qt::MiddleButton.
} else if (action == openInNewTabAction) {
// TriggerItem does set up the storage first and then it will
// emit the slotItemMiddleClicked signal, because of Qt::MiddleButton.