added chat friend and message friend actions to FriendsList/Friend context menu

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8309 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-05-29 10:07:12 +00:00
parent 562c7c2c20
commit cec8a15b28
3 changed files with 48 additions and 5 deletions

View file

@ -380,6 +380,11 @@ void FriendList::peerTreeWidgetCustomPopupMenu()
break;
case TYPE_GPG:
{
contextMnu.addAction(QIcon(IMAGE_CHAT), tr("Chat"), this, SLOT(chatfriendproxy()));
contextMnu.addAction(QIcon(IMAGE_MSG), tr("Send message"), this, SLOT(msgfriend()));
contextMnu.addSeparator();
contextMnu.addAction(QIcon(IMAGE_FRIENDINFO), tr("Details"), this, SLOT(configurefriend()));
contextMnu.addAction(QIcon(IMAGE_DENYFRIEND), tr("Deny"), this, SLOT(removefriend()));
@ -1269,14 +1274,21 @@ void FriendList::addFriend()
void FriendList::msgfriend()
{
QTreeWidgetItem *peer = getCurrentPeer();
QTreeWidgetItem *item = getCurrentPeer();
if (!peer)
if (!item)
return;
std::string id = getRsId(peer);
MessageComposer::msgFriend(RsPeerId(id)) ;
switch (item->type()) {
case TYPE_GROUP:
break;
case TYPE_GPG:
MessageComposer::msgFriend(RsPgpId(getRsId(item)));
break;
case TYPE_SSL:
MessageComposer::msgFriend(RsPeerId(getRsId(item)));
break;
}
}
void FriendList::recommendfriend()