mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
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:
parent
562c7c2c20
commit
cec8a15b28
3 changed files with 48 additions and 5 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue