mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
Added a custom context menu for pasting RS-links to the base class MimeTextEdit and removed the custom context menu from derived classes.
Updated english translation. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6977 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dddc4356f1
commit
abd6b46ca0
17 changed files with 206 additions and 374 deletions
|
@ -162,7 +162,6 @@ MessageComposer::MessageComposer(QWidget *parent, Qt::WindowFlags flags)
|
|||
|
||||
connect(ui.msgText, SIGNAL(currentCharFormatChanged(const QTextCharFormat &)), this, SLOT(currentCharFormatChanged(const QTextCharFormat &)));
|
||||
connect(ui.msgText, SIGNAL(cursorPositionChanged()), this, SLOT(cursorPositionChanged()));
|
||||
connect(ui.msgText,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(contextMenu(QPoint)));
|
||||
|
||||
connect(ui.msgText->document(), SIGNAL(modificationChanged(bool)), actionSave, SLOT(setEnabled(bool)));
|
||||
connect(ui.msgText->document(), SIGNAL(modificationChanged(bool)), this, SLOT(setWindowModified(bool)));
|
||||
|
@ -565,23 +564,6 @@ void MessageComposer::closeEvent (QCloseEvent * event)
|
|||
}
|
||||
}
|
||||
|
||||
void MessageComposer::contextMenu(QPoint point)
|
||||
{
|
||||
QMenu *contextMnu = ui.msgText->createStandardContextMenu(point);
|
||||
|
||||
contextMnu->addSeparator();
|
||||
QAction *action = contextMnu->addAction(QIcon(":/images/pasterslink.png"), tr("Paste RetroShare Link"), this, SLOT(pasteLink()));
|
||||
action->setDisabled(RSLinkClipboard::empty());
|
||||
|
||||
contextMnu->exec(QCursor::pos());
|
||||
delete(contextMnu);
|
||||
}
|
||||
|
||||
void MessageComposer::pasteLink()
|
||||
{
|
||||
ui.msgText->insertHtml(RSLinkClipboard::toHtml()) ;
|
||||
}
|
||||
|
||||
void MessageComposer::contextMenuFileList(QPoint)
|
||||
{
|
||||
QMenu contextMnu(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue