Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateview.cpp
Show First 20 Lines • Show All 534 Lines • ▼ Show 20 Line(s) | 485 | if (!m_doc->readOnly()) { | |||
---|---|---|---|---|---|
535 | a = ac->addAction(QStringLiteral("tools_uncomment")); | 535 | a = ac->addAction(QStringLiteral("tools_uncomment")); | ||
536 | a->setText(i18n("Unco&mment")); | 536 | a->setText(i18n("Unco&mment")); | ||
537 | ac->setDefaultShortcut(a, QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_D)); | 537 | ac->setDefaultShortcut(a, QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_D)); | ||
538 | a->setWhatsThis(i18n("This command removes comments from the current line or a selected block of text.<br /><br />" | 538 | a->setWhatsThis(i18n("This command removes comments from the current line or a selected block of text.<br /><br />" | ||
539 | "The characters for single/multiple line comments are defined within the language's highlighting.")); | 539 | "The characters for single/multiple line comments are defined within the language's highlighting.")); | ||
540 | connect(a, SIGNAL(triggered(bool)), SLOT(uncomment())); | 540 | connect(a, SIGNAL(triggered(bool)), SLOT(uncomment())); | ||
541 | 541 | | |||
542 | a = ac->addAction(QStringLiteral("tools_toggle_comment")); | 542 | a = ac->addAction(QStringLiteral("tools_toggle_comment")); | ||
543 | a->setText(i18n("Toggle Comment")); | 543 | a->setText(i18n("Toggle Comment")); | ||
544 | ac->setDefaultShortcut(a, QKeySequence(Qt::CTRL + Qt::Key_Slash)); | ||||
ngraham: Could we also change this string to say "Comment/Uncomment" Rather than "Toggle comment"? I… | |||||
I think they both make sense, but "Toggle Comment" seems to be the established standard. Three out of my four installed editors used that wording (the last one only used "Comment"). slenz: I think they both make sense, but "Toggle Comment" seems to be the established standard. Three… | |||||
ngraham: OK, let's let the Kate folks have final say then. | |||||
544 | connect(a, SIGNAL(triggered(bool)), SLOT(toggleComment())); | 545 | connect(a, SIGNAL(triggered(bool)), SLOT(toggleComment())); | ||
545 | 546 | | |||
546 | a = m_toggleWriteLock = new KToggleAction(i18n("&Read Only Mode"), this); | 547 | a = m_toggleWriteLock = new KToggleAction(i18n("&Read Only Mode"), this); | ||
547 | a->setWhatsThis(i18n("Lock/unlock the document for writing")); | 548 | a->setWhatsThis(i18n("Lock/unlock the document for writing")); | ||
548 | a->setChecked(!m_doc->isReadWrite()); | 549 | a->setChecked(!m_doc->isReadWrite()); | ||
549 | connect(a, SIGNAL(triggered(bool)), SLOT(toggleWriteLock())); | 550 | connect(a, SIGNAL(triggered(bool)), SLOT(toggleWriteLock())); | ||
550 | ac->addAction(QStringLiteral("tools_toggle_write_lock"), a); | 551 | ac->addAction(QStringLiteral("tools_toggle_write_lock"), a); | ||
551 | 552 | | |||
▲ Show 20 Lines • Show All 3226 Lines • Show Last 20 Lines |
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.