aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Mi <codeminister@publicstatic.de>2014-01-24 15:08:13 (GMT)
committerGregor Mi <codeminister@publicstatic.de>2014-01-24 15:08:13 (GMT)
commite8978ecc0d6d3162d07aea135e956f794b70dbb1 (patch)
tree18d25698d905f268ddf8b07eff14ba31b873fd10
parentd95f9b016bced2c8687f5a7d65923d7742aa8198 (diff)
Statusbar: doubleclick on line/column label opens GoToLine
-rw-r--r--src/view/katestatusbar.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/view/katestatusbar.cpp b/src/view/katestatusbar.cpp
index 76c4ac7..b31bb9d 100644
--- a/src/view/katestatusbar.cpp
+++ b/src/view/katestatusbar.cpp
@@ -178,6 +178,7 @@ KateStatusBar::KateStatusBar(KTextEditor::ViewPrivate *view)
topLayout->addSpacing(style()->pixelMetric(QStyle::PM_ScrollBarExtent, &option, this));
// signals for the statusbar
+ m_lineColLabel->installEventFilter(this); // register for doubleclick
m_insertModeLabel->installEventFilter(this); // register for doubleclick
connect(m_view, SIGNAL(cursorPositionChanged(KTextEditor::View*,KTextEditor::Cursor)), this, SLOT(cursorPositionChanged()));
connect(m_view, SIGNAL(viewModeChanged(KTextEditor::View*)), this, SLOT(viewModeChanged()));
@@ -202,6 +203,10 @@ bool KateStatusBar::eventFilter(QObject *obj, QEvent *event)
}
return true;
}
+ } else if (obj == m_lineColLabel) {
+ if (event->type() == QEvent::MouseButtonDblClick) {
+ m_view->gotoLine();
+ }
}
return KateViewBarWidget::eventFilter(obj, event);