Click on a certificate in a message (MessageWidget) shows the add friend wizard only once.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8036 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2015-03-16 14:40:30 +00:00
parent a967405c84
commit a23e563c6b
4 changed files with 17 additions and 1 deletions

View file

@ -12,12 +12,17 @@ RSTextBrowser::RSTextBrowser(QWidget *parent) :
mShowImages = true;
mImageBlockWidget = NULL;
mLinkClickActive = true;
connect(this, SIGNAL(anchorClicked(QUrl)), this, SLOT(linkClicked(QUrl)));
}
void RSTextBrowser::linkClicked(const QUrl &url)
{
if (!mLinkClickActive) {
return;
}
// some links are opened directly in the QTextBrowser with open external links set to true,
// so we handle links by our own
@ -124,3 +129,8 @@ void RSTextBrowser::resetImagesStatus(bool load)
}
mShowImages = load;
}
void RSTextBrowser::activateLinkClick(bool active)
{
mLinkClickActive = active;
}

View file

@ -16,6 +16,8 @@ public:
void setImageBlockWidget(RSImageBlockWidget *widget);
void resetImagesStatus(bool load);
void activateLinkClick(bool active);
virtual QVariant loadResource(int type, const QUrl &name);
public slots:
@ -28,9 +30,11 @@ private slots:
protected:
void paintEvent(QPaintEvent *event);
private:
QString mPlaceholderText;
bool mShowImages;
RSImageBlockWidget *mImageBlockWidget;
bool mLinkClickActive;
};
#endif // RSTEXTBROWSER_H

View file

@ -164,6 +164,8 @@ MessageWidget::MessageWidget(bool controlled, QWidget *parent, Qt::WindowFlags f
ui.tagsLabel->setVisible(false);
ui.msgText->activateLinkClick(false);
if (isControlled == false) {
processSettings("MessageWidget", true);
}