diff --git a/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.cpp b/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.cpp index bd230fe9c..277b11e4f 100644 --- a/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.cpp +++ b/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.cpp @@ -21,6 +21,8 @@ #include "GxsCommentTreeWidget.h" #include "gui/common/FilesDefs.h" +#include "gui/Identity/IdDialog.h" +#include "gui/MainWindow.h" #include "gui/common/RSElidedItemDelegate.h" #include "gui/common/RSTreeWidgetItem.h" #include "gui/gxs/GxsCreateCommentDialog.h" @@ -346,6 +348,10 @@ void GxsCommentTreeWidget::customPopUpMenu(const QPoint& point) action = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_VOTEDOWN), tr("Vote Down"), this, SLOT(voteDown())); action->setDisabled(!item || mCurrentCommentMsgId.isNull() || mVoterId.isNull()); + contextMnu.addSeparator(); + + action = contextMnu.addAction(tr("Show Author"), this, SLOT(showAuthor())); + action->setDisabled(!item || mCurrentCommentMsgId.isNull() || mVoterId.isNull()); if (!mCurrentCommentMsgId.isNull()) { @@ -464,6 +470,19 @@ void GxsCommentTreeWidget::replyToComment() pcc.exec(); } + +void GxsCommentTreeWidget::showAuthor() +{ + /* window will destroy itself! */ + IdDialog *idDialog = dynamic_cast(MainWindow::getPage(MainWindow::People)); + + if (!idDialog) + return ; + + MainWindow::showWindow(MainWindow::People); + idDialog->navigate(RsGxsId(mCurrentCommentAuthorId)); +} + void GxsCommentTreeWidget::copyComment() { QString txt = dynamic_cast(sender())->data().toString(); diff --git a/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.h b/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.h index 43a6f55a5..5f52459a9 100644 --- a/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.h +++ b/retroshare-gui/src/gui/gxs/GxsCommentTreeWidget.h @@ -72,6 +72,7 @@ public slots: void makeComment(); void replyToComment(); + void showAuthor(); void copyComment();