mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed a bug on MessengerWindow context menu
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2339 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6f09abb9c5
commit
549979407c
@ -155,6 +155,12 @@ MessengerWindow::MessengerWindow(QWidget* parent, Qt::WFlags flags)
|
|||||||
|
|
||||||
void MessengerWindow::messengertreeWidgetCostumPopupMenu( QPoint point )
|
void MessengerWindow::messengertreeWidgetCostumPopupMenu( QPoint point )
|
||||||
{
|
{
|
||||||
|
QTreeWidgetItem *c = getCurrentPeer();
|
||||||
|
if (!c)
|
||||||
|
{
|
||||||
|
//no peer selected
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QMenu contextMnu( this );
|
QMenu contextMnu( this );
|
||||||
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
QMouseEvent *mevent = new QMouseEvent( QEvent::MouseButtonPress, point, Qt::RightButton, Qt::RightButton, Qt::NoModifier );
|
||||||
@ -183,7 +189,6 @@ void MessengerWindow::messengertreeWidgetCostumPopupMenu( QPoint point )
|
|||||||
exportfriendAct = new QAction(QIcon(IMAGE_EXPIORTFRIEND), tr( "Export Friend" ), this );
|
exportfriendAct = new QAction(QIcon(IMAGE_EXPIORTFRIEND), tr( "Export Friend" ), this );
|
||||||
connect( exportfriendAct , SIGNAL( triggered() ), this, SLOT( exportfriend() ) );
|
connect( exportfriendAct , SIGNAL( triggered() ), this, SLOT( exportfriend() ) );
|
||||||
|
|
||||||
QTreeWidgetItem *c = getCurrentPeer();
|
|
||||||
if (c->type() == 0) {
|
if (c->type() == 0) {
|
||||||
//this is a GPG key
|
//this is a GPG key
|
||||||
removefriendAct = new QAction(QIcon(IMAGE_REMOVEFRIEND), tr( "Deny Friend" ), this );
|
removefriendAct = new QAction(QIcon(IMAGE_REMOVEFRIEND), tr( "Deny Friend" ), this );
|
||||||
|
Loading…
Reference in New Issue
Block a user