diff --git a/retroshare-gui/src/gui/common/MimeTextEdit.cpp b/retroshare-gui/src/gui/common/MimeTextEdit.cpp index 1c51980c4..9513703d6 100644 --- a/retroshare-gui/src/gui/common/MimeTextEdit.cpp +++ b/retroshare-gui/src/gui/common/MimeTextEdit.cpp @@ -19,6 +19,8 @@ * Boston, MA 02110-1301, USA. ****************************************************************/ +#include +#include #include #include #include @@ -228,6 +230,7 @@ void MimeTextEdit::contextMenuEvent(QContextMenuEvent *e) QMenu *contextMenu = createStandardContextMenu(e->pos()); /* Add actions for pasting links */ + contextMenu->addAction( tr("Paste as plain text"), this, SLOT(pastePlainText())); contextMenu->addSeparator(); QAction *pasteLinkAction = contextMenu->addAction(QIcon(":/images/pasterslink.png"), tr("Paste RetroShare Link"), this, SLOT(pasteLink())); contextMenu->addAction(QIcon(":/images/pasterslink.png"), tr("Paste my certificate link"), this, SLOT(pasteOwnCertificateLink())); @@ -260,3 +263,8 @@ void MimeTextEdit::pasteOwnCertificateLink() insertHtml(link.toHtml() + " "); } } + +void MimeTextEdit::pastePlainText() +{ + insertPlainText(QApplication::clipboard()->text()); +} diff --git a/retroshare-gui/src/gui/common/MimeTextEdit.h b/retroshare-gui/src/gui/common/MimeTextEdit.h index 5ef5d6a5f..d28bb2c6e 100644 --- a/retroshare-gui/src/gui/common/MimeTextEdit.h +++ b/retroshare-gui/src/gui/common/MimeTextEdit.h @@ -58,7 +58,7 @@ private slots: void insertCompletion(const QString &completion); void pasteLink(); void pasteOwnCertificateLink(); - + void pastePlainText(); private: QString textUnderCursor() const;