disbled new popupchat style stuff - until it works without style files.

removed release flag from mainwindow.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@507 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-04-16 12:35:01 +00:00
parent 5a27165353
commit aa393dcc72
2 changed files with 24 additions and 24 deletions

View File

@ -91,8 +91,6 @@
* #define RS_RELEASE_VERSION 1
****/
#define RS_RELEASE_VERSION 1
/** Constructor */
MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
: QMainWindow(parent, flags)

View File

@ -155,16 +155,13 @@ void PopupChatDialog::updateChat()
}
void PopupChatDialog::addChatMsg(ChatInfo *ci)
{
//QTextBrowser *msgWidget = ui.textBrowser;
//QString message = msgWidget->toHtml();
/* add in lines at the bottom */
//QString extraTxt;
void PopupChatDialog::addChatMsg(ChatInfo *ci)
{
QTextBrowser *msgWidget = ui.textBrowser;
QString currenttxt = msgWidget->toHtml();
/* add in lines at the bottom */
QString extraTxt;
bool offline = true;
@ -184,26 +181,30 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
{
QString line = "<br>\n<span style=\"color:#1D84C9\"><strong> ----- PEER OFFLINE (Chat will be lost) -----</strong></span> \n<br>";
//extraTxt += line;
extraTxt += line;
}
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 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;
extraTxt += QString::fromStdWString(ci -> msg);
QString message = QString::fromStdWString(ci -> msg);
//QString message = QString::fromStdWString(ci -> msg);
//currenttxt += extraTxt;
QHashIterator<QString, QString> i(smileys);
QHashIterator<QString, QString> i(smileys);
while(i.hasNext())
{
i.next();
message.replace(i.key(), "<img src=\"" + i.value() + "\">");
}
extraTxt.replace(i.key(), "<img src=\"" + i.value() + "\">");
//message.replace(i.key(), "<img src=\"" + i.value() + "\">");
}
currenttxt += extraTxt;
ui.textBrowser->setHtml(currenttxt);
#if 0
history /*<< nickColor << color << font << fontSize*/ << timestamp << name << message;
QString formatMsg = loadEmptyStyle()/*.replace(nickColor)
@ -215,7 +216,8 @@ void PopupChatDialog::addChatMsg(ChatInfo *ci)
.replace("%message%", message);
ui.textBrowser->setHtml(ui.textBrowser->toHtml() + formatMsg + "\n");
#endif
QTextCursor cursor = ui.textBrowser->textCursor();
cursor.movePosition(QTextCursor::End);
ui.textBrowser->setTextCursor(cursor);