mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge pull request #955 from PhenomRetroShare/Fix_CopyRSLinkWhenOnlyPlainTextInLobby
Fix copy of RSLink when on Only plain text mode in chat lobby. (sss find)
This commit is contained in:
commit
3ba0256d59
@ -201,6 +201,8 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
menu->addMenu(fontmenu);
|
||||
|
||||
ui->actionSendAsPlainText->setChecked(Settings->getChatSendAsPlainTextByDef());
|
||||
ui->chatTextEdit->setOnlyPlainText(ui->actionSendAsPlainText->isChecked());
|
||||
connect(ui->actionSendAsPlainText, SIGNAL(toggled(bool)), ui->chatTextEdit, SLOT(setOnlyPlainText(bool)) );
|
||||
|
||||
ui->textBrowser->resetImagesStatus(Settings->getChatLoadEmbeddedImages());
|
||||
ui->textBrowser->installEventFilter(this);
|
||||
|
@ -42,6 +42,7 @@ MimeTextEdit::MimeTextEdit(QWidget *parent)
|
||||
mCompleterKey = Qt::Key_Space;
|
||||
mForceCompleterShowNextKeyEvent = false;
|
||||
highliter = new RsSyntaxHighlighter(this);
|
||||
mOnlyPlainText = false;
|
||||
}
|
||||
|
||||
bool MimeTextEdit::canInsertFromMimeData(const QMimeData* source) const
|
||||
@ -85,7 +86,10 @@ void MimeTextEdit::insertFromMimeData(const QMimeData* source)
|
||||
if(links.size() > 0)
|
||||
{
|
||||
for(int i = 0; i < links.size(); ++i)
|
||||
insertHtml(links[i].toHtml() + "<br>");
|
||||
if (mOnlyPlainText)
|
||||
insertPlainText(links[i].toString());
|
||||
else
|
||||
insertHtml(links[i].toHtml() + "<br>");
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -48,9 +48,11 @@ public:
|
||||
void addContextMenuAction(QAction *action);
|
||||
|
||||
QColor textColorQuote() const { return highliter->textColorQuote();}
|
||||
bool onlyPlainText() const {return mOnlyPlainText;}
|
||||
|
||||
public slots:
|
||||
void setTextColorQuote(QColor textColorQuote) { highliter->setTextColorQuote(textColorQuote);}
|
||||
void setOnlyPlainText(bool bOnlyPlainText) {mOnlyPlainText = bOnlyPlainText;}
|
||||
|
||||
signals:
|
||||
void calculateContextMenuActions();
|
||||
@ -80,6 +82,7 @@ private:
|
||||
QString mCompleterStartString;
|
||||
QList<QAction*> mContextMenuActions;
|
||||
RsSyntaxHighlighter *highliter;
|
||||
bool mOnlyPlainText;
|
||||
};
|
||||
|
||||
#endif // MIMETEXTEDIT_H
|
||||
|
Loading…
Reference in New Issue
Block a user