diff options
authorJoseph Wenninger <jowenn@kde.org>2014-01-23 15:31:20 (GMT)
committerJoseph Wenninger <jowenn@kde.org>2014-01-23 15:35:03 (GMT)
commitc27cd0eef1957467f0bd7b661cb3001d644481a6 (patch)
parentd4e6bec538b9f65b19809f7f886d15b74d5a0e51 (diff)
In KF5 the jump to bracket and select to bracket actions are now shown in the Edit menu, just above the "go to line" feature. I removed those two actions from the edit actions, since otherwise they will always be disabled in the menu, because the view loses focus. I hope that does not break VI-mode, otherwise we have to find another solutions.
BUG: 107828
2 files changed, 7 insertions, 3 deletions
diff --git a/src/data/katepartui.rc b/src/data/katepartui.rc
index af78f7e..dbb6a94 100644
--- a/src/data/katepartui.rc
+++ b/src/data/katepartui.rc
@@ -1,5 +1,5 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui name="KatePartView" version="67">
+<kpartgui name="KatePartView" version="68">
<Menu name="file" noMerge="1"><text>&amp;File</text>
<Action name="file_save" group="save_merge" />
@@ -40,6 +40,10 @@
<Action name="edit_replace" group="edit_find_merge" />
<Separator group="edit_find_merge" />
+ <Menu name="edit_matching_bracket" group="edit_find_merge"><text>Matching Bracket</text>
+ <Action name="to_matching_bracket" group="edit_matching_bracket" />
+ <Action name="select_matching_bracket" group="edit_matching_bracket" />
+ </Menu>
<Action name="go_goto_line" group="edit_find_merge"/>
diff --git a/src/view/kateview.cpp b/src/view/kateview.cpp
index 95ca708..f5925fa 100644
--- a/src/view/kateview.cpp
+++ b/src/view/kateview.cpp
@@ -887,13 +887,13 @@ void KTextEditor::ViewPrivate::setupEditActions()
a->setText(i18n("Move to Matching Bracket"));
a->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_6));
connect(a, SIGNAL(triggered(bool)), SLOT(toMatchingBracket()));
- m_editActions << a;
+ //m_editActions << a;
a = ac->addAction(QLatin1String("select_matching_bracket"));
a->setText(i18n("Select to Matching Bracket"));
a->setShortcut(QKeySequence(Qt::SHIFT + Qt::CTRL + Qt::Key_6));
connect(a, SIGNAL(triggered(bool)), SLOT(shiftToMatchingBracket()));
- m_editActions << a;
+ //m_editActions << a;
// anders: shortcuts doing any changes should not be created in read-only mode
if (!m_doc->readOnly()) {