Add setting to enable/disable text drag-and-drop (on by default)

Authored by thomassc on Jul 7 2019, 10:05 PM.



This change adds a setting to enable or disable the ability to move the selected text by drag-and-drop. It is on by default, which means the default behavior is not changed. Disabling this setting is useful for people like me who generally use Ctrl-X/V for moving text. For those, the drag-and-drop is never intended, but sometimes triggered accidentally, so it is good to be able to remove this pitfall.

FEATURE: 391450

Test Plan

I tested it manually.

Diff Detail

R39 KTextEditor
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
thomassc created this revision.Jul 7 2019, 10:05 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptJul 7 2019, 10:05 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
thomassc requested review of this revision.Jul 7 2019, 10:05 PM
cullmann accepted this revision.Jul 8 2019, 5:16 AM
cullmann added a subscriber: cullmann.

Think this is ok, given for some use cases one might want to disable it.
Thanks for taking care!

This revision is now accepted and ready to land.Jul 8 2019, 5:16 AM

When you do UI changes, please always add a screenshot. In this case of the changed config page :)

dhaumann added inline comments.Jul 8 2019, 6:58 AM

@cullmann Is the order here important? This changes all values of remaining enums.

cullmann added inline comments.Jul 8 2019, 7:03 AM

The enum order doesn't matter, for all storage stuff the string keys are used. There shall only be no gaps.

Good, I expected nothing less ;)

Thanks for having a look. Here is a screenshot of the config page with the new option on it (third from the bottom):

Do you think that the label there is okay as-is? Or should it perhaps rather be something like "Enable moving selected text by drag and drop" to be more clear?

I have no issues with the label, matches the other in that category, not sure if "Enable" does make it better or worse.

IMHO, "Enable/Disable" is already implied by the checkbox :)

> I would say, merge this now. If somebody wants to fixup the label, one can do that later.

This revision was automatically updated to reflect the committed changes.


Keep the patches coming :=)

Your recent improvements are highly appreciated!