BUG: 332817
Details
- Reviewers
dfaure - Group Reviewers
Plasma - Commits
- R119:1193971e9a27: [Component Chooser] Update http(s) scheme handler when changing default browser
Similar to how it's done with mailto in the Email client chooser.
Didn't actually test any of the apps mentioned but xdg-mime query default x-scheme-handler/http returned the correct handler after I changed the setting. If no service is found (custom commandline), the entry is removed from config and the inherited one from /usr/share/applications (Firefox in my case) will be used.
Should we also update the handler for text/html mime type?
(This obviously doesn't help when the user installed the browser that did not register itself as scheme handler and then does not touch this setting here...)
Diff Detail
- Repository
- R119 Plasma Desktop
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
kcms/componentchooser/componentchooserbrowser.cpp | ||
---|---|---|
132 | Don't you mean mimeAppsList->sync()? |
- Sync mimeAppList instead of profile, fixes the change not being reflected immediately
I suppose updating the handler for text/html would make sense too, so that clicking on a local HTML file opens the same webbrowser.
Some people editing HTML files might prefer that local html files open kate though -- but they can simply set that afterwards...
or we could have more advanced logic here like "if the current handler for text/html is a WebBrowser then adjust it otherwise leave it alone"...
I suppose updating the handler for text/html would make sense too, so that clicking on a local HTML file opens the same webbrowser.
Well, KRun has a special case for text/html to always open them in the default browser, no matter what. So you cannot actually have Kate as your default app for HTML :D
Ah, I see. (comes from https://git.reviewboard.kde.org/r/103524). I think the reasoning was "after I set Firefox as my browser app, local HTML files still open in konqueror... bug!!! I shouldn't have to configure it twice".
But actually we get more flexibility if we don't mix up the two things. I.e. a user should be able to choose a browser *and* choose kate for local html files.
So I vote for
- setting the handler for text/html from here (if it's another BrowserApp)
- removing the text/html hack in KRun
This way in the simple case, both HTTP and *.html open in your preferred browser,
but for more advanced users it's still possible to open HTML files in something else.
PS: keditbookmarks shows up in the combo because it's been tagged WebBrowser, I guess for menu organization purposes. But it's not a webbrowser, so I'm not sure how to fix that...