D24828: KRun: don't override user preferred app when opening local *.*html and co. files

Ahmad Samir noreply at phabricator.kde.org
Mon Oct 21 12:50:23 BST 2019


ahmadsamir created this revision.
ahmadsamir added reviewers: Frameworks, dfaure.
Herald added a project: Frameworks.
ahmadsamir requested review of this revision.

REVISION SUMMARY
  KRun unconditionally opened files with mimetype text/html (and co.) with
  the browser application set in kdeglobals, BrowserApplication=, and if it's
  not set, it fells back to mimeapps.list (x-scheme-handler/http*).
  
  IMHO, there are two distinctive use cases here, opening http*:// links
  with a web browser (which is what the user wants most of the time); and
  opening local '.*html' files on the user's machine, usually with the
  intention to edit them; the two cases can/should be mutually exclusive.
  
  This gives the choice back to the user, as he can set his preferred app
  to open local .html files, be it a web browser or a text editor.
  
  This won't impact new user accounts because most browsers .desktop files
  have Mimetype entries that cover most of the .html and co. types. So it'll
  either be the default app already or the user can select his favourite browser
  from the open-with list.
  
  Thanks to broulik for pin-pointing the location in the code that caused
  this behaviour first.
  
  BUG: 399020
  FIXED-IN: 5.64

TEST PLAN
  - Set some web browser as the default in the component chooser kcm
  - Open Dolphin and using any .html file set the default app to, say, kwrite
  - Try to open a local .html file, notice that it opens in the web browser you set
  - Apply the patch, then try again, it should be opened with kwrite

REPOSITORY
  R241 KIO

BRANCH
  ahmad/separate-browser-html (branched from master)

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

AFFECTED FILES
  src/widgets/krun.cpp

To: ahmadsamir, #frameworks, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191021/086275b4/attachment.html>


More information about the Kde-frameworks-devel mailing list