X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/042b0c84099c062847fa2ed46a145624a96f90ca..43da84eefc7d:/src/dolphinmainwindow.cpp?ds=sidebyside diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 431ecda44..e28e540d1 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -290,7 +290,7 @@ void DolphinMainWindow::updateFilterBarAction(bool show) void DolphinMainWindow::openNewMainWindow() { - Dolphin::openNewWindow({}, this); + Dolphin::openNewWindow({m_activeViewContainer->url()}, this); } void DolphinMainWindow::openNewActivatedTab() @@ -1015,12 +1015,8 @@ void DolphinMainWindow::setupActions() SLOT(undo()), actionCollection()); - // need to remove shift+del from cut action, else the shortcut for deletejob - // doesn't work - QAction* cut = KStandardAction::cut(this, SLOT(cut()), actionCollection()); - auto cutShortcuts = cut->shortcuts(); - cutShortcuts.removeAll(QKeySequence(Qt::SHIFT | Qt::Key_Delete)); - actionCollection()->setDefaultShortcuts(cut, cutShortcuts); + + KStandardAction::cut(this, SLOT(cut()), actionCollection()); KStandardAction::copy(this, SLOT(copy()), actionCollection()); QAction* paste = KStandardAction::paste(this, SLOT(paste()), actionCollection()); // The text of the paste-action is modified dynamically by Dolphin @@ -1316,7 +1312,7 @@ void DolphinMainWindow::updateEditActions() KActionCollection* col = actionCollection(); QAction* renameAction = col->action(QStringLiteral("rename")); QAction* moveToTrashAction = col->action(QStringLiteral("move_to_trash")); - QAction* deleteAction = col->action(QStringLiteral("delete")); + QAction* deleteAction = col->action(KStandardAction::name(KStandardAction::DeleteFile)); QAction* cutAction = col->action(KStandardAction::name(KStandardAction::Cut)); QAction* deleteWithTrashShortcut = col->action(QStringLiteral("delete_shortcut")); // see DolphinViewActionHandler @@ -1457,6 +1453,8 @@ void DolphinMainWindow::connectViewSignals(DolphinViewContainer* container) this, static_cast(&DolphinMainWindow::goBack)); connect(view, &DolphinView::goForwardRequested, this, static_cast(&DolphinMainWindow::goForward)); + connect(view, &DolphinView::urlActivated, + this, &DolphinMainWindow::handleUrl); const KUrlNavigator* navigator = container->urlNavigator(); connect(navigator, &KUrlNavigator::urlChanged,