Diffusion KIO 3f5c18e7afd8

Improve consistency of "Open With" UI by always showing top app inline

Authored by ngraham on Mar 22 2018, 3:05 AM.

Description

Improve consistency of "Open With" UI by always showing top app inline

Summary:
This patch adjusts the Open With UI to improve the strings and always display the top app inline, outside of the sub-menu.

This presents the following advantages over the status quo:

  • The same UI is used whether there's one or 10 apps: the first one is shown inline, and the other ones go into the sub-menu
  • Access to the top app is faster since you don't have to bother with the sub-menu
  • It's now clear from the context menu what app will open the file by default

Test Plan:

  • Right-click on a file in Dolphin with no handlers:
  • Right-click on a folder in Dolphin with one handler:
  • Right-click on an image in Dolphin when there are 5 image handlers:
  • Click on any of the menu items in the above cases; all work
  • Open Gwenviewnavigate to an imageright-click: no change, Gwenview uses a custom implementation in fileopscontextmanageritem.cpp rather than this nice API, boo

Reviewers: rkflx, VDG, Frameworks, Dolphin, dfaure, elvisangelaccio, abetts

Reviewed By: rkflx, VDG, dfaure, abetts

Subscribers: mmustac, davidedmundson, broulik, dfaure, elvisangelaccio, anthonyfieroni, abetts

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D11569

Details