X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatitem.cpp;h=b629a263c049252040f575c8cbacd3d81d0fdac0;hp=e3e9ad74e0863bc11fea8b6d0268b0f2c7b84055;hb=db511df7b183771ae444f14d0aca42381ee0ae37;hpb=ed6c4d268fd8e4aa2982b2ab8c1e11033fc0f9e5 diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index e3e9ad74..b629a263 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -28,9 +28,11 @@ #include #include - +#include "bufferview.h" #include "chatitem.h" #include "chatlinemodel.h" +#include "iconloader.h" +#include "mainwin.h" #include "qtui.h" #include "qtuistyle.h" @@ -580,13 +582,25 @@ void ContentsChatItem::addActionsToMenu(QMenu *menu, const QPointF &pos) { switch(privateData()->currentClickable.type) { case Clickable::Url: privateData()->activeClickable = privateData()->currentClickable; - menu->addAction(tr("Copy Link Address"), &_actionProxy, SLOT(copyLinkToClipboard()))->setData(QVariant::fromValue(this)); + menu->addAction(SmallIcon("edit-copy"), tr("Copy Link Address"), + &_actionProxy, SLOT(copyLinkToClipboard()))->setData(QVariant::fromValue(this)); break; default: break; } } + + // Buffer-specific actions + // We add these in ChatItem (rather than the scene), because they depend on the current clickable + if(chatScene()->isSingleBufferScene()) { + QModelIndex index = Client::networkModel()->bufferIndex(chatScene()->singleBufferId()); + if(index.isValid()) { + menu->addSeparator(); + QtUi::mainWindow()->allBuffersView()->addActionsToMenu(menu, index); + } + } + } void ContentsChatItem::copyLinkToClipboard() {