X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fbufferwidget.cpp;h=7b4e9545dcc772fef0474260694dbac0c43a8c79;hb=f9c4ee168a794add5261a7f1b6abb518f5987f8c;hp=047759eb032c426efbf47f0d249c852719b62c9b;hpb=6e73ba4a19fd92038e1ea749125767661fb34e27;p=quassel.git diff --git a/src/qtui/bufferwidget.cpp b/src/qtui/bufferwidget.cpp index 047759eb..7b4e9545 100644 --- a/src/qtui/bufferwidget.cpp +++ b/src/qtui/bufferwidget.cpp @@ -94,6 +94,10 @@ BufferWidget::BufferWidget(QWidget *parent) setMarkerLine->setText(tr("Set Marker Line")); setMarkerLine->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R)); + Action *jumpToMarkerLine = QtUi::actionCollection("Navigation")->add("JumpToMarkerLine", this, SLOT(jumpToMarkerLine())); + jumpToMarkerLine->setText(tr("Go to Marker Line")); + jumpToMarkerLine->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_K)); + ChatViewSettings s; s.initAndNotify("AutoMarkerLine", this, SLOT(setAutoMarkerLine(QVariant)), true); } @@ -250,3 +254,12 @@ void BufferWidget::setMarkerLine(ChatView *view, bool allowGoingBack) { view->setMarkerLine(msgId); } } + +void BufferWidget::jumpToMarkerLine(ChatView *view, bool requestBacklog) { + if(!view) + view = qobject_cast(ui.stackedWidget->currentWidget()); + if(!view) + return; + + view->jumpToMarkerLine(requestBacklog); +}