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

Elvis Angelaccio noreply at phabricator.kde.org
Sun Apr 8 12:04:08 BST 2018


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




INLINE COMMENTS

> dolphincontextmenu.cpp:201-210
> +            // insert 'Open in new window' and 'Open in new tab' entries
> +            addAction(m_mainWindow->actionCollection()->action(QStringLiteral("open_in_new_window")));
> +            addAction(m_mainWindow->actionCollection()->action(QStringLiteral("open_in_new_tab")));
> +
> +            // insert 'Add to Places' entry
> +            if (!placeExists(m_fileInfo.url())) {
> +                addToPlacesAction = addAction(QIcon::fromTheme(QStringLiteral("bookmark-new")),

In the folder case I'd put "Open With" after these actions, without a separator.

On Windows "Open With" is always at the end of the first section, before the first separator.

> dolphincontextmenu.cpp:282
>  
> -    KFileItemActions fileItemActions;
>      fileItemActions.setItemListProperties(selectedItemsProps);
>      addServiceActions(fileItemActions);

This is now already called at line 196.

> dolphincontextmenu.cpp:478-481
>      fileItemActions.setParentWidget(m_mainWindow);
>  
>      // insert 'Open With...' action or sub menu
>      fileItemActions.addOpenWithActionsTo(this, QStringLiteral("DesktopEntryName != '%1'").arg(qApp->desktopFileName()));

This refactoring removes the "Open With" submenu from the viewport context menu.

REPOSITORY
  R318 Dolphin

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

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


More information about the kfm-devel mailing list