KateSpellCheckDialog: Remove action "Spellcheck Selection"
ClosedPublic

Authored by loh.tar on Feb 2 2019, 8:35 AM.

Details

Summary

...and add logic to "Spelling.." and "Spelling (from cursor)" actions
when there is a selection.

This way the behavior fit to other actions where the selection as
precedence over some default target and we have one entry less in menus.

Diff Detail

Repository
R39 KTextEditor
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
loh.tar created this revision.Feb 2 2019, 8:35 AM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptFeb 2 2019, 8:35 AM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
loh.tar requested review of this revision.Feb 2 2019, 8:35 AM

For my taste could be "Spelling (from cursor)" the only offered action (logic). Always to check from the start is rarely useful, but I guess no one like that idea.

The current patch should cause no harm, except that someone need to reassign some shortcut or added tool bar button.

In general I am ok eith this. Although it's a tiny bit less transparent to the user.

src/spellcheck/spellcheckdialog.cpp
74–78

I don't like the fact that the function says "spellcheckFromCursor, and then internally does something different. Can this be improved by having the logic somewhere else?

;=) given ::spellcheck() has the same magic, I don't think we really need to rename the function.
And spellcheckSelectionOrFromCursor is a bit strange, too.

cullmann accepted this revision.Feb 2 2019, 3:03 PM
This revision is now accepted and ready to land.Feb 2 2019, 3:03 PM
This revision was automatically updated to reflect the committed changes.