registerAction(NickDeop, tr("Take Operator Status"));
registerAction(NickVoice, tr("Give Voice"));
registerAction(NickDevoice, tr("Take Voice"));
- registerAction(NickKick, tr("Kick"));
- registerAction(NickBan, tr("Ban"));
- registerAction(NickKickBan, tr("Kickban"));
+ registerAction(NickKick, tr("Kick From Channel"));
+ registerAction(NickBan, tr("Ban From Channel"));
+ registerAction(NickKickBan, tr("Kick && Ban"));
registerAction(HideBufferTemporarily, tr("Hide Buffer(s) Temporarily"));
registerAction(HideBufferPermanently, tr("Hide Buffer(s) Permanently"));
nickModeMenu->addAction(action(NickDeop));
nickModeMenu->addAction(action(NickVoice));
nickModeMenu->addAction(action(NickDevoice));
- _nickModeMenuAction = new Action(tr("Modes"), 0);
+ nickModeMenu->addSeparator();
+ nickModeMenu->addAction(action(NickKick));
+ nickModeMenu->addAction(action(NickBan));
+ nickModeMenu->addAction(action(NickKickBan));
+ _nickModeMenuAction = new Action(tr("Actions"), 0);
_nickModeMenuAction->setMenu(nickModeMenu);
}
// ChatView actions
if(_contextItem.isEmpty()) {
// a) query buffer: handle like ircuser
- // b) general chatview: only react if _contextItem is set (i.e. we right-clicked on something)
+ // b) general chatview: handle like channel iff it displays a single buffer
// NOTE stuff breaks probably with merged buffers, need to rework a lot around here then
- // for now, use the item type of a random buffer... assuming we never mix channel and query buffers
- //if(!_messageFilter->containedBuffers.count())
- // return;
- //BufferId randomBuf = _messageFilter->containedBuffers.values().at(0);
+ if(_messageFilter->containedBuffers().count() == 1) {
+ // we can handle this like a single bufferItem
+ QModelIndex index = Client::networkModel()->bufferIndex(_messageFilter->containedBuffers().values().at(0));
+ _indexList = QList<QModelIndex>() << index;
+ addBufferItemActions(menu, index);
+ return;
+ } else {
+ // TODO: actions for merged buffers... _indexList contains the index of the message we clicked on
+ }
}
}
}
}
void NetworkModelActionProvider::handleGeneralAction(ActionType type, QAction *action) {
+ Q_UNUSED(action)
+
if(!_indexList.count())
return;
NetworkId networkId = _indexList.at(0).data(NetworkModel::NetworkIdRole).value<NetworkId>();