D29006: Allow to copy or move selection to the other split view

Antonio Prcela noreply at phabricator.kde.org
Wed Apr 29 13:18:58 BST 2020


aprcela added a comment.


  In D29006#659534 <https://phabricator.kde.org/D29006#659534>, @dfaure wrote:
  
  > Yes I'd say those should be actions in the menus otherwise the feature is too hidden.
  
  
  So far I've added it in the following places but it does not appear. And I want it to appear, or change from selectable to not selectable (like cut,copy,paste), depending if Split View is active.
  Where else do I have to add it? I've seen some "edit" related stuff here: dolphinpart.cpp , dolphinpart.rc , dolphinui.rc
  
    diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
    index d2d4a3303..76d806039 100644
    --- a/src/dolphinmainwindow.cpp
    +++ b/src/dolphinmainwindow.cpp
    @@ -1181,6 +1181,8 @@ void DolphinMainWindow::updateControlMenu()
     
         // Add "Edit" actions
         bool added = addActionToMenu(ac->action(KStandardAction::name(KStandardAction::Undo)), menu) |
    +                 addActionToMenu(ac->action(QStringLiteral("copy_to_other_split_view")), menu) |
    +                 addActionToMenu(ac->action(QStringLiteral("move_to_other_split_view")), menu) |
                      addActionToMenu(ac->action(KStandardAction::name(KStandardAction::SelectAll)), menu) |
                      addActionToMenu(ac->action(QStringLiteral("invert_selection")), menu);
     
    @@ -1419,14 +1421,16 @@ void DolphinMainWindow::setupActions()
         copyToOtherViewAction->setWhatsThis(xi18nc("@info:whatsthis Copy", "This copies the selected items from "
             "the <emphasis>active</emphasis> view to the other split view."));
         copyToOtherViewAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-copy")));
    +    copyToOtherViewAction->setIconText(i18nc("@action:inmenu Edit", "Copy to other view"));
         actionCollection()->setDefaultShortcut(copyToOtherViewAction, Qt::CTRL + Qt::Key_F5 );
         connect(copyToOtherViewAction, &QAction::triggered, this, &DolphinMainWindow::copyToOtherView);
     
         QAction* moveToOtherViewAction = actionCollection()->addAction(QStringLiteral("move_to_other_split_view"));
         moveToOtherViewAction->setText(i18nc("@action:inmenu", "Move selection to the other view"));
    -    moveToOtherViewAction->setWhatsThis(xi18nc("@info:whatsthis Move", "This moves the items from "
    +    moveToOtherViewAction->setWhatsThis(xi18nc("@info:whatsthis Move", "This moves the selected items from "
             "the <emphasis>active</emphasis> view to the other split view."));
         moveToOtherViewAction->setIcon(QIcon::fromTheme(QStringLiteral("edit-cut")));
    +    moveToOtherViewAction->setIconText(i18nc("@action:inmenu Edit", "Move to other view"));
         actionCollection()->setDefaultShortcut(moveToOtherViewAction, Qt::CTRL + Qt::Key_F6 );
         connect(moveToOtherViewAction, &QAction::triggered, this, &DolphinMainWindow::moveToOtherView);
     
    diff --git a/src/dolphinui.rc b/src/dolphinui.rc
    index e717b67ae..70426433b 100644
    --- a/src/dolphinui.rc
    +++ b/src/dolphinui.rc
    @@ -20,6 +20,8 @@
                 <Action name="properties" />
             </Menu>
             <Menu name="edit">
    +            <Action name="copy_to_other_split_view" />
    +            <Action name="move_to_other_split_view" />
                 <Action name="edit_select_all" />
                 <Action name="invert_selection" />
             </Menu>

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D29006

To: aprcela, #dolphin, elvisangelaccio, ngraham, meven
Cc: dfaure, meven, kfm-devel, azyx, nikolaik, pberestov, iasensio, aprcela, fprice, fbampaloukas, alexde, Codezela, feverfew, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, rdieter, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200429/14b24aae/attachment.htm>


More information about the kfm-devel mailing list