mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
Restored 'Peer Offline' notification to Chat Window.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@585 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
3b03f084fa
commit
8103b0c372
@ -157,14 +157,6 @@ void PopupChatDialog::updateChat()
|
||||
|
||||
void PopupChatDialog::addChatMsg(ChatInfo *ci)
|
||||
{
|
||||
//QTextBrowser *msgWidget = ui.textBrowser;
|
||||
|
||||
//QString message = msgWidget->toHtml();
|
||||
|
||||
|
||||
/* add in lines at the bottom */
|
||||
//QString extraTxt;
|
||||
|
||||
bool offline = true;
|
||||
|
||||
{
|
||||
@ -181,22 +173,15 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
|
||||
|
||||
if (offline)
|
||||
{
|
||||
QString line = "<br>\n<span style=\"color:#1D84C9\"><strong> ----- PEER OFFLINE (Chat will be lost) -----</strong></span> \n<br>";
|
||||
|
||||
//extraTxt += line;
|
||||
QString offlineMsg = "<br>\n<span style=\"color:#1D84C9\"><strong> ----- PEER OFFLINE (Chat will be lost) -----</strong></span> \n<br>";
|
||||
ui.textBrowser->setHtml(ui.textBrowser->toHtml() + offlineMsg);
|
||||
}
|
||||
|
||||
|
||||
QString timestamp = "[" + QDateTime::currentDateTime().toString("hh:mm:ss") + "]";
|
||||
QString name = QString::fromStdString(ci ->name);
|
||||
//QString line = "<span style=\"color:#C00000\"><strong>" + timestamp + "</strong></span>" +
|
||||
// "<span style=\"color:#2D84C9\"><strong>" + " " + name + "</strong></span>";
|
||||
//extraTxt += line;
|
||||
|
||||
QString message = QString::fromStdWString(ci -> msg);
|
||||
|
||||
//currenttxt += extraTxt;
|
||||
|
||||
QHashIterator<QString, QString> i(smileys);
|
||||
while(i.hasNext())
|
||||
{
|
||||
@ -218,9 +203,6 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
|
||||
QTextCursor cursor = ui.textBrowser->textCursor();
|
||||
cursor.movePosition(QTextCursor::End);
|
||||
ui.textBrowser->setTextCursor(cursor);
|
||||
|
||||
//QScrollBar *qsb = ui.textBrowser->verticalScrollBar();
|
||||
//qsb -> setValue(qsb->maximum());
|
||||
}
|
||||
|
||||
void PopupChatDialog::checkChat()
|
||||
|
Loading…
Reference in New Issue
Block a user