- QAction *split = actionCollection()->addAction(QStringLiteral("split_view"));
- split->setWhatsThis(xi18nc("@info:whatsthis find",
- "<para>This splits "
- "the folder view below into two autonomous views.</para><para>This "
- "way you can see two locations at once and move items between them "
- "quickly.</para>Click this again afterwards to recombine the views."));
- actionCollection()->setDefaultShortcut(split, Qt::Key_F3);
- connect(split, &QAction::triggered, this, &DolphinMainWindow::toggleSplitView);
+ Admin::WorkerIntegration::createActAsAdminAction(actionCollection(), this);
+
+ m_splitViewAction = actionCollection()->add<KActionMenu>(QStringLiteral("split_view"));
+ m_splitViewMenuAction = actionCollection()->addAction(QStringLiteral("split_view_menu"));
+
+ m_splitViewAction->setWhatsThis(xi18nc("@info:whatsthis split",
+ "<para>This presents "
+ "a second view side-by-side with the current view, so you can see "
+ "the contents of two folders at once and easily move items between "
+ "them.</para><para>The view that is not \"in focus\" will be dimmed. "
+ "</para>Click this button again to close one of the views."));
+ m_splitViewMenuAction->setWhatsThis(m_splitViewAction->whatsThis());
+
+ // only set it for the menu version
+ actionCollection()->setDefaultShortcut(m_splitViewMenuAction, Qt::Key_F3);
+
+ connect(m_splitViewAction, &QAction::triggered, this, &DolphinMainWindow::toggleSplitView);
+ connect(m_splitViewMenuAction, &QAction::triggered, this, &DolphinMainWindow::toggleSplitView);
+
+ QAction *popoutSplit = actionCollection()->addAction(QStringLiteral("popout_split_view"));
+ popoutSplit->setWhatsThis(xi18nc("@info:whatsthis",
+ "If the view has been split, this will pop the view in focus "
+ "out into a new window."));
+ popoutSplit->setIcon(QIcon::fromTheme(QStringLiteral("window-new")));
+ actionCollection()->setDefaultShortcut(popoutSplit, Qt::SHIFT | Qt::Key_F3);
+ connect(popoutSplit, &QAction::triggered, this, &DolphinMainWindow::popoutSplitView);