D17008: Expose "Toggle Comment" feature through tools menu and default shortcut

Nathaniel Graham noreply at phabricator.kde.org
Mon Nov 19 19:15:40 GMT 2018


ngraham requested changes to this revision.
ngraham added a comment.
This revision now requires changes to proceed.


  Lovely, this is just what I wanted. It's cool that the feature was already there. :) I like how you preserve the old shortcuts for compatibility. Just a few changes needed from my perspective:

INLINE COMMENTS

> katepart5ui.rc:2
>  <!DOCTYPE gui SYSTEM "kpartgui.dtd">
>  <gui name="KatePartView" version="78" translationDomain="ktexteditor5">
>  <MenuBar>

You need to bump the version to 79 or else the changes won't take effect.

> kateview.cpp:543
>          a = ac->addAction(QStringLiteral("tools_toggle_comment"));
>          a->setText(i18n("Toggle Comment"));
> +        ac->setDefaultShortcut(a, QKeySequence(Qt::CTRL + Qt::Key_Slash));

Could we also change this string to say "Comment/Uncomment" Rather than "Toggle comment"? I know that's //technically// correct because this is a toggle action, but generally one doesn't associate "toggling" things with text editing.

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D17008

To: slenz, #vdg, ngraham
Cc: ngraham, kwrite-devel, kde-frameworks-devel, michaelh, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20181119/4dcc063c/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list