X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fnickview.cpp;h=3153ba8b571d4a39081076f85a952c778c5000a6;hb=f1e45389df014fb5445ee96769bf02dcf34f1e21;hp=1a97514fe33b5faa6fe5ffdd3e59946297a90fdc;hpb=e0e822499bb989ab48cc996ad0677f7f73b4709e;p=quassel.git 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);