Added Person details dialog, for popup mode view.

changed from setEnabled to setVisible, to not show up the disabled actions for Own Ids. 

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7871 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2015-01-24 19:27:19 +00:00
parent 9236f01238
commit 4a4ea80110
7 changed files with 826 additions and 10 deletions

View file

@ -56,6 +56,7 @@
#include "gui/RetroShareLink.h"
#include "gui/settings/rsharesettings.h"
#include "gui/connect/ConfCertDialog.h"
#include "gui/Identity/IdDetailsDialog.h"
#include "gui/gxs/GxsIdDetails.h"
#include "util/misc.h"
#include "util/DateTime.h"
@ -599,8 +600,11 @@ void MessageComposer::contextMenuMsgSendList(QPoint)
contextMnu.addSeparator();
action = contextMnu.addAction(QIcon(IMAGE_FRIENDINFO), tr("Friend Details"), this, SLOT(friendDetails()));
action->setEnabled(selectedCount == 1 && idType == FriendSelectionWidget::IDTYPE_SSL);
action->setVisible(selectedCount == 1 && idType == FriendSelectionWidget::IDTYPE_SSL);
action = contextMnu.addAction(QIcon(), tr("Person Details"), this, SLOT(identityDetails()));
action->setVisible(selectedCount == 1 && idType == FriendSelectionWidget::IDTYPE_GXS);
contextMnu.exec(QCursor::pos());
}
@ -2447,6 +2451,23 @@ void MessageComposer::friendDetails()
ConfCertDialog::showIt(RsPeerId(id), ConfCertDialog::PageDetails);
}
void MessageComposer::identityDetails()
{
FriendSelectionWidget::IdType idType;
std::string id = ui.friendSelectionWidget->selectedId(idType);
if (id.empty() || idType != FriendSelectionWidget::IDTYPE_GXS) {
return;
}
if (RsGxsGroupId(id).isNull()) {
return;
}
IdDetailsDialog dialog(RsGxsGroupId(id), this);
dialog.exec();
}
void MessageComposer::tagAboutToShow()
{
TagsMenu *menu = dynamic_cast<TagsMenu*>(ui.tagButton->menu());