D11884: Move "Open" actions to the top of the context menu for files

Elvis Angelaccio noreply at phabricator.kde.org
Sat Apr 21 16:38:50 BST 2018


elvisangelaccio requested changes to this revision.
elvisangelaccio added a comment.
This revision now requires changes to proceed.


  UI looks good now, but I think there is still room for improvements in the code. See inline comment.

INLINE COMMENTS

> dolphincontextmenu.cpp:495-501
> +void DolphinContextMenu::addServiceActions(KFileItemActions& fileItemActions)
> +{
> +    fileItemActions.setParentWidget(m_mainWindow);
>  
>      // insert 'Actions' sub menu
>      fileItemActions.addServiceActionsTo(this);
>  }

The `addServiceActions()` function doesn't make sense anymore. We can move the `fileItemActions.setParentWidget(m_mainWindow)` call after we define the `fileItemActions` object, so we can even remove this line from the new `addOpenWithActions()` function.

Then we can just call `fileItemActions.addServiceActionsTo(this)` instead of calling `addServiceActions()`.

REPOSITORY
  R318 Dolphin

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

To: ngraham, #dolphin, #vdg, elvisangelaccio, abetts
Cc: markg, abetts, elvisangelaccio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20180421/2c815719/attachment.htm>


More information about the kfm-devel mailing list