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:
drbob 2008-06-07 17:52:53 +00:00
parent 3b03f084fa
commit 8103b0c372

View File

@ -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()