Bug 397069 - Lack of options in Chromium, using kdialog
Summary: Lack of options in Chromium, using kdialog
Status: RESOLVED WORKSFORME
Alias: None
Product: kdialog
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Brad Hards
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-01 22:20 UTC by Luca Mastromatteo
Modified: 2020-12-24 04:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
KDialog does not show any option when saving pages, when uninstalling kdialog, the program whish chromium uses works (110.84 KB, application/zip)
2018-08-01 22:20 UTC, Luca Mastromatteo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Mastromatteo 2018-08-01 22:20:04 UTC
Created attachment 114258 [details]
KDialog does not show any option when saving pages, when uninstalling kdialog, the program whish chromium uses works

Basically I've got Kdialog installed in my system, and Chromium, when saving an HTML page for example, uses it as it's first choice. 

The problem is that does not work properly, it integrates nicely with the Plasma desktop but lacks in the typical chrome page-saving options, in fact, when you save a web page in Chromium/Chrome, it lets you choose which component you want to download, if just HTML, or HTML + Entire page, (See screenshot to understand it better)

But, the only option I see when using kdialog is "HTML Document" and in fact it does not save all the web page files since it does not let me to choose what to save. So that is strange.
Comment 1 Rex Dieter 2018-08-02 03:49:25 UTC
I strongly suspect this is something that chrome/chromium will have to implement (little to nothing can be done on the kde side of things)
Comment 2 Kai Uwe Broulik 2018-08-02 14:16:51 UTC
The problem is as follows:

Chromium has a "HTML only" and "HTML full page" filter that both have *.htm as their extension. When it generates the kdialog call it translates the extension to a mime type and ends up with text/html for both and you end up with just "HTML Document".

A more correct approach would be passing a custom filter string to kdialog:
kdialog --getsavefilename ~ "Webpage, Complete (*.htm *.html)|Webpage, HTML Only (*.htm *.html)"

Which leads us to the other problem: KDialog only returns the chosen file name(s) but not the chosen mime filter as having two file types which are the same isn't usually what you do.

The only solution I can see is adding a cmdline arg to kdialog ("--print-selected-filter") or something and then adjusting Chrome to use that method if a kdialog version supporting that flag is installed.
Comment 3 Christoph Feck 2018-08-02 15:06:47 UTC
Bug 378295 suggested to use different MIME types for the different save options. Not sure if it is possible to use this in Chrome as a workaround.
Comment 4 Kai Uwe Broulik 2018-08-02 20:47:32 UTC
There's a chrome://flags to enable MHTML (all assets bundled into a single Web page file) which works just fine as it's a distinct mime type and extension.

Using a different mime type won't change the fact that both are ".htm" and as such it cannot fell from the returned path what option the user chose
Comment 5 Justin Zobel 2020-11-24 04:56:49 UTC
I've just tested this on KDE Neon User Edition (uses Chromium snap due to Ubuntu) and I get the options.

Can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I've set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.
Comment 6 Bug Janitor Service 2020-12-09 04:34:09 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2020-12-24 04:34:57 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!