mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #2814 from defnax/comments-tree
Added show author for comments tree
This commit is contained in:
commit
24f13a4b88
@ -21,6 +21,8 @@
|
|||||||
#include "GxsCommentTreeWidget.h"
|
#include "GxsCommentTreeWidget.h"
|
||||||
|
|
||||||
#include "gui/common/FilesDefs.h"
|
#include "gui/common/FilesDefs.h"
|
||||||
|
#include "gui/Identity/IdDialog.h"
|
||||||
|
#include "gui/MainWindow.h"
|
||||||
#include "gui/common/RSElidedItemDelegate.h"
|
#include "gui/common/RSElidedItemDelegate.h"
|
||||||
#include "gui/common/RSTreeWidgetItem.h"
|
#include "gui/common/RSTreeWidgetItem.h"
|
||||||
#include "gui/gxs/GxsCreateCommentDialog.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 = contextMnu.addAction(FilesDefs::getIconFromQtResourcePath(IMAGE_VOTEDOWN), tr("Vote Down"), this, SLOT(voteDown()));
|
||||||
action->setDisabled(!item || mCurrentCommentMsgId.isNull() || mVoterId.isNull());
|
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())
|
if (!mCurrentCommentMsgId.isNull())
|
||||||
{
|
{
|
||||||
@ -464,6 +470,19 @@ void GxsCommentTreeWidget::replyToComment()
|
|||||||
pcc.exec();
|
pcc.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GxsCommentTreeWidget::showAuthor()
|
||||||
|
{
|
||||||
|
/* window will destroy itself! */
|
||||||
|
IdDialog *idDialog = dynamic_cast<IdDialog*>(MainWindow::getPage(MainWindow::People));
|
||||||
|
|
||||||
|
if (!idDialog)
|
||||||
|
return ;
|
||||||
|
|
||||||
|
MainWindow::showWindow(MainWindow::People);
|
||||||
|
idDialog->navigate(RsGxsId(mCurrentCommentAuthorId));
|
||||||
|
}
|
||||||
|
|
||||||
void GxsCommentTreeWidget::copyComment()
|
void GxsCommentTreeWidget::copyComment()
|
||||||
{
|
{
|
||||||
QString txt = dynamic_cast<QAction*>(sender())->data().toString();
|
QString txt = dynamic_cast<QAction*>(sender())->data().toString();
|
||||||
|
@ -72,6 +72,7 @@ public slots:
|
|||||||
|
|
||||||
void makeComment();
|
void makeComment();
|
||||||
void replyToComment();
|
void replyToComment();
|
||||||
|
void showAuthor();
|
||||||
|
|
||||||
void copyComment();
|
void copyComment();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user