mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
Added actions for disable/enable Emoticons in Privat Chat and for Clear Chat History
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2374 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5633e7b5f4
commit
a32c4b74b4
4 changed files with 105 additions and 0 deletions
|
@ -123,6 +123,11 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
|
|||
|
||||
/*Disabled style Button when will switch chat style RetroShare will crash need to be fix */
|
||||
//ui.styleButton->setEnabled(false);
|
||||
|
||||
QMenu * toolmenu = new QMenu();
|
||||
toolmenu->addAction(ui.actionClear_Chat);
|
||||
toolmenu->addAction(ui.action_Disable_Emoticons);
|
||||
ui.pushtoolsButton->setMenu(toolmenu);
|
||||
|
||||
|
||||
mCurrentColor = Qt::black;
|
||||
|
@ -267,6 +272,8 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
|
|||
std::cout << "PopupChatDialog:addChatMsg message : " << message.toStdString() << std::endl;
|
||||
#endif
|
||||
|
||||
if(!ui.action_Disable_Emoticons->isChecked())
|
||||
{
|
||||
QHashIterator<QString, QString> i(smileys);
|
||||
while(i.hasNext())
|
||||
{
|
||||
|
@ -274,6 +281,8 @@ std::cout << "PopupChatDialog:addChatMsg message : " << message.toStdString() <<
|
|||
foreach(QString code, i.key().split("|"))
|
||||
message.replace(code, "<img src=\"" + i.value() + "\" />");
|
||||
}
|
||||
}
|
||||
|
||||
history /*<< nickColor << color << font << fontSize*/ << timestamp << name << message;
|
||||
|
||||
QString formatMsg = loadEmptyStyle()/*.replace(nickColor)
|
||||
|
@ -600,6 +609,11 @@ QString PopupChatDialog::loadEmptyStyle()
|
|||
}
|
||||
}
|
||||
|
||||
void PopupChatDialog::on_actionClear_Chat_triggered()
|
||||
{
|
||||
ui.textBrowser->clear();
|
||||
}
|
||||
|
||||
void PopupChatDialog::changeStyle()
|
||||
{
|
||||
QString newStyle = QFileDialog::getOpenFileName(this, tr("Open Style"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue