ViewConfig: Add option to paste at cursor position by mouse
ClosedPublic

Authored by loh.tar on Jan 5 2019, 9:45 PM.

Details

Summary

With this option is the cursor not moved to the mouse position prior to
paste by middle click

BUG: 363492

Test Plan

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
loh.tar created this revision.Jan 5 2019, 9:45 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptJan 5 2019, 9:45 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
loh.tar requested review of this revision.Jan 5 2019, 9:45 PM
dhaumann accepted this revision.Jan 5 2019, 10:01 PM
dhaumann added subscribers: ngraham, dhaumann.

Good patch, I think this can go in.

@ngraham: You as native English speaker, is the wording in the dialog ok?

This revision is now accepted and ready to land.Jan 5 2019, 10:01 PM

Please provide also a tooltip/whats-this text, if useful. My QtDesigner did not show the needed widget stuff, so the text is not set.
A look at that bug report may give more hints/ideas

I would change the string to "Paste clipboard contents at mouse cursor location".

loh.tar updated this revision to Diff 48778.Jan 6 2019, 4:54 AM
loh.tar edited the summary of this revision. (Show Details)

Change checkbox text as suggested

Hm, didn't you switch the meaning from "Paste by mouse at cursor position" to "Paste clipboard contents at mouse cursor location"? My point is "paste ...at mouse cursor location" is the current behavior, since paste via middle mouse button moves the text cursor position. I thought when the checkbox is checked, the text cursor should NOT move.

loh.tar added a comment.EditedJan 6 2019, 10:57 AM

Hm, didn't you switch the meaning...

I hope you mean @ngraham :-) I just typed overslept what he wrote...yes he has. Before I only kill that "mouse" I like to ask the native speaker if "caret" fit better.

Edit: Now I have "Paste clipboard contents at cursor location"

Yes, directed @ngraham :-)

Hmm, maybe I misunderstood the feature then, sorry!

In cases where there are two binary options but both are semi-confusing, or when one option does not necessarily imply its inverse, radio buttons or a combobox are ideal because then you can make both choices very clear. For example:

Paste using mouse inserts text: (0) At insertion point
                                ( ) At mouse cursor's location

Hmm, maybe I misunderstood the feature then, sorry!

In cases where there are two binary options but both are semi-confusing, or when one option does not necessarily imply its inverse, radio buttons or a combobox are ideal because then you can make both choices very clear. For example:

Paste using mouse inserts text: (0) At insertion point
                                ( ) At mouse cursor's location

I think that would make sense.

I agree, it's on the first sight pretty clear. But then can you force this "style" for every bool option. In the above linked pic is this obviously only used for Normal vs Vi-Mode [1]

A drawback of that "style" may that you can't say for sure "which is what" in sense of true/false. When you like to change an option by some config file or command, what is to give? [2]

Or what if you like to add an short cut and menu option for this?
With that in mind looks a checkbox not so bad.

[1] Should it be a string setting, too bad, sorry
[2] Well, you have then the key(word) which is typically a short version of the text shown at the checkbox.

To avoid further comments I like to add that I don't like to do the requested change. Please improve it later, if needed.

I can live with the checkbox, too, as the first iteration, but I think you need to change the text in the UI file, atm there is still that "mouse cursor position", should it no be "cursor position"?

Sure, can do it. Which one have it to be ?

  • Paste clipboard contents at cursor location
  • Paste clipboard contents at cursor position
  • Paste by mouse at cursor position (This one was liked by Dominik, IIRC)

"Paste by mouse at cursor position" should be ok, then I will push this, ok?

loh.tar updated this revision to Diff 48999.Jan 8 2019, 3:55 PM

Back to "Paste by mouse at cursor position"

"Paste by mouse at cursor position" should be ok, then I will push this, ok?

Well, a last close look is nerver bad.

dhaumann accepted this revision.Jan 8 2019, 3:59 PM
This revision was automatically updated to reflect the committed changes.