mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-11 00:44:27 -05:00
Fix copy of RSLink when on Only plain text mode in chat lobby. (sss
find)
This commit is contained in:
parent
aa471e5b2f
commit
8d82640f41
@ -201,6 +201,8 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
|||||||
menu->addMenu(fontmenu);
|
menu->addMenu(fontmenu);
|
||||||
|
|
||||||
ui->actionSendAsPlainText->setChecked(Settings->getChatSendAsPlainTextByDef());
|
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->resetImagesStatus(Settings->getChatLoadEmbeddedImages());
|
||||||
ui->textBrowser->installEventFilter(this);
|
ui->textBrowser->installEventFilter(this);
|
||||||
|
@ -42,6 +42,7 @@ MimeTextEdit::MimeTextEdit(QWidget *parent)
|
|||||||
mCompleterKey = Qt::Key_Space;
|
mCompleterKey = Qt::Key_Space;
|
||||||
mForceCompleterShowNextKeyEvent = false;
|
mForceCompleterShowNextKeyEvent = false;
|
||||||
highliter = new RsSyntaxHighlighter(this);
|
highliter = new RsSyntaxHighlighter(this);
|
||||||
|
mOnlyPlainText = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MimeTextEdit::canInsertFromMimeData(const QMimeData* source) const
|
bool MimeTextEdit::canInsertFromMimeData(const QMimeData* source) const
|
||||||
@ -85,7 +86,10 @@ void MimeTextEdit::insertFromMimeData(const QMimeData* source)
|
|||||||
if(links.size() > 0)
|
if(links.size() > 0)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < links.size(); ++i)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -48,9 +48,11 @@ public:
|
|||||||
void addContextMenuAction(QAction *action);
|
void addContextMenuAction(QAction *action);
|
||||||
|
|
||||||
QColor textColorQuote() const { return highliter->textColorQuote();}
|
QColor textColorQuote() const { return highliter->textColorQuote();}
|
||||||
|
bool onlyPlainText() const {return mOnlyPlainText;}
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setTextColorQuote(QColor textColorQuote) { highliter->setTextColorQuote(textColorQuote);}
|
void setTextColorQuote(QColor textColorQuote) { highliter->setTextColorQuote(textColorQuote);}
|
||||||
|
void setOnlyPlainText(bool bOnlyPlainText) {mOnlyPlainText = bOnlyPlainText;}
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void calculateContextMenuActions();
|
void calculateContextMenuActions();
|
||||||
@ -80,6 +82,7 @@ private:
|
|||||||
QString mCompleterStartString;
|
QString mCompleterStartString;
|
||||||
QList<QAction*> mContextMenuActions;
|
QList<QAction*> mContextMenuActions;
|
||||||
RsSyntaxHighlighter *highliter;
|
RsSyntaxHighlighter *highliter;
|
||||||
|
bool mOnlyPlainText;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MIMETEXTEDIT_H
|
#endif // MIMETEXTEDIT_H
|
||||||
|
Loading…
Reference in New Issue
Block a user