mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
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:
parent
a967405c84
commit
a23e563c6b
4 changed files with 17 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue