mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 00:25:16 -04:00
Added clear chat history to the context menu of the message text browser.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5456 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f2072e9522
commit
28def71b4e
6 changed files with 39 additions and 5 deletions
|
@ -120,6 +120,8 @@ FriendsDialog::FriendsDialog(QWidget *parent)
|
|||
connect(ui.Sendbtn, SIGNAL(clicked()), this, SLOT(sendMsg()));
|
||||
connect(ui.emoticonBtn, SIGNAL(clicked()), this, SLOT(smileyWidgetgroupchat()));
|
||||
|
||||
connect(ui.msgText,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(contextMenuMsgText(QPoint)));
|
||||
|
||||
connect(ui.lineEdit,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(contextMenu(QPoint)));
|
||||
// reset text and color after removing all characters from the QTextEdit and after calling QTextEdit::clear
|
||||
connect(ui.lineEdit, SIGNAL(currentCharFormatChanged(QTextCharFormat)), this, SLOT(chatCharFormatChanged()));
|
||||
|
@ -275,6 +277,17 @@ void FriendsDialog::pasteLink()
|
|||
ui.lineEdit->insertHtml(RSLinkClipboard::toHtml()) ;
|
||||
}
|
||||
|
||||
void FriendsDialog::contextMenuMsgText(QPoint)
|
||||
{
|
||||
QMenu *contextMnu = ui.msgText->createStandardContextMenu();
|
||||
|
||||
contextMnu->addSeparator();
|
||||
contextMnu->addAction(ui.actionClear_Chat_History);
|
||||
|
||||
contextMnu->exec(QCursor::pos());
|
||||
delete(contextMnu);
|
||||
}
|
||||
|
||||
void FriendsDialog::contextMenu(QPoint /*point*/)
|
||||
{
|
||||
QMenu *contextMnu = ui.lineEdit->createStandardContextMenu();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue