X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fnickview.cpp;h=3153ba8b571d4a39081076f85a952c778c5000a6;hp=1a97514fe33b5faa6fe5ffdd3e59946297a90fdc;hb=1aef6bf0d3d2a7ef469b9a9f68ceb891cc8a896c;hpb=e8313fd543561e6ee24439d6cc14d26395128622 diff --git a/src/uisupport/nickview.cpp b/src/uisupport/nickview.cpp index 1a97514f..3153ba8b 100644 --- a/src/uisupport/nickview.cpp +++ b/src/uisupport/nickview.cpp @@ -81,6 +81,8 @@ BufferInfo NickView::bufferInfoFromModelIndex(const QModelIndex & index) { void NickView::showContextMenu(const QPoint & pos ) { QModelIndex index = indexAt(pos); + if(index.data(NetworkModel::ItemTypeRole) != NetworkModel::IrcUserItemType) return; + QString nick = nickFromModelIndex(index); QMenu nickContextMenu(this); @@ -98,8 +100,10 @@ void NickView::showContextMenu(const QPoint & pos ) { QAction *deVoiceAction = modeMenu->addAction(tr("Devoice %1").arg(nick)); QMenu *kickBanMenu = nickContextMenu.addMenu(tr("Kick/Ban")); + //TODO: add kick message from network identity (kick reason) QAction *kickAction = kickBanMenu->addAction(tr("Kick %1").arg(nick)); QAction *kickBanAction = kickBanMenu->addAction(tr("Kickban %1").arg(nick)); + kickBanMenu->setEnabled(false); QAction *ignoreAction = nickContextMenu.addAction(tr("Ignore")); ignoreAction->setEnabled(false);