Bug 409801 - Disabling MIME-based actions has no effect
Summary: Disabling MIME-based actions has no effect
Status: RESOLVED FIXED
Alias: None
Product: klipper
Classification: Unmaintained
Component: general (show other bugs)
Version: 5.16.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-14 21:19 UTC by Nicolas Girard
Modified: 2019-12-05 03:54 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.17.5
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Girard 2019-07-14 21:19:06 UTC
SUMMARY

On Kubuntu 19.04, using plasma-workspace 5.16.3-0ubuntu1~ubuntu19.04~ppa1 package from http://ppa.launchpad.net/kubuntu-ppa/backports/ubuntu, unchecking "Enable MIME-based actions" checkbox from configuration panel has no effect.

STEPS TO REPRODUCE
1. Open Klipper configuration panel
2. Click "Actions" tab
3. Uncheck "Enable MIME-based actions" checkbox
4. Close configuration window
5. Copy "https://www.google.com" to clipboard

OBSERVED RESULT

A popup titled "HTML document - Actions for: https://www.google.com" shows up.

EXPECTED RESULT

No popup should show up.


As a consequence of this defect, custom actions using tailor-cut regexes are completely drowned by the numerous, unwanted MIME-based actions showing up.

For what is worth, the configuration option is properly stored: 
grep EnableMagicMimeActions ~/.config/klipperrc 
returns

EnableMagicMimeActions=false
Comment 1 North 2019-09-19 22:17:31 UTC
This bug is still present.  I don't know which version of Klipper I have but I have Qt: 5.12.4, KDE Frameworks: 5.62.0 and kf5-config: 1.0.  My OS is PCLinuxOS and kernel is 5.2.8.  This is a longstanding issue.

I edit an entry on Klipper and press OK.  I get a popup with the options copy, disable this popup, cancel.  I press "disable this popup".  I copy something else and select the entry for editing; after editing, I press OK and I get the popup again.  I check in Configure Clipboard > Actions and "Enable MIME-based actions" is NOT selected.  I get the popup every time I edit a clipboard entry and press OK.
Comment 2 North 2019-10-10 01:49:47 UTC
(In reply to North from comment #1)
> This bug is still present.  I don't know which version of Klipper I have but
> I have Qt: 5.12.4, KDE Frameworks: 5.62.0 and kf5-config: 1.0.  My OS is
> PCLinuxOS and kernel is 5.2.8.  This is a longstanding issue.
> 
> I edit an entry on Klipper and press OK.  I get a popup with the options
> copy, disable this popup, cancel.  I press "disable this popup".  I copy
> something else and select the entry for editing; after editing, I press OK
> and I get the popup again.  I check in Configure Clipboard > Actions and
> "Enable MIME-based actions" is NOT selected.  I get the popup every time I
> edit a clipboard entry and press OK.

After adding this comment, it seemed my issue is different so I filed bug report 412264.
Comment 3 Michael 2019-10-27 16:37:33 UTC
KDE Plasma Version: 5.17.1
KDE Frameworks Version: 5.63.0
Qt Version: 5.13.1
Kernel Version: 5.3.7-arch1-1-ARCH

The bug is still there. MIME-based actions are always active no matter what.
Comment 4 Mathieu Jobin 2019-11-13 00:51:04 UTC
Can those who experienced the problem list their actions and Regular expression patterns?

having https://.* in there can be very annoying indeed. but I have not had that problem in years. with the exclusions of browsers.

I actually just tried to put it back. and I can't get the old annoyance that I remember.


the only way I can see the "HTML document - Actions for: https://www.google.com" popup to show up, is by hitting "Invoke Action" button in klippy
Comment 5 trmdi 2019-11-13 06:07:07 UTC
(In reply to Mathieu Jobin from comment #4)
> Can those who experienced the problem list their actions and Regular
> expression patterns?
> 
> having https://.* in there can be very annoying indeed. but I have not had
> that problem in years. with the exclusions of browsers.
> 
> I actually just tried to put it back. and I can't get the old annoyance that
> I remember.
> 
> 
> the only way I can see the "HTML document - Actions for:
> https://www.google.com" popup to show up, is by hitting "Invoke Action"
> button in klippy

This feature is disabled by default, there is no gui way to enable it. I don't know how they set it.

You need to set this value [1] to true.

[1] https://github.com/KDE/plasma-workspace/blob/2d066f00e88467daa054edd03abf18016c817568/klipper/klipper.kcfg#L47
Comment 6 Michael 2019-11-13 07:45:08 UTC
(In reply to Mathieu Jobin from comment #4)
> Can those who experienced the problem list their actions and Regular
> expression patterns?
> 
> having https://.* in there can be very annoying indeed. but I have not had
> that problem in years. with the exclusions of browsers.
> 
> I actually just tried to put it back. and I can't get the old annoyance that
> I remember.
> 
Here's the regexp - ^http.+(vi[dm]eo|youtu|\btv\b) for action mpv "%s". The corresponding menu shows only then I copy certain video URLs, but MIME-based menu 'here's your Firefox, Vim etc.' shows every time I copy any URL with 'Enable MIME-based actions' disabled.
Comment 7 Michael 2019-11-13 07:47:16 UTC
(In reply to trmdi from comment #5)

> This feature is disabled by default, there is no gui way to enable it. I
> don't know how they set it.
> 
> You need to set this value [1] to true.
> 
> [1]
> https://github.com/KDE/plasma-workspace/blob/
> 2d066f00e88467daa054edd03abf18016c817568/klipper/klipper.kcfg#L47

Yes, it's disabled, I've pressed Ctrl+Alt+X to activate Klipper actions.
Comment 8 Nate Graham 2019-12-05 03:51:29 UTC
Git commit 895e31d6946b63ddba923e58eb08d1ece7de85df by Nate Graham, on behalf of Tranter Madi.
Committed on 05/12/2019 at 03:50.
Pushed by ngraham into branch 'Plasma/5.17'.

Use the right value of EnableMagicMimeActions

Summary: BUG: 409801

Test Plan: The bug is fixed.

Reviewers: #plasma, ngraham, apol

Reviewed By: ngraham

Subscribers: davidedmundson, ngraham, plasma-devel, #plasma

Tags: #plasma

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

M  +1    -2    klipper/urlgrabber.cpp

https://commits.kde.org/plasma-workspace/895e31d6946b63ddba923e58eb08d1ece7de85df